Hello all,
How would I limit a player’s movement to only be able to jump between squares on a grid. If you have played or seen crypt of the necromancer then that’s what I’m going for.
Hello all,
How would I limit a player’s movement to only be able to jump between squares on a grid. If you have played or seen crypt of the necromancer then that’s what I’m going for.
Hi! What have you tried this far? What do you know this far? Do you know how to make a character move from player input? Do you know about tiles? With those two, you should be able to get quite far, so check those out of you haven’t already.
Some thoughts:
go.animate(".", "position", go.PLAYBACK_ONCE_FORWARD, self.grid_pos * GRID_SIZE, go.EASING_LINEAR, 1, 0, cb)
Hello and thanks for your reply!
Sorry for not replying at an earlier date. I have not been able to use Defold as much recently, and as a result I have put the project on hold for the time being. I have also decided to get a better grasp of lua and Defold overall. I will return to this post at some point.
Thanks,
Alola
Hello,
Thanks for your input once again and sorry for not replying at an earlier date. I am taking a step back and really getting to learn the very basics of Defold and lua to help me better myself overall. I will return to this post at a later date.
Thanks,
Alola
Thank you for this explanation, I’m thinking of implementing such a thing for some games. Sorry for the necromancy, there seems to be a lot of great answers to questions on this forum which were asked well before I knew about Defold.
Hello @WhiteBoxDev,
As far as I can tell that library assumes that the grid is a grid of boxes, can’t be rectangles? Is that accurate? Basically, I think it would be good to have the option to have a different dge.stride_x and dge.stride_y.
Cheers for the awesome library.
Spen
Yes, that’s correct.
It depends if that would be useful to people. All of the games I can think of that use a grid system use squares and hexagons. If rectangles were requested (on GitHub) then I would look into it.
Understandable. I’m currently looking at the property map, which is a great feature to add to the grid based movement, and can allow for hidden information which is also very cool. However, I don’t understand how one would convey 11,1 vs 1,11 on the property map?
Wow, that’s interesting. The problem has never come up before surprisingly. Yep, that’s an issue I did not foresee. Thanks for asking about that. I’ll make sure to solve the problem tonight and push an update.