Issues with a Endless Level

So I have been working on an endless mode in my game, and I have run into an issue. The object of the game is to last as long as you can before you run out of air.You avoid bad air, attempt to grab good air, and collect silver blocks to unlock characters. This is how my endless level works:

When my hero is colliding/overlapping with a block and the player presses the break button it moves the block over to the x coordinate of 600. After 30 seconds the block moves back to its original x coordinate. After you reach the “bottom” of endless level (where the level Y wraps) you go back to the top and by then all of the previously “destroyed” blocks are now back in their original x-coordinate.

Now this is where the issues come in. After you have gone though it once some of the blocks, about half, won’t break again (move to x-coordinate 600). I don’t know why this is happening.

I have also tried to not use the “Wrap Y” function by placing an actor at the bottom of the screen, and when it collides with the hero, the heroes y-coordinate gets changed back up to the top.

P.S. Heres a video better displaying the situation. As you notice it is part of my game that the purple blocks purposefully don’t break. Thanks and have a great day!

Best Answer

  • CORE GameCORE Game Posts: 280
    Accepted Answer
    My game called N2R it is available in iTunes, I was thinking of doing the same (endless) but I limited the game to be 600 seconds (last i remember), now what I have done is the following:
    -No scene wrap.
    -I made 1 actor called it (spawner): this will spawn the actors ( only once) and it is within a timer, meaning I decide after 30 seconds spawn A and after 60 spawn B.
    -The actors (A,B...etc.) they will collide with the main Actor (player) and they will change their Y to go back to the bottom of the screen (out of the camera view), adding a timer to the actor with a random value, before it starts moving in the screen again.

    This way you will not consume a lot of memory for spawning/destroying a lot of actors.

Sign In or Register to comment.