91
Ask a Question / Randomly generated tiles
« on: January 05, 2012, 04:39:24 am »
Had some computer problems for a while, which forced me to put a hold on designing, and just got a new computer a week or so ago, so I'm back now but having to almost start learning back from scratch XD
I am wondering what the most efficient way to randomly generate tiles offscreen would be; I had an idea for a sort of 'running game' with a bit of a twist, in that you are running down a hall with a series of variously colored buttons which trigger different traps when you step on them. the object being to avoid the worst of the buttons while trying to progress further and avoid the traps.
the buttons I have a good idea on how to make work; however, I can't seem to think of a good way to tell the game to generate the buttons and floor tiles off screen so they will be there when you reach them without risking there being gaps between them when running faster. Is there a good way to tell the game to check the current location of the last generated tile, and to create a new tile randomly selected directly next to it?
I am wondering what the most efficient way to randomly generate tiles offscreen would be; I had an idea for a sort of 'running game' with a bit of a twist, in that you are running down a hall with a series of variously colored buttons which trigger different traps when you step on them. the object being to avoid the worst of the buttons while trying to progress further and avoid the traps.
the buttons I have a good idea on how to make work; however, I can't seem to think of a good way to tell the game to generate the buttons and floor tiles off screen so they will be there when you reach them without risking there being gaps between them when running faster. Is there a good way to tell the game to check the current location of the last generated tile, and to create a new tile randomly selected directly next to it?