Questions tagged [grid]
A regular tessellation of a surface to create uniform, contiguous cells arranged in a consistent pattern.
290 questions
0
votes
0
answers
127
views
Determining whether two points in 3D space fall along one another's line of sight
I have a three-dimensional surface represented by a 3D grid of cells. This 3D grid of cells is in turn represented by a 3D matrix, whose entries are nonzero if a cell corresponds to a "surface ...
2
votes
1
answer
188
views
How to adapt the Anya any-angle pathfinding algorithm to handle non-discrete start/target positions?
Recently, I have been investigating the Anya pathfinding algorithm.
Anya is an optimal any-angle pathfinding algorithm.
However, it works only with discrete points on the grid.
Here is an excerpt from ...
0
votes
0
answers
19
views
How to snap an object to a grid? [duplicate]
I am trying to emulate something like Factorio's train system and a core component involves placing rails. One of the game's mechanics has objects snapping to a grid. Another example would be Fortnite ...
0
votes
1
answer
130
views
Help designing a grid builder system with incremental placement
I am currently designing a grid building system for a game and am trying to implement the ability to place objects at different increments (if the grid cells are spaced one unit apart by default, then ...
1
vote
1
answer
195
views
How to rotate a 3d grid?
I have a spatial hashing grid that's mapped out like
...
0
votes
0
answers
71
views
Rotation inside MeshInstance3D surface plane
I'm trying to make a representation of a plane that rotates around a hole in a MeshInstance3D.
So far I've managed to make the circle's hole, but I can't make the ...
2
votes
2
answers
280
views
Identify doorways to partition a collection of walls with gaps into rooms
I am looking for an algorithm that can find separate rooms inside a set of walls, by determining which openings should be considered doorways between adjacent rooms. All is defined on a grid. My main ...
1
vote
1
answer
109
views
Selecting Tiles Correctly With Scroll
I would like to understand the process of selecting the correct tile from a scaled Surface when I have information about the number of tiles on the x and y axes, the length of the Surface, and also ...
1
vote
0
answers
109
views
2D grid game server - interaction system/dynamic blocks
I'm building a Server-side engine for 2D sandbox game similar to Terraria or Starbound.
The language I use is Dart (similar to JavaScript or C#).
Currently I'm trying to figure out how to make a good ...
0
votes
0
answers
38
views
Character is stuck between grid cell gap [duplicate]
I started making a D&D-style turn based tactic game. I have a problem with my tilemap.
I made a script to find the location on the tilemap for my character and for the tile I clicked with the ...
0
votes
1
answer
72
views
How can i keep a constant grid position relative to transform.ChildCount
I need to manage the index positions in a GridLayoutGroup and keep it consistent with the childCount of the group it belongs to.
...
0
votes
1
answer
442
views
Rendering Infinite 2D chunks?
I'm working on a top-down 2D RTS with C++ and SDL2, and have implemented the biome/terrain generation, tile rendering and a rudimentary camera system. I already have the skeleton code in place that ...
4
votes
1
answer
5k
views
How do I place objects so they snap to my TileMap in Godot?
When I'm placing objects on tiles in my TileMap, they snap to positions that aren't on my tile's grid. I drag my object to the middle of the grid square, but it keeps snapping to the corners.
I'm ...
0
votes
2
answers
194
views
How to calculate shadow position below arcing projectile in Isometric 2d tilebased grid?
I have an Isometric 2D grid-based tilemap, and am firing a projectile (at Vector P1 in image below) from the player (at Vector A) to a location "above" a target location (at Vector B). This ...
1
vote
0
answers
801
views
grid(tetris) inventory system
I'm trying to adapt my current inventory so that the items can occupy more than one slots (cells) like in this image:
Any idea that might help me? My inventory is an Image that has grid layout and ...