Sign in to follow this  

How to generate platforms on a top-down game?

Recommended Posts



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 :)

Share this post

Link to post
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.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.