0 votes

As I understand it, collision detection and area entry detection is done at the floating point level, and with pixel based games, at the pixel level. How would one achieve collision detection and area entry with a grid based game?

I am calling a grid-based game one where there are a small set of possible locations any entity can be in. Think of most board games, chess for example. A piece cannot move into a square where there is another piece of the same color.

I feel like these kinds of games are common enough that there might be a recommended way to achieve that behaviour. Is there?

NB: Chess is only a simple example, and you could probably do that easily with some custom code. But I am thinking of much more complex games with say 100s of moving, automated entities.

Additional info: been working with Godot only for a few days, all in 3D.

in Engine by (19 points)

So you want to detect if object in specific cell in grid space? How do you want to represent your object? Only in grid space? Do objects occupy more than one grid cell? Can object detect collision only if it is on a grid cell position and not while it is moving beetwin two cell positions?

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.