Tagged Questions

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

learn more… | top users | synonyms

0
votes
0answers
18 views

some images on grid are not being displayed using random . [on hold]

So I have an image that is going to be presented in a grid in random spots and I have a 2d array that will check if a position in the array is available or not. the problem is that not all images are ...
0
votes
1answer
44 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 ...
0
votes
3answers
69 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
70 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
90 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 ...
2
votes
0answers
74 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
290 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
votes
2answers
113 views

how would I go on 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 on mario party only minus the dice roll things i have researched so I have been studying the uses for ...
2
votes
3answers
343 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 ...
7
votes
3answers
449 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
171 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
210 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
195 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
16 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
144 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
133 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
145 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
1k 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
92 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
73 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
297 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
93 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
145 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 ...
51
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 ...
6
votes
3answers
289 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 ...
0
votes
2answers
145 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
251 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
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 ...
6
votes
3answers
273 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
219 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
79 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
241 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 ...
7
votes
1answer
256 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
72 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
237 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
304 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
93 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
256 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
102 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
163 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
173 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
193 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
542 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
334 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
637 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
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 ...
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 ...
0
votes
2answers
494 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
148 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
2k 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 ...