@jackash said:
I want to develop a 2D game with isometric view and I started developing in Unity, however I also wanted to check Godot out and since I am only starting, I can easily choose it over Unity, but I have 1 question that's important for me. How can I make anything like this: City Game Studio or Shipwreck (made with Godot), you can see on the trailer that you can click on any tile in the game and that's what I want to achieve. I checked the TileMap component but it doesn't suit me as it stores only the sprite information (as it should), but I found nothing else, like an Isometric Grid to snap objects to or anything similar, so my question is can I achieve this in Godot and how much work will it take?
Well, given Shipwreck is developed using Godot, it is definitely at least possible. I have no idea how easy or hard it would be, nor can I really offer any solid advice on how to go about it as I primarily do 3D, so isometric stuff for me is just a different rendering perspective :smile:
That said, here's what I would do: I would see if you can get in touch with the developer(s) of Shipwreck and ask if they do not mind sharing the general gist of how they handle their isometric map. Worse case they do not get back to you and you don't have any more information then when you started.
However, just in case, here's what I would suggest if you are rolling your own system:
Looking at the videos and pulling on my limited knowledge of isometric 2D stuff, I think isometric maps are positioned according to a grid, but the grid becomes offset on the Y axis with each layer. If I recall rightly from my failed attempt at making an isometric map, the grid isn't too complicated until you start adding layers/height to it. I'm not sure if it will help, but a quick Google search brought up this tutorial/guide from tutsplus.com and quickly glancing through it, it looks like it may be helpful.
If the TileMap node does not work, then likely you'll need to either make your own node that draws the entire tile map (you can use the _draw function) or if your map is small enough you may be able to get away with just a bunch of Node2D and Sprite nodes for each tile.
For selection it should, in theory, just be a matter of converting from mouse coordinates to world coordinates, converting from world coordinates to coordinates relative to the origin of the tile map, and then snapping the coordinates to the isometric grid so you know which tile was selected. Granted, I have not done this myself, so there probably are other, better ways of doing it.
Hopefully this helps :smile: