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

learn more… | top users | synonyms

0
votes
2answers
64 views

Generate a 2D distance grid in one pass

I'm trying to generate a 2D grid, for use in navigation, where each grid point holds the distance to the nearest obstacle (such as impassable terrain, or a constructed building). So for example, a ...
0
votes
2answers
83 views

Unity Grid System

I'm creating a tower defence game and I've been struggling on one of the core parts of the game. What I'm trying to do is create a plane that the user can clink on and build a tower at that location. ...
1
vote
1answer
44 views

How can I assist players navigating narrow grid junctions?

I'm looking for a technique to help the player navigate a narrow path while the character is in constant motion. When changing direction in junctions, it's pretty hard to time the direction change for ...
6
votes
3answers
230 views

How can I calculate “All squares within R” in a natural looking manner?

I'm working with a square grid, and I have a couple of effects that target all squares within R; in other words, a circular (or spherical) effect. But, circles being, well, circular, and squares ...
3
votes
3answers
116 views

Using uniform grids for collision detection - Efficient way to keep track of what a cell contains

I was looking for an efficient way to implement collision detection in a 2D game. A way that won't result in an O(n^2) level of complexity. A lot of people recommend to use Uniform Grids for this ...
0
votes
0answers
42 views

How to implement Uniform Grid for collision detection

I want to implement a unifrom grid to use for collision detection in my 2D Java game. This way instead of checking for each game object if it collides with any other object on the screen, I only check ...
3
votes
1answer
121 views

How to create a grid based on random shapes?

How to create a "grid" using actionscript like the image below? Basically you have an area of 1100x615 which should be filled with shapes that could be rotated and scaled... Collision detection ...
6
votes
1answer
177 views

Square Grid Polygonal Terrain Query algorithm?

I have a square, fixed-grid terrain with one terrain type per grid unit in my game, and I want to do an arbitrary polygonal terrain query which returns all of the grid units enclosed/intersected by ...
0
votes
1answer
43 views

Triangular grid and rendering to a texture (Direct3D 11)

Is it possible to render vertex data from a triangular grid into a texture with a same size (i.e. 3x3 vertices to 3x3 pixels - each pixel is representing one vertex)? Consider following situation. I ...
-1
votes
1answer
71 views

Grid based Collision Detection between circles [duplicate]

I am working on a 2d arcade game where I have 5 types of circles with different sizes: The ship, the missiles, and 3 types of monsters. This is what it looks like: Currently I'm using brute force ...
0
votes
1answer
205 views

How to implement uniform grids

Up until now, I implemented all-against-all collision detection in my games. It worked fine. But I reached a point where implementing this kind of collision detection, makes the game run poorly, ...
0
votes
0answers
77 views

Obstacle generation on a grid

I have a 2D grid. I'd like to place items and obstacles randomly. I also have a starting point. My main goal is to place the obstacles in a way that all the items are still collectable. What is the ...
1
vote
2answers
208 views

Filling in gaps in a grid

