Jump to content

How to generate platforms on a top-down game?


Acid
 Share

Recommended Posts

Hello,

 

I have created a simple top-down game with a tiled map for a frogger-like game where i can move my character arround. I now want to implement moving platforms for my character to advance, i want to spawn my platforms on a specific group of tiles, (since this is a frogger game, you could guess i want to spawn logs on water tiles) i have done some research and couldn't really find what i was looking for in the examples and the forum. I would like some advice on the way to proceed in my project, as i am kind of lost :( Is it possible to generate my platforms using the json data to identify the water tiles? Do my platforms have to be Tile objects or can i create them in the game so i can freely use them?

 

I'll gladly take your advice :)

Link to comment
Share on other sites

If you think in terms of "regions within my map where my player sprite moves" I think it becomes an easier problem. Like, don't try and get a sprite to collide with your player and get them "stuck" so they move together until the player jumps and now they're not stuck. Track where the logs should be and both draw the log images there and see if the player is inside the rectangle defined by the log. If the player is there, then move them along with the log.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...