I REALY need help

i’m tying to do procedural art but it glitches every time

3 Likes

if you mean like good looking art made like by a computer than I can try to help

3 Likes

Could you send over the link to the code?
And what you mean by procedural– I’m guessing you’re combining images that are pieces of an artwork into a whole?

3 Likes

for context I was doing this to simulate mutations in genetics for a bigger game im doing :smiley:

3 Likes

yes

3 Likes

also you’re meant to press A

1 Like

after some testing by removing the entire 25% chance if statement i can narrow down the issue but something that helps a lot is using debug mode where i can clearly see the issue.

oh and the issue seems to be when making the second sprite the sprite data needs to be added again so that it can be referenced which is why it was throwing undefined

Additionally, when you pick an item from the array thats 0, or max but then move to -1 or +1 the game cant return an item thats outside the array. Like trying to read the 5th word in a sentence with only 4 words. (or the -1th word).

i fixed this by making a custom random function that will tick over if the value is too high or too low

im not entirely sure what you were trying to do but i hope this was helpful! i really like this little demo and i cant wait to see how its implemented

2 Likes