I have a set of terrain sprites available to represent terrain: Flat North-South Straight Cliff (x 2 allowing for slope direction either way) West-East Straight Cliff (x 2 allowing for slope ...
1
vote
1answer
80 views

Where can I find info on grid based algorithms for stateless AI? [closed]

There seems to be an overwhelming amount of info out there on AI of all kinds, and it's kind hard to digest at once. For my testing purposes, I'm creating a "typical stateless AI", as described in ...
0
votes
1answer
103 views

What size textures do I need for a 2D grid based game if my tiles are larger than textures I have?

I'm building a grid-based game for iPad, and for usability purposes I've selected my game grid to be built of 75x75 squares. However, so far I've seen that the majority of (free)texture catalogs I can ...
0
votes
1answer
132 views

Overlaying grid for pathfinding

I have a simple problem. My game is not grid-based, so units can be at any arbitrary coordinate and move at different speeds. My obstacles are all rectangular and axis-aligned, so naturally it makes ...
1
vote
2answers
131 views

Show a range grid movement as3

How do I show range of grid movement in AS3? When player controls a character and chooses "move" options, the grid of movement will be displayed as 3 grid of X, 4 grid of Y (Both sides, + and -). So, ...
1
vote
1answer
251 views

Grid-Based 2D Lighting Problems

I am aware this question has been asked before, but unfortunately I am new to the language, so the complicated explanations I've found do not help me in the least. I need a lighting engine for my ...
9
votes
2answers
266 views

Falling Blocks and complex shapes

I currently have a simple Tetris-like game and have come across a problem I cannot solve. Unlike Tetris where there is a single falling shape, I have multiple, potentially interlocking shapes that ...
2
votes
1answer
273 views

Path finding in hex grid based game

I'm making a TBS with hex grid. Player can move units from one hex to another using bridges, which will be randomly generated. I'm using cubic and axial coordinate system for my grid, it's well ...
0
votes
0answers
52 views

Tetris-like wall-kicking not working [duplicate]

So I'm making a falling-block puzzle game. It's not a Tetris clone, but the block clusters move in a similar fashion. I want to make it so that if you rotate against a wall, or against another ...
2
votes
2answers
1k views

How to code a Game Grid in Java?

Suppose I wanted to code a game grid in java. Not an abstract text one but an actual grid with graphics and 'cells'. Would I have to draw line by line or is there a more efficient way? Also how would ...
0
votes
2answers
320 views

Roguelike corridor creation; Connecting rooms

I have a simple Tile[,] that I populate with Rooms. Now I need to connect the rooms with a single tile wide corridor. At first I used A* to hook up the rooms but that, of course, get's the best path ...
1
vote
4answers
111 views

Storing tile grid in a matrix: row major vs column major

I'm using a generic matrix container to store the tile grid for my RTS game. This is where I am confused: a matrix is traditionally row major, i.e. matrix(0, 10) means 'at 0th row, 10th column.' A ...
25
votes
5answers
1k views

Simulating pressure in a grid based liquid simulation

I have a 2D grid based water system in my XNA game, we have a method using cellular automata to simulate water falling and spreading. Example of water flowing down a slope: Each tile can contain a ...
1
vote
1answer
398 views

Efficient Way to Draw Grids in XNA

So I am working on a game right now, using Monogame as my framework, and it has come time to render my world. My world is made up of a grid (think Terraria but top-down instead of from the side), and ...
13
votes
4answers
1k views

Optimizing collision engine bottleneck

If this is your first time on this question, I suggest reading the pre-update part below first, then this part. Here's a synthesis of the problem, though: Basically, I have a collision detection ...
0
votes
1answer
339 views

Grid Based Lighting in XNA/Monogame

I know that questions like this have been asked many times, but I have not found one exactly like this yes. I have implemented a top-down grid based world in Monogame, and am starting on the lighting ...
0
votes
1answer
330 views

How can I create a tile-based game map from a large source image?

I'm trying to make a huge tile-based map for my game. I've authored a large source image of the map and saved it, but now I'm unsure how to break this up into tiles and render it as a grid so I can ...
-1
votes
1answer
104 views

Ray picking gives inversed results

I'm trying to do a simple ray picking implementation to allow a user to select a cell in a grid rendered in 3D. I'm almost there, but I've ran into an issue which I can't seem to solve. Consider the ...
1
vote
1answer
545 views

C++ How to implement a spatial hash (for a 2d Game)

I feel kind of silly for asking this question, but are there examples or tutorials on how to implement a spatial hash (grid/cell-based partitioning), preferably in C++? I'm stuck and I have no idea ...
1
vote
2answers
347 views

Converting hexagon grid coordinate system

As I have been building on a RTS game based on hexagon grid built in javascript. I stumbled across a problem regarding the coordinate system. Have been trying to implement a A-star system to find ...
1
vote
2answers
458 views

Algorithm for exploring/filling grid map

I'm working on a small game that takes place on a grid map. I'd like to write an AI that is able to explore the grid map by filling as much of its available space as possible. From any given position ...
-1
votes
1answer
171 views

Refering to an object from an array in Java [closed]

In my game, the whole thing is based off of grids. So the map is a dual dimensional array of 32 (32 x 32 grid map). Now what I want to be able to do is to grab a grid and be able to access it and ...
22
votes
4answers
2k views

Why don't we use octogonal maps instead of hexagonal maps?

I understand the advantage of hexagonal tiles over square ones. But why aren't octagons used instead? I would think they would provide better, more natural movement in eight directions. I was ...
4
votes
2answers
239 views

Grids and vertices

I have no idea what this is even called or even to start searching how to solve this problem. So figured I would post here for any information at all. Specially looking for already known solutions to ...
0
votes
1answer
436 views

How do I make an entity move once per second in crafty.js

I am trying to implement "Snake" using crafty.js but I can't seem to get the snake entity to move just once in a second. How do I do this?
8
votes
1answer
134 views

Flowfield density conversion

I'm trying to implement flowfield navigation, as described in http://grail.cs.washington.edu/projects/crowd-flows/ but I can't understand how the Density Function in Figure 4 of the paper is supposed ...
1
vote
1answer
131 views

Travelling in a 2D grid

I have a 2D grid (x,y coordinates) where each cell corresponds to each pixel of the interface that I am working with and I have a point A(x1,y1). Now I need to travel around in the grid, and I wont ...
13
votes
1answer
760 views

Get ring of tiles in hexagon grid

Thanks to this post I'm able to collect adjacent tiles to a given tile. But I'm pretty much stuck on an algorithm that gives me only a "ring" of tiles specified by an offset. The algorithm given in ...
0
votes
1answer
582 views

How to attach a sprite to a TMXTiledMap at a particular coordinate, in AndEngine?

I am trying to add a sprite at a "grid" location on the tiled map. The TMX tiled Map is like a grid, and you can access the size of the grid by calling mTMXtiledMap.getTileRows() and ...
3
votes
1answer
319 views

Fluid Particle Grid

So recently I have been looking at some fluid simulation techniques, specifically Smoothed Particle Hydrodynamics. One of the key components is a grid to avoid O(n^2) searches. I have been having some ...
14
votes
2answers
326 views

Territory patrol planning

I am developing a game/simulation where agents are fighting for land. I have the situation shown in the picture below: These creatures are walking around and occupying pieces of land they step on ...
-2
votes
1answer
155 views

In a regular grid, how can I tell which tile a position is in?

I have a position on the screen, how do I calculate which grid tile that position is inside? I know the number of tiles in the grid, and the size of the screen (including how many tiles fit on it ...
4
votes
1answer
2k views

More efficient way to implement Line of sight on a 2d grid with ray casting?

Consider a 2d grid of tiles, and an approximated sphere of coordinates - centered on the player - that represents line of sight. The goal is to block the line of sight beyond obstacles (ie walls). ...
4
votes
2answers
1k views

Simulating “line of sight” with obstacles on 2d grid?

Ran into an interesting problem. I need to figure out how to simulate line of sight - simple enough, just on a 2d grid with obstacles. Either a grid cell is visible, or it's not. I can get something ...
5
votes
1answer
253 views

Finding cells between two points (along line) to finding obstacles

My game is in 3D environment partitioned with 2D grids in 2 dimensioned array So I can get any cell/node by passing row and col like return _nodes[r][c]. When the an attacker attacks an enemy with ...
3
votes
2answers
315 views

AI remembering obstacles without a grid

For some research purpose I've build a small tanks game where you have 1 tank controlled by a player and one or more NPC tanks. Now I want these NPC tanks to navigate through a field which they have ...
2
votes
3answers
1k views

How do I code a 2D tile map? [closed]

I'm new to game development and I want to know how to create a tile map. The map should be divided into squares, such that each square represents a location like x : 10, y : 10. The width and height ...
6
votes
4answers
1k views

Generating triangles from a square grid

I have a 2D square grid of values representing terrain elevations, and I want to generate triangles from that grid to make a 3D view of the terrain. My first thought was to split each square ...