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

learn more… | top users | synonyms

2
votes
1answer
2k views

Any way to set up a grid for a board game in cocos 2d?

My first idea was to create a 2d array for my columns and rows, but it seems like there should be a better, or possibly cleaner, way to achieve this. Each square on the grid is going to have a ...
2
votes
2answers
132 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 ...
2
votes
2answers
2k views

How can I snap a game object's position to a grid?

I'm making a game that involves "falling block" gameplay elements. The problem is, I'm not quite sure how to make it so that the blocks will snap to some kind of grid, in other words, I'm not sure how ...
2
votes
1answer
9k views

What is grid in Unity and how can I implement it?

I'm a beginner. I need to place a grid on my map in Unity and would like to access it to place a simple object on mouse click. How can I achieve this ? I am unable to understand the grid ...
2
votes
2answers
2k 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 ...
2
votes
1answer
924 views

Help with a Fast 2D Grid-Based world rendering technique

First I'm going to give you my current situation and explain what I'm attempting. I will then pose my question below. I will attempt to include a "TL;DR" for those of you who prefer things to be ...
1
vote
2answers
474 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
412 views

Get position of tile in tileset

Take this image: http://ScrnSht.com/nkvusq How can i get the position of tile 14 (or any other) when only knowing the following: Tile ID: 14 Rows: 4 Columns: 7 The end result should be 2x4.
1
vote
1answer
365 views

Getting fastest path on a grid

How would I go about finding the fastest path to connect two points on a grid? I'm making a 2D game and the map is based around a grid. I need to be able to account for any blocked tiles that the ...
1
vote
2answers
2k views

How can I make a tile appear on top of another without completely blocking the tile below?

Making a small RPG with libdgx just for learning about how to draw tiled maps and move around in them. I've got the tiles drawn and OrthographicCamera stuff figured out so I can see my world. My ...
1
vote
4answers
158 views

Logic that can traverse all possible layouts, but not checking every combination of identical pieces?

Suppose we have a grid of arbitrary size, which is filled by blocks of various widths and heights. There are many 2x2 blocks (meaning they take a total of 4 cells in the grid) and many 3x3 blocks, as ...
1
vote
2answers
674 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
vote
1answer
2k views

How do I match and clear sequences 3 adjacent coloured blocks?

I'm making a game with elements of a match-3 puzzler (such as Columns, Bejeweled or Tetris Attack). I don't know where to begin creating an efficient algorithm for matching and clearing. My ...
1
vote
1answer
89 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 ...
1
vote
2answers
253 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
4answers
139 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 ...
1
vote
1answer
138 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 ...
1
vote
1answer
127 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 ...
1
vote
1answer
64 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 ...
1
vote
1answer
481 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 ...
1
vote
1answer
638 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 ...
1
vote
1answer
346 views

Creating an interactive grid for a puzzle game

I am trying to make a slitherlink game, and am not too sure how to approach creating the game, more specifically the grid structure on which the puzzle will be played on. This is what a empty and ...
1
vote
1answer
647 views

Drawing 2D Grid in 3D View - Need help with method

I'm trying to draw a simple 2D grid for an editor, to able to navigate more clearly around the 3D space, but I can't render it: Grid2D class, creates a grid of a certain size at a location and should ...
1
vote
1answer
1k views

Displaying a grid based map using C++ and sdl

I am trying to create a roguelike game using c++ and SDL. However, I am having trouble getting it to display the map, which is represented by a 2d array of a tile class. Currently, my code is this: ...
1
vote
1answer
673 views

terrain grid rendering problem

I'm using DirectX 9 and attempting to write a simple terrain generation object. I'm running into trouble with the rendering - I'm hoping that this is a common problem, and someone could spot the ...
1
vote
1answer
96 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 ...
1
vote
2answers
175 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
2answers
876 views

Reference a single 2d Rectangle in an array

What I am attempting to do probably has a very simple answer but I can't make heads or tails of it no matter how hard I try. Provided I'm a newb. What I am trying to do is after I create a grid of ...
0
votes
3answers
232 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
2answers
846 views

OpenGL align grid like glOrtho but with gluPerspective?

Using gluPerspective makes OpenGL's grid really messy and rather hard to use especially when trying to do mouse input. The grid that perspective uses is completely messed up compared to the grid you ...
0
votes
2answers
127 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
1answer
140 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
399 views

Alternatives to NSMutableArray for storing 2D grid - iOS Cocos2d

I'm creating a grid-based iOS game using Cocos2d. Currently the grid is stored in an NSMutableArray that contains other NSMutableArrays (the latter are rows in the grid). This works ok and performance ...
0
votes
1answer
288 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
2answers
443 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 ...
0
votes
1answer
3k views

Basic A star implementation tutorial [duplicate]

Possible Duplicate: Pseudo-code examples of A*? Hey guys Iam making a TD game and now I am stucked in implementing A star algo. I know there are many 3d party softwares but they are ...
0
votes
2answers
112 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 ...
0
votes
1answer
60 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
2answers
192 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. ...
0
votes
1answer
67 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 ...
0
votes
1answer
450 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
382 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 ...
0
votes
0answers
14 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 ...
0
votes
1answer
81 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 ...
0
votes
0answers
69 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 ...
0
votes
0answers
88 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 ...
0
votes
1answer
163 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 ...
0
votes
0answers
54 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 ...
0
votes
1answer
571 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?
0
votes
1answer
693 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 ...