Traditional Roguelike help?

Hi! I’ve been trying to work on a traditional roguelike multiple times using gdevelop which has been quite a bit. But every time I lose steam on one thing - movement across tiles/cells and smarter enemy logic since when you use path finding behaviors it will jump across multiple tiles from the acceleration. I’ve seen a few posts but it was hard to get a grasp on what exactly they were logic they were using. I’d love to have a discussion on movement across tiles and smarter logic for enemies using a grid, how can I have them move multiple tiles at a time like three cells every other turn similar to crypt of the necro dancer or grid based roguelike in general similar to the Orginal rogue or the puzzle game helltaker. If anyone has suggestions or even better share example code I’d appreciate it so much. Like I said I’ve had stabs at this and read forums multiple times so thought I’d post.

There’ll be tutorial projects on YouTube if you have a look :slight_smile:

I’ve taken a look at most of the tutorials and none of them cover grid based movement for enemies or players in a cell/tile movement sadly.

Pathfinding does use a grid, as discussed in this thread:

I think you just need to configure the pathfinding grid to match with your tiles.

Most roguelikes achieve the movement I think you are referring to by using turns with a speed factor. Let’s say normal speed is 10. If you and a monster both have speed 10, then you will both move at the same “rate”. Meaning, you take a step, the monster takes a step.

Now imagine you have speed 10 and monster has speed 5. The monster should move half as much as the player. So you’ll take TWO steps, for every ONE that the monster gets.

A fast monster could have speed 30, in this case after player takes a step, the monster will get three in a row.

You can achieve this by simply having a variable that accumulates for each entity. Each round, you add the entity’s speed to that variable. If the variable is > 10 (or whatever value you want to equal 1 move per round) then the entity gets to take one step, and subtract 10 from the variable. If still > 10, take another step, until it is below 10.

You would need another factor to make something move 3 times every other turn, which is not possible with the above system alone. One way would be to have a movement speed which is separate from turn speed, i.e. speed = 5/10, movement = 3.

Gotcha I kinda figured out the turns and movement stuff that all makes sense which is awesome what behaviors do you suggest? From what I seen using the top down behavior and pixel perfect movement with the pathfinding behaviors? Last time I was messing with it they would jump out of their spots to snap to another piece of the grid past walls but maybe the pixel perfect behavior might fix that?

Also thank you very much for the help and suggestions!