Help with rogue like top down tile map

Hi guys, how do I make tile map in gdevelop5?

I wanted to make top down tile map such as those in the old pokemon game (gold & silver).
Appreciate if anyone has any tips to share with.

Is there mechanism to implement collision detection so that I cannot run through obstacles?
Enter door and trigger change scene?

Thanks a lot.

You can use collisions-events to check if the player character is allowed through or not.

Something like:

objectPlayer in collision with wall01

separate objects objectPlayer and wall01

I think you could use the same mechanic for triggering a new scene. Instead of separate objects use the “change scene” action.

Hope that helps.

See if the example being developed here helps:

Thanks a lot, BWPanda! I will keep trying.

One tip is to put all the objects that you want to be solid and impassable into a group called something like “solid”. Then in your events you can just have one event to do a collision check with “solid” rather than having to have a collision-checking event for every object you want to be impassable.

Another way to achieve the same result is to have a single object type that you use to mark out the areas you don’t want players getting into and collision check those objects rather than every tree, every rock etc. If you hide these barrier objects when the scene starts they will act like invisible forcefields. One benefit of doing this is the object can just be a tiny square sprite that you scale in the scene editor to be the size and shape that you want.

In the screenshot below, the yellow rectangles are these barrier objects that aren’t visible in the final game, but set the limits for the player movement. The similar semi-transparent blue objects block enemy movement in the same way. They all started as 8x8 sprites that I stretched and rotated and copied in the scene editor.

1 Like