Whats the way to do a tightrope walk type thing?

JarOfCarrot

  • Posts: 7
I'm doing a top-down dungeon crawler game and having a problem with this room.
The goal of this room is basicly just to make your way along the narrow path, if you go in the lava you get sent back to the start.

I have regions set along the edges of the pathways where if you cross over youre sent back (as above) and it kinda works but because the path has a few turns it takes quite a few region points to do it this way, so many that on testing the scene it causes the play to be laggy.
Is there a better way to get this mechanic to work that wont cause the lag ?

Tuo

  • *
  • Posts: 2469
Here's what I'd do:
1. Delete ALL the regions.
2. Go into the Settings, into the extensions, and turn on the tile API.
3. Close and reopen the game so that the API is put into the game.
4. Place all of walkable tiles in one tileset (if they aren't already).
5. Use the tile API blocks (in the "extensions" palette you'll now see) to convert the coordinates of the player into row/column for the tiles and then check to see if the tilesetID for the tile is the walkable set (or not equal to it if you want the player to die when off and nothing happen when on the path).

(In the games section of the StencylForge, you can download my "Demo- Miner", which goes over how to use the tile API and the ideas behind it if you want more details on it ;) )
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

JarOfCarrot

  • Posts: 7
Thank you for your help,
 I got your demo miner and have been learning a lot looking through how you put it together,
 still having trouble figuring out how to generate the reactive tiles in more intricate shapes of the lava rather than creating one set of tiles all the way through the whole field of the scene.
Would you have any further advice for that element?

Tuo

  • *
  • Posts: 2469
If the lava is not tiles, you may be able to simplify it a ton. Make the player have normal collision (and collide with actors) and then start the player within the tiles, and he should not be allowed to leave (I think it worked that way in 2.x, dunno about 3.x)
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)