how would i make a multi-directional “board game” movement system?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By oscar r

i’m still pretty new to Godot, and i can’t figure out how to do this, If you need a reference, look up some gameplay of the Wii game Dokapon Kingdom, it’s basically the system i’m trying to create,
thanks in
advance!

Hmm… I found a lot of resources (though most of them are 2d) on similar topics.
Here are some I found:
https://kidscancode.org/godot_recipes/2d/grid_movement/
Along with some similar questions as well.
https://forum.godotengine.org/71825/grid-based-movement-limit-display-potential-move-distance?show=71825#q71825
https://forum.godotengine.org/99354/grid-based-movement?show=99354#q99354
https://forum.godotengine.org/65646/how-do-i-add-grid-based-movement-to-a-isometric-tilemap?show=65646#q65646
https://forum.godotengine.org/70995/pls-help-grid-movement-demo-movement-interpolation?show=70995#q70995

How I would go about doing it would be to create a dictionary. Please do not, however, that I know near-to-nothing about 3D, so I apologize if these techniques do not transfer properly.

Here’s a tutorial on dictionaries, in case you don’t know: Dictionary — Godot Engine (stable) documentation in English
If you need more help on dictionaries, search up python dictionaries, they’re literally the same thing in gdscript.

So what I would do is this: (remember to add proper indents!)

var grid = {
a1 = position3d(1, 1, 1)
a2 = position3d(2, 2, 2)
}

please note that position3d is probably not a real function

And so on.
If you’re looking for a more of an infinite grid-based system, you could just move everytime by a set amount.

translate_right(40)
translate_left(40)
translate_up(40)
translate_down(40)

disclaimer: functions above are probably not real functions. Just used as placeholders :smiley:

Other than that, I have no idea how to do this. Please do note that this is just a suggestion for you to use, and I am terribly sorry if my suggestions do not work. Hope your problem works out :).

TheJokingJack | 2021-05-25 01:46