• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Random Spawn in set random areas

P

Phsyrik

Guest
I am making a spaceship game as a "get my feet wet" kind of game with the program. It can be comparable to Asteroid Rage from Mario Party 6.

I am stuck as I do not know how to make the asteroids spawn (randomly placed) in 2-4 of the 5 lanes, and also make a coin have a chance to spawn in one of the non-occupied lanes. Then once the wave of asteroids passes the ship make the next appear with a different pattern. The only thing I can think of is make sprites for each of the wave possibilities, but I was wondering if there is any easier way to do this?
 
Yeah there are easier ways than creating a different sprite for each pattern, which in itself would cause issues.

I would use an array or list to store a number corresponding to each lane. Selecting numbers out of that array or list in such a way that I cannot select the same number twice, (at least until the next wave starts).
 
Top