# Tagged Questions

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

164 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 ...
83 views

### 3D Planetary gravity

so i am making a thing in javascript and i want to have planetary gravity in my "universe". But when i use an equation to calculate the acceleration by gravity i get one number. That is how fast the ...
135 views

### Positioning game object on a grid

I am learning how to code by programming easy, 2D games. Here I want to try to get only a map, like in strategy games (2D isometric) and put new objects (pictures) on it. In short: I want load a big ...
97 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 |\ | \ | ...
1k 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 ...
111 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 ...
230 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 ...
506 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. ...
77 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 ...
758 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 ...
1k 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 ...
559 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 ...
865 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 ...
2k 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: ...
905 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 ...
22 views

### Advice on mapping tiles to a height map/3D world

I've been attempting to think of a way to map tiles to a height map. Where a grid can be either layered or integrated into the world data. However, since I am not using voxels I could use some advice ...
25 views

### Optimize field of vision algorithm in a grid tiled map

I am trying to implement Field of View algorithm in my game and I followed the great tutorial here : sight-and-light and here is what I got so far : As you can see it works fine for me :) And then ...
22 views

### Concerns about using a 3D tileset grid

I'm thinking of implementing a 3D tile system for my engine, and tie it to it's world streaming system as well. As in, using it for it's terrain for an open world in an engine that theoretically can ...
36 views

### How Can I Detect Hex Edges and Corners for Catan Map?

The following messy code implements a decent hex map, but I have no way to detect edges and corners: function blankMap(\$scenario_array){ \$hexMap = null; \$hexCss = "<style media=\"screen\" type=\"...
35 views

### How to find grid cells not seen by an object

I am writing a VB.NET program. I have a grid view which is made of multiple small cells called grid cell. On the grid view, I have placed an obstacle (red box) and an observer (blue box). My task ...
78 views

### 2d grid vision(eye sensor) for a neural network bot?

I have a 2d grid and neural network bots living above it. What is a good way to give them vision of tiles in front of them? Below I describe my idea that I don't know how to efficiently(or ...
90 views

### Collision between complex polyominoes travelling at different velocities

My first post here if there's anything wrong please do highlight it :) First and foremost the problem I'm facing is practically identical to this earlier post here : Falling Blocks and complex shapes ...
116 views

### Unity: Can I use sprites for tiles to overlay a grid over a plane mesh?

I have a plane mesh in Unity. I have various other meshes on this plane (props) with tags that denote the areas under these props are unwalkable. I raycast, project and generate a grid on this plane ...
53 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. ...
147 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 ...
337 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, ...
987 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 mTMXtiledMap....
1k 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 ...
1k 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 ...
1k 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 ...
328 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 ...
385 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 ...
555 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 ...
73 views

### How can I use a data grid to make an isometric turn based game in GameMaker?

I am making a Hero Quest clone. It is a turn based adventure game with an isometric view point. So far I have been able to turn a 2D map into an isometric view but I believe I need to use a data grid ...
124 views

### how to avoid circular references between objects and map

I've been working on a turn based tactics game on a grid. I've been trying to figure out how to store and relate the grid and the objects on it. Essentially, my question boils down to how to ask ...
128 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, ...
96 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 ...
823 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 ...
5k 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 difficult ...
107 views

### Creating placement grid in Unity

I'm fairly new to C# and Unity, so I don't really know much about it. I want to create an RTS like game where you have a huge grid that the whole world is placed on. Then you can place houses, walls ...
60 views

### need a pathfinding algorithm from 1 column to another

grid contains weights and I need a max path sum from one column to another possible movement directions are (right, up & down only). Can Djikstra or A* help ??
33 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 -- ...
69 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 ] [ ...
141 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 ...
111 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 ...
396 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 ...
163 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, I'...
146 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 ...