Platform Spawner for Vertical Jumping Level

Hi all, I need some help.

I am helping friends with a GameSalad Project, a type of vertical jumping game like DoodleJump or Jump and Fly, with some changes. Instead of an endless scroller they have a long but finite level (10,000px high, 30 wide), and it is populated by platforms at coordinates drawn from preset values kept in a table.

Initially the game would crash because the game was loading hundreds of actors to spawn at once, so I changed the spawner actor to hover above the camera view, and to spawn each row of platforms as it hit the Y-coordinates in the table. It spawns the platforms, and updates and index to watch for the Y-value in the next row of the table.

This fixed the crashing, but now the spawner is loading every actor twice, in exactly the same location. This isn't noticable except for the few moving enemy actors that get spawned overlapping each other, 2 enemies where there should be one.

Can anyone figure out why this is happening, or suggest a better way to approach loading a long, preset level of actors? Is a dynamic spawner necessary? I could go and spawn them randomly and ignore the tables, but we were aiming for preset patterns of platforms so we had more control of the difficulty.

Cheers

Comments

Sign In or Register to comment.