|Topic was automatically imported from the old Question2Answer platform.
I’m searching a workaround for grid based movement of a top-down JRPG style game (only a sketch right now, so I can’t show any project as an example, sorry).
I know there are many tutorials for this, but I think they are too complicated and need a long scripting.
I would ask if a movement based on an amount of pixels could be a solution, and where I can find a tutorial (I’ve found none).
In other terms, I would move a character 16 pixel each step instead giving grid coordinates.
I need a little more information.
-What sort of movement system are you trying to use?
- Are you trying to move the character using the mouse or with keyboard input?
- You don’t want the character to move by one grid square at a time, correct?
The navigation system is really simple to use, almost comically so. You could use the
set_target() function inside of that to set the target position to 16 pixel to whatever direction key you’re pressing to get this functionality. (if this is even what you’re looking for)
I would stray away from avoiding writing long code also, the more you write the better you’re going to get at it. I’ve only been using Godot for around 40 hour. When I first started I was looking for the shortest code tutorials but then quickly realized I was hindering myself by a large margin.
LordBoots | 2022-12-03 16:48
My sort of movement would be like 2D 16 bit era Pokemon or Final Fantasy. One tile when just press the direction, continuous movement when still pressed.
I understand what you guys are telling me. Learning GDscript well is better than find easier solutions, but I was in search of a short way without affect efficiency. Maybe it exists only with pre-built tools (if there are any in Godot).
Antonio Nero | 2022-12-03 17:56
Wow LordBoots is right completely forgot about the navmesh navigation system.
For what you’re wanting to do though the tile map node seems almost made specifically for you.
There’s an app called AdvanceMap that lets you view how those games layed out their movement
Wakatta | 2022-12-03 20:04
The navigation mesh and navigation agent are already built in. They would give you what you needed. There’s no point trying to reinvent the wheel or you’re never going to get anything done. Once you get through 10 or so tutorials the code would be extremely easy to follow and you should almost just “Know” what you need to do to get the job done.
Don’t avoid reading all of the documentation either. Even if you don’t need it you’ll have moments where you get stuck and then a part of the documentation pops back into your mind like a god given superpower. Happy coding!
LordBoots | 2022-12-03 20:07