Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Wow this is super awesome! I wish i could see the source code lmao. I am working on a tactics game as well, and I made a system to see how far the character should be able to move (with move cost and walls etc., which took longer then i'd like to admit.)


I made this system for 2D tilemaps, and am wanting to port it over to 3d. I was wondering how your system works for moving your characters

You dont want to see the source code lol... but as far as porting 2D to 3D, in all honestly I use mostly 2D oriented data with some lookups for things like height at a given position to help translate a 2D position to a 3D position. In other words, I have plain 2D map /data but track the heights in a separate data set, so for the most part its just 2D rendered in 3D.

ohh ok.

Do you use a tilemap and just have a custom renderer? how does it work?

Mmm no, the Tilemaps / Gridmaps in Godot were not very helpful. I made the entire map in Blockbench actually, and textured it like a normal 3D model, so really the map is just one mesh and is almost entirely distinct from the actual navigation. Navigation is setup by way of a GridMap; I just have a Gridmap with one, 50% transparency red cube in its mesh library and I draw that cube everywhere that is walkable (so on top of every "tile"). So there really are no tiles per se. At runtime, I just get every used cell from that Gridmap, where a red cube was, and register that position's X and Z value to an Astar2D object. I also track the y position in a separate lookup/dictionary, one where I can provide an astar ID (or position, doesn't matter) and get back a Y value - that way I can easily translate a 2D position to a 3D position. Why don't I just save the 3D positions? Well thats a good point, but most of the game logic runs on a 2D basis for simplicity and easier math since the Y value is rarely used in most cases.