Skip to main content

Questions tagged [grid]

A regular tessellation of a surface to create uniform, contiguous cells arranged in a consistent pattern.

Filter by
Sorted by
Tagged with
0 votes
0 answers
128 views

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 ...
PerplexedDimension's user avatar
2 votes
1 answer
202 views

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 ...
Lukas Makor's user avatar
0 votes
1 answer
130 views

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 ...
Jack's user avatar
  • 1
1 vote
1 answer
199 views

I have a spatial hashing grid that's mapped out like ...
Pen's user avatar
  • 13
0 votes
0 answers
80 views

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 ...
Maya Rahto's user avatar
2 votes
2 answers
282 views

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 ...
Jamek's user avatar
  • 21
1 vote
1 answer
109 views

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 ...
anathrax's user avatar
1 vote
0 answers
110 views

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 ...
Zekfad's user avatar
  • 11
0 votes
0 answers
38 views

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 ...
James's user avatar
  • 1
0 votes
1 answer
72 views

I need to manage the index positions in a GridLayoutGroup and keep it consistent with the childCount of the group it belongs to. ...
bibrosko's user avatar
0 votes
1 answer
450 views

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 ...
ireece1's user avatar
4 votes
1 answer
5k views

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 ...
idbrii's user avatar
  • 1,088
0 votes
2 answers
195 views

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 ...
user46346's user avatar
  • 101
1 vote
0 answers
807 views

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 ...
Jamelaumn's user avatar
4 votes
1 answer
600 views

I have a hex grid of 10000 cells (100x100). The player can grab a cell next to one of his cells (borders). If the player has formed a ring after placing a cell, I want to get a list of cells that ...
ArtemiZ Studio's user avatar
0 votes
1 answer
2k views

I looked at the forums and found out that it is not recommended to use the terrain system for the mobile platform. So then I decided to have a single plane as a "terrain" with single ground ...
Silz's user avatar
  • 37
0 votes
3 answers
917 views

I am new to Unity and want to create a tower defence game like Fieldrunners. I need help to create the grid placement area for the towers so that there is always a path for enemies to travel. I mean ...
Robin's user avatar
  • 3
1 vote
0 answers
205 views

This is for the development of a roguelike/management game. I'm trying to implement HPA (hierarchical pathfinding with A*), and I've found a few good resources (suggestions appreciated) in the forms ...
genfy's user avatar
  • 43
0 votes
1 answer
1k views

Here are, it seems, two ways to draw a smaller grid of tiles from an initial hexagon: On the left, we halve the side length \$s\$ and create most of the new tiles centered at the midpoint of sides. ...
clwhisk's user avatar
  • 101
1 vote
1 answer
198 views

I'm using Unity's Grid system, and I'm drawing triangles on the grid. Each triangle is recorded as a Vector2Int origin point and a ...
lowercasename's user avatar
1 vote
1 answer
586 views

I'm making a little program that's a bit like paint but instead of filling in pixels, it drops a block on mousebutton(0). I'm now trying to add a straight line ...
Alexander Hristov's user avatar
0 votes
1 answer
782 views

I just noticed that unities snap-to-grid feature results in a strange behavior. The results are not precise. My geometry is comprised of 32x32 pieces. They appear to snap fine to the grid, but when I ...
Krythic's user avatar
  • 800
0 votes
1 answer
2k views

I have a tilemap that is filled with tiles by script. That works well so far. Now my aim is to make the tiles interactable by making them clickable. I achieved this by adding an EventSystem object ...
Evg's user avatar
  • 3
0 votes
2 answers
442 views

In my game project I create the terrain programmatically by creating tiles on a 2D grid as the player moves around the game map. I have it working where I select the current tile and check all 8 ...
peacetype's user avatar
  • 145
1 vote
4 answers
3k views

I have just started working with Unity to simply learn how it works. I've been trying to get grid-based movement and collision with a tilemap working, and it's mostly there, but there's one bit that's ...
Samuel Slade's user avatar
0 votes
1 answer
296 views

I have a grid-based map system. The grid is aligned to the X and Z axes. The tiles on said map are 3-dimensional, but flat, and can be located anywhere on the Y-axis. If I need to get a Vector3 of ...
TheBroodian's user avatar
2 votes
1 answer
363 views

I'm trying to spread temperature values evenly across the grid (Room) but somehow it has a bias to the right side of the map. My basic math skills are non existent so i could use some help with the ...
Jason Meulenhoff's user avatar
0 votes
1 answer
185 views

So, I ran into a problem with placing points in a grid while always trying to fit them into a square. Here are some examples (the numbers represent the order of placement): Placing 1 point: ...
thzoid's user avatar
  • 3
1 vote
0 answers
317 views

I have been implementing Transvoxel in to my Marching Cubes project in c++. The Transvoxel documentation and available code examples feature cell vertex reuse (caching) via indices. The main benefits ...
trshmanx's user avatar
  • 171
2 votes
2 answers
212 views

I am making a game with discrete block positions (something like minecraft) where you can program robots with instructions to move around, the robots are the size of one block, and they can execute ...
imad's user avatar
  • 121
0 votes
1 answer
255 views

...
GoldCredential's user avatar
2 votes
1 answer
177 views

So imagine an RTS game, with ~150 units all cramped together, just staying chill. What I would like is to "space them out" so that they d form a grid. This is useful for example when a large ...
Denis's user avatar
  • 131
0 votes
0 answers
57 views

I want to move object continously when I press button just once grid to grid. When I press button to make object move to another direction, it should wait until object is right on the grid and ...
Apoleytaa's user avatar
0 votes
1 answer
881 views

I need to be able to place structures in my game that span multiple tiles and can also be rotated. My idea on how to solve this would be to use 2D arrays that hold data about the structure. EXAMPLE: (...
caleidon's user avatar
  • 591
2 votes
2 answers
12k views

I'm currently researching, for a summary paper, the different variants of A* search algorithm and how they are used in games. I stumbled across the name HPA*. I've heard that it's much faster than ...
Ixion Chowdhury's user avatar
0 votes
0 answers
387 views

I am making a grid base RPG (like Fire Emblem but isometric) but currently I'm stuck on the movement, mainly the UI (showing how far the player can move around the board). Like the image below where ...
David Zaslavsky's user avatar
1 vote
1 answer
122 views

When trying to prototype a (top-down, so far) boxing simulation I've run into a huge roadblock with trying to set the space in which the boxers will fight, because it's important for the fighters' ...
Victor's user avatar
  • 13
4 votes
3 answers
450 views

I find in general map creation that I prefer hex grids for natural environments, but square grids for interior and urban/constructed environments. Is there a smooth or elegant way to transition ...
Weckar E.'s user avatar
  • 842
0 votes
1 answer
90 views

I want to be able to click and hold on a certain point and mark it as startPosition. Then, while the mouse is held down and moved, mark that second position as <...
caleidon's user avatar
  • 591
0 votes
0 answers
41 views

I'm not sure of the correct terms for this so having a hard time searching. But I have a series of 2d top-down rooms made up of random grid sizes between say 5 and 10 on the x and y axis. Each room ...
user1022585's user avatar
0 votes
1 answer
620 views

I'm using Wave Function Collapse to generate a tilemap, and I'm trying to come up with a way to maintain a contiguous area during generation. As an example: ensuring all "walkable" tiles are ...
IanLarson's user avatar
  • 811
4 votes
0 answers
525 views

I use Fast iterative method to create my flow field. However when an obstacle is on the same axis as the destination, the vectors behind the obstacle point directly to the destination and ignore the ...
user3755567's user avatar
3 votes
3 answers
212 views

I'm looking to implement an algorithm that will calculate the minimum number of moves based on the rules below. Let's say that we have a grid (NxM), as exampled in the image below. Each cell will be ...
Alex's user avatar
  • 33
4 votes
1 answer
2k views

I need to check whether a cell in a 2D grid is visible to the starting cell. I'm currently using amit's supercover line algorithm, this one https://www.redblobgames.com/grids/line-drawing.html#...
Ainsley Harriott's user avatar
0 votes
1 answer
920 views

My original method for doing this involved taking the player's position, dividing it by the grid cell size, and rounding the result. This works for most cases except when I move my player up above y-...
Kennichi Nitta's user avatar
2 votes
1 answer
2k views

I'm trying to generate a random path on a 2D grid given that: The width and height of the grid are given The length of the path to generate is given The path can't move "back" The path ...
Oro Portaluri's user avatar
0 votes
1 answer
91 views

Hellow~ So for a bit of context: i'm currently working on a RTS (way above may league) which already has a level editor and a node grid which maps the terrain, i previously make a navigation system ...
Frame Matt's user avatar
11 votes
3 answers
2k views

I'm working on a grid based puzzle game involving tracks, and I'm having trouble finding a nice way to have users draw those tracks on the grid in a way is easily understood. For simplicity I had the ...
Rutger's user avatar
  • 140
0 votes
2 answers
236 views

I'm trying to implement "sliding" movement on a simple grid, where the movement vector is continuous (floating point direction) but the grid is discrete (boolean blocked or open on integer ...
Lazlo's user avatar
  • 133
0 votes
0 answers
142 views

I need to make a turn based game in js and jquery. The rules are : The 2 characters, the 4 weapons and the 15 obstacles are randomly generated on a grid(made with HTML table and generated in a loop) ...
Shunkashuu's user avatar

1
2 3 4 5 6