0 votes

Hello,

I started off with my first project on godot.
The game can be described as a tile based game where you have to search things inside of a building. It should also be turn based. In each turn you can perform a number of actions such as move and interact by clicking on the tiles.
I also want to implement a fog of war and something like a max sight distance. So the tiles are only "visible" if you already visited them and they are in range of your sight.

My problem here is how to setup the structuwith them.
The alternative would be simple Sprites instead of a Tilemap but then random map generation would be a lot of effort I think.

Maybe someone ran into the same problem.

Greetings
Stefan

in Engine by (19 points)

TileMap gives you a grid of tiles, but you aren't limited to use just this. You could make your game as a combination of tilemap and other things, but to know which, you need to first define your requirements / problems.

For example, clicking a tile to interact with it: which tiles can you actually click on? If it's actually a handful of objects, then you can place them as nodes. But you could also get which tile is under the mouse and do an action accordingly.

Also if you use a mix of tilemap and nodes, your fog of war could be a second tilemap drawn over the first one so it would be able to hide nodes too.

Which problem do you have specifically?

Thank you, I will look into the action based on which tile is under the mouse.

My setup looks like this:
enter image description here

The Tilemap displays my background. And mousecontrol is a Button moved by the mouse movement and snapping to the tile grid. It has the general behaviour I want to now.
But you only get left clicks that way, I need to find out how to right click a button.

enter image description here

I found a solution for right clicking.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.