I managed to implement the background. But wait! There are actually 2 backgrounds. One is a mask that masks specific areas, where ghosts are allowed to appear and the other one is the actual background with coloring. This should prevent ghosts from appearing at completely random nonsensical spots.
I also programmed in that ghosts respect each other and spawn in some distance from one another, to not make it too crowded.
But this created a new problem. The pseudo randomness is… well random. So there is a slight chance the ghost you need to find doesn’t even appear because you had bad luck. Furthermore many ghosts don’t appear. The script tries to spawn 50 total ghosts, in case one fails it will retry finding a position for that ghost 100 times before giving up and not spawning it. And out of the 50 only 10 manage to actually spawn.
I will have to look into another solution to finding the random positions.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.