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

learn more… | top users | synonyms

3
votes
2answers
90 views

Path finding in 2D grid for objects that can rotate and bigger than one tile (Tetris)

I'm trying to check if there is a path between two locations in a Tetris board. On this question it tells how to account for different shapes: Path finding in grid for objects that occupy more than ...
0
votes
0answers
26 views

Grid board fill with special cells - predicting movement

I have to create an algorithm which will fill a board, which is made of square cells, with elements. Board can have different sizes and it doesn't have to be a square. Elements fall from top to ...
1
vote
1answer
33 views

Finding the “Important” nodes of a grid path

On a Navmesh Grid, all nodes are essentially vertices or turn-points so the returned path is efficient in that it only involves points where an entity must change its direction. A grid path, however, ...
0
votes
1answer
25 views

Analyzing movement data for a checkerboard

For a psychology experiment - subject has to learn that the 2D grid is a checkerboard, and collect all the 1s (rewards). How do I test if subjects are actually doing it in the most optimal way -- ...
0
votes
2answers
51 views

Calculate land center on grid

I have a grid based game. The main map is 2d array with land ids, something like this (here are 2 lands on the map, one formed where the 1's are and one formed by where the 2's are): [ 1 , 2 , 2 ] [ ...
0
votes
1answer
44 views

Is there such thing as a hybrid View that combines SurfaceView and GridView in Android?

I am trying to develop several Android games that work on a grid system. I will need to update the game surface frequently, so using a GridLayout does not seem to be a good option. The frequent ...
14
votes
3answers
2k views

How to render infinite universe?

I'm curious what are the best practices in game development industry to render 3d universe? To be more specific: The data points are given and static. Each point has position, color and size; The ...
2
votes
1answer
65 views

Increment grid by rotation

I'm currently working on a grid for snapping objects side by side. My current script is working fine, but only for game objects which haven't been rotated. Here is an example video of the problem: ...
5
votes
3answers
127 views

Map building grid to planet

I'm trying to build a space game and one of the key parts is building on spherical planet. I want the buildings to be build on a grid (some building are 1x1, some 6x4,..., kinda like StarCraft). My ...
1
vote
2answers
155 views

How to detect collision of a wall with grid movement?

I have this little game, where my player is moving around a simple level, using a grid based movement script (See code below). My problem is that I have tried to implement a 2D raycast, which has to ...
1
vote
1answer
71 views

Finding flexible patterns in a 2D grid

I'm stumped trying to create a matching algorithm for my game. I have a 2D grid like this for example: 0, 0, 0, 0, 0, 0 0, 1, 2, 2, 1, 0 0, 1, 1, 0, 0, 0 0, 0, 2, 0, 1, 0 0, 0, 0, 2, 1, 0 0, 0, ...
0
votes
0answers
39 views

Grab all tiles within a radius?

I'm working on a 2D tile based game. I want NPC's to be able to destroy tiles, and ideally I would have a function, which takes a central x,y and then based upon a circular area from that point ...
1
vote
0answers
43 views

How do I recognize squares, rectangles … (like in TwoDots)?

I currently working on a small mobile game. Not a clone of TwoDots(!) but I need to recognize patterns like they do and I use the game as an example. How the game works? Players have to connect dots. ...
0
votes
2answers
85 views

In a grid based system, where users can build their own walls to create buildings, how do you determine which parts are indoors? [duplicate]

I've looked around for an algorithm to solve this problem, but I can't seem to find anything. In a game I am working on, data is held in a grid. Certain squares within that grid can be set as walls, ...
1
vote
3answers
138 views

Finding neighboring coordinates on offset tile map

I have a grid of hexagonal tiles. Every other row is slightly offset for visual reasons. Imagine a player touches any tile - I need to compare the coordinate of that tile, with any tile they touch ...
2
votes
2answers
102 views

Creating LOS zones on a 2D grid for chase AI

I have a 2D grid, around 20x20, stored as an array. Each grid cell can contain an opaque object or not. I also already have an algorithm to calculate LOS between any two squares via Bresenham. I want ...
0
votes
0answers
74 views

How to make a grid layout in Ruby (Gosu)?

So I'm attempting to make a simple Snake game. However, there's one major problem with that - I don't know how to make my playing field as a grid. So far I've split my snake into segemnts, which are ...
2
votes
3answers
169 views

How can I scale sprites and maintain visual quality?

I currently have an isometric grid. This grid contains tiles. Some of these tiles have 'tree' sprites sitting upon them. If I have my tree sprite loaded from a texture with a fixed resolution, when I ...
1
vote
3answers
135 views

How Efficiently preform collision detection in NxN rectangle grid

i have simple level that constructed from NxN rectangle grid some of the rectangles are walls and some of them are the path the player allowed to move only on the path they are also rectangle from the ...
1
vote
2answers
86 views

Simplify paths when a user builds

I am looking for some guidance on how to simplify my nodes on a path when a user builds on the fly. Imagine a path like this with a gap: Logically 3 nodes are required 2 connected one isolated. ...
1
vote
1answer
64 views

Implementation of finding an index in a 1D array for a triangular grid

Am using a while loop to find an index within a 1D array, is there an easier, less-time-consuming and/or mathmatical way to find the index? Consider the next grid: 4 o |\ | \ | ...
2
votes
2answers
116 views

How to find all the possible places to go on a grid?

Given the amount of steps you can take in a grid, how could I implement a way to get all the possible places a unit can go to, in a game like Advanced Wars? I have currently got A* path finding ...
4
votes
4answers
282 views

Storing walls that are between tiles

I am writing isometric engine in c++. I decided to take a more realistic approach and make walls occupy space between two tiles, not a single whole tile, as shown in the picture below (just like in ...
1
vote
2answers
627 views

How can I highlight and move to adjacent tiles in an isometric grid?

I trying to create a turn-based strategy game where you move a game object from one tile of a grid to another tile near it. I have created the grid using sprites and game objects but can't sort out ...
0
votes
1answer
198 views

Finding a moving target in a maze

I'm making a game that is a bit of a mix of snake and pacman. Basically, two players go through the maze and each time they pick up a piece of candy, a cube is added to their tail. If one player ...
3
votes
3answers
213 views

Is there algorithm for boxcasting or thickray casting?

I am not sure what the correct name is called but here is my problem: I have implemented a casting ray function that works as expected. However, because I am using a loose grid structure, (ie, objects ...
0
votes
1answer
71 views

2D Hitboxing on an HTML image [duplicate]

I want to make a turn-based game where the player is given "opportunities for attack." An image of the in-game sprite character appears when it's the player's turn to attack. The player can mouseover ...
1
vote
3answers
1k views

How to calculate corner marks of a rotated rectangle?

I've got two elements, a 2D point and a rectangular area. The point represents the middle of that area. I also know the width and height of that area. And the area is tilted by 40° relative to the ...
1
vote
1answer
90 views

Design question: best way to model and visualize a long grid of data [closed]

Perhaps some noob questions for a scientific application that you can assist with: I am trying to render a large, evenly spaced grid of data in 2D. The full data set dimensions could be anywhere from ...
0
votes
3answers
103 views

How to move around in a map and remember position?

I am working on sound labyrinth game. My game is about a person getting trapped in the basement and the only way to navigate and get out is through sound. I have created a map over the basement and ...
3
votes
1answer
173 views

Aligning pathfinding to the center of tiles?

I'm looking to achieve tile by tile movement in a project I'm working on. I employed the use of the asset Simply A* Path-finding to allow a unit to navigate the terrain. Since the tiles are ...
2
votes
4answers
337 views

Is moving entities between sectors of a grid spatial partitioning inefficient?

I'm using a grid system for spacial partitioning. If I have moving entities, will I have to reassign every entity to its correct section every frame? Surely this is inefficient. Have I got the wrong ...
1
vote
2answers
399 views

How would I go about making a movement system like Mario Party?

Main question How would I go about getting a movement system similar to the one they have in Mario Party only minus the dice roll? Things I have researched I have been studying the uses for ...
5
votes
3answers
868 views

A star pathfinding and discrete/smooth positions

The A* (A-star) algorithm usually represents a path on a grid. Once a path has been found, however, the path looks blocky and is not suited if you move your units with floating point datatypes. Here ...
8
votes
3answers
1k views

How do I generalise Bresenham's line algorithm to floating-point endpoints?

I'm trying to combine two things. I'm writing a game and I need to determine the grid squares lying on a line with the floating-point endpoints. Moreover I need it to include all the grid squares ...
-1
votes
1answer
545 views

How are grids made?

I've been looking at tutorials and researching forums and such but I still can't understand how the grids are made. I get confused at parts like this. for (int x = 0; x < Size.x; x++) { for ...
2
votes
1answer
601 views

what is the simplest way to get player selection system like checkers in unity 3d c#

like lets say the board is a top down grid like if your were in front of an actual checkers board i want to figure out how i would be able to select/deselect a piece then select/deselect a space on ...
5
votes
1answer
268 views

AI, Pathfinding - Searching Behavior

I'm developing a top-down 2D game mostly based off a tilemap/grid. The player will be able to build structures on this grid while other objects like vehicles will move around freely. I've been working ...
0
votes
0answers
17 views

Help with Interactive Grid for Turn-Based-Strategy game [duplicate]

So right now I have all of the menus, and game saving/loading stuff done, but I need help creating my actual game. I have a basic idea of what I want the game to be like. But I just need help with the ...
2
votes
2answers
157 views

AI and shapes in 2D Grid

I'm working on a grid- and turn-based strategy rpg. My problem is concerning finding best position for my AI to use a skill. But lets start at the beginning. My plan is to make each skill an action ...
5
votes
2answers
272 views

Inconsistent movement / line-of-sight around obstacles on a hexagonal grid

In a roguelike game I've been working on, one of my core design goals has been to allow the player to "Play the game, not the grid." In essence, I want the player's positioning to be tactical, ...
0
votes
2answers
267 views

2D Tile Collision free movement

I'm coding a 3D game for a project using OpenGL and I'm trying to do tile collision on a surface. The surface plane is split into a grid of 64x64 pixels and I can simply check if the (x,y) tile is ...
5
votes
5answers
2k views

Technical differences between square and hexagon for a grid?

I'm developing a 2D city-building game and trying to decide on the type of grid. There will be vehicles, so the unit movement is important too. I know there are visual differences for using Squares ...
1
vote
1answer
118 views

Implementing movement on a grid

I have a simple snake game, where I have other NPC snakes on the field. How do I calculate the movement of those other snakes so that they did not hit walls, and each other? So far I have it like ...
0
votes
1answer
115 views

Bounding Box Collision Glitching Problem (Pygame)

So far the "Bounding Box" method is the only one that I know. It's efficient enough to deal with simple games. Nevertheless, the game I'm developing is not that simple anymore and for that reason, ...
0
votes
3answers
673 views

Line of sight on a 2d grid

I've been looking for similar questions here and on google, but none have worked for me yet. I have a game, where I have a 2d array of square tiles (they're objects with accessible x and y pixel ...
0
votes
1answer
146 views

Check legal movement on grid map

i'm trying to develop a simple multiplayer turn base game, i'm start creating the grid map, i have already write the javascript script to display the range movement for the specific unit, but my ...
1
vote
1answer
177 views

What's a clean way to find (up to) 3x3 squares within a 6x6 grid?

I have a 6x6 grid where every cell have a color property (simply integer value). Player can change one cell at a time to form rectangles of the same color inside of the grid. New rectangles can only ...
52
votes
7answers
6k views

Can I prevent diagonal movement from exploring more of the map?

In a tile-grid where movement in any of 8 directions takes exactly the same amount of turns (chess-board style rules), can I prevent diagonal movement from showing more new tiles than orthogonal ...
7
votes
3answers
775 views

Determine if a set of tiles on a grid forms an enclosed shape

Given a set of tiles on a grid, I want to determine: If the tiles make an enclosed figure If the tiles make an enclosed figure when you count the sides of the board as an edge of the figure If ...