Patterns of identical shapes (often squares or hexagons) that have no gaps. They usually represent the playfield in various games.

learn more… | top users | synonyms (1)

-1
votes
0answers
16 views

What does this piece of Tiled C++ code do? [migrated]

I'm trying to figure out the purpose of this piece of code, from the Tiled utility's map format documentation. const int gid = data[i] | data[i + 1] << 8 | ...
0
votes
0answers
26 views

Collision in Tiled Map - LibGDX

I have collision code that deals with left or right or top or bottom. I am using Tiled Map with LibGDX. Question is: How do I detect collision with other cells by all 4 sides, and not specifically ...
1
vote
4answers
213 views

Cell Lighting Propagation Problem

I have in place a cell-based lighting system that works basically like this: (Not my actual code) //Light moves up for (int x = 0; x < width; x += 1) { for (int y = 0; y < ...
0
votes
0answers
32 views

Data structure for storing game objects in a tile based game [closed]

This is my first time developing a game using C++, so I want to do it right. I decided to start with a tile based game since it has always seemed simpler to me. Previously the way I managed objects ...
1
vote
1answer
54 views

How can I communicate changes to a 2D tile-based world state in a P2P context?

Suppose two players in a game want to build a city together on a blank tile-based game world simultaneously in a peer-to-peer connected context. When a player clicks on a tile it changes the state ...
0
votes
2answers
96 views

Collision detection via adjacent tiles - sprite too big

I have managed to create a collision detection system for my tile-based jump'n'run game (written in C++/SFML), where I check on each update what values the surrounding tiles of the player contain and ...
0
votes
1answer
54 views

Possibly a more efficient way to structure my game's map?

I need a little help with structuring my map. I want to make it efficient but I'm not sure if there's a better way to do this: public class Map { Chunk[][] Chunks; Object[] Objects; } public ...
0
votes
0answers
31 views

Rendering bug in java

I'm using a simple rendering method in java to render tiles. Everything looks fine, but I notice that some rows grow 1 pixel when I move, and dhen shrink back, but I have no idea why. Infos: I'm ...
1
vote
2answers
37 views

(LibGDX) Changing Origin of Box2D World relative to TiledMap (or Vice Versa)

I'm playing around with Box2D and TiledMaps and I've come across this minor annoyance. As you can see, both Box2D and TiledMap render at the center of the screen. This forces me to compensate by ...
0
votes
1answer
38 views

How can I get the object layers from a .tmx file in libgdx? [on hold]

I can load in my .tmx map fine using TmxMapLoader().load. My test map has three layers ("layer1," "layer2," and "layer3"). There are also two oject layers named "platforms" and "obstacles." I have ...
0
votes
1answer
94 views

Should I use tiles in a snake game? [closed]

I'm building a simple snake game, which is my first game ever. I'm using LibGDX, which is Java-based. I've looked at the Tiled Map Editor, but I don't know if it is necessary in a simple game like ...
0
votes
0answers
49 views

Working with tiledata of different sizes [duplicate]

I recently bought an asset for my game, basically a tilesheet, with seperate pngs as well, but where as previously I've created tilemaps out of identically sized tiles these are all in varying sizes ...
0
votes
1answer
288 views

How to compute tile offset for different isometric angles?

I am working on an isometric game and the designers want to use a different isometric angle than the default one, where I simply had to do a 2/1 offset based on tile size. I know what the new ...
0
votes
1answer
127 views

Units, Layers, and Isometric Ordering

I'm currently using LibGDX and Tiled map editor to render isometric maps. I'm having a two related difficulties. The first issue is, when do I render units that will end up changing position often ...
-2
votes
2answers
229 views

Why can't I set a single value in a game map Java 2D array? [closed]

I'm trying to set one character on 2D array. map[0][2] = "0"; However, I'm getting 11011 11011 11011 11011 ... I was expecting 11011 11111 11111 11111 ... What am I doing wrong? another ...
9
votes
2answers
541 views

How can I randomly generate 2D tile-based side-scroller terrain?

I want to randomly generate a map for a 2D sidescroller game using the following tileset: I have found a few great articles on the bitmasking process, for example: ...
12
votes
3answers
1k views

Why are there lines in between my tiles?

I'm making a top down XNA game. The maps are created by tiles. A problem I recently noticed is a 'grid' of lines between the tiles. It only shows up sometimes and only depending on the camera ...
0
votes
1answer
339 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
1answer
58 views

How can I use the same number of tiles in any screen resolution, with an isometric projection?

I have an isometric grid with 64x32 diamond images. Each tile is a class, each instance is in a 2D array. Players have different screen resolutions and the grid must take up the whole screen. ...
3
votes
2answers
237 views

How can I “grow” regions representing countries in a 2D grid?

My friend started to make a 'country-generator' type of thing. We have some starting points, and we want to 'grow' countries from them randomly until the whole area is filled. What's is an effect ...
0
votes
2answers
83 views

Algorithmic error in tile engine? [closed]

I'm toying with creating a tile-based 2D java game engine. I can render the "local" area without issues(I.E. deciding which local tiles to render). The problem came when I introduced floating point ...
1
vote
1answer
65 views

Get Tile Location On Screen (Java Slick and Tiled2D)

I want to create a rectangle around each tile that's blocked value = true. How can I find the X and Y (on screen) coords of the each individual Tile?
-1
votes
2answers
133 views

How do I draw tile in a side-on perspective? [closed]

All the tutorials I've found regarding using tiles in game engines refer to games with an isometric or top-down view, much like this: I want to make a "beat em up"-game, where the view is tilted. ...
-1
votes
1answer
95 views

java tile based game :tile lag fix

hi I have a game where it reads a txt file and loads a map 0 represents air and 2 represents dirt I have a class for each tile as well as a tilemap I will show u my code. the problem is it lags like ...
0
votes
1answer
130 views

How to find a free patch of area in a tiled map?

I've been trying to formulate the question and try to find some information on Google, but didn't managed to, so here it is... We've got a nice tropic-themed game that is about to be released soon, ...
0
votes
1answer
41 views

libgdx get the value of a key

I'm trying to do collision detection (which I have working well) but now I want to use it for a little more. I want to check special circumstances for the collision. Right now I'm checking for ...
2
votes
4answers
1k views

Hide collision layer in libgdx with TiledMap?

I'm making a 2D game with libgdx, and I'm using its TileMapRenderer to render my map which I have made in the map editor Tiled. In Tiled I have a dedicated collision layer. However, I can't figure out ...
0
votes
1answer
156 views

Reduce render time for a tiled map in ThreeJS

I'm working on a WebGL game using Three.js, its been a few days and I found my first issue, render time on big maps. The game runs great, there are even some AI mobs that run around randomly like ...
-2
votes
1answer
45 views

Using an image instead of a colored rectangle

I recently watched a video on how to do tilemaps in java. He has the tiles as colored rectangles. I want them to be images. My code: public void draw(Graphics g){ for(int row = 0; row < ...
2
votes
2answers
403 views

How would I implement procedurally generated tiles in libgdx?

I'm creating a simple top down Zelda-esque game in libgdx, and I want to implement tile-based dungeons that are procedurally generated, similar to this. Libgdx does have a class called TiledMap which ...
0
votes
2answers
136 views

How to get surrounding tiles in a tile array

I've created a tiled map that holds two layers, one for the tile type, and the other for whether it is solid or not. I plan on creating very big maps, and checking every tile seems like it would slow ...
3
votes
1answer
218 views

Collision detection for sloping tiles

I've been looking into adding 'sloping' tiles into my platform game and my first attempt at collision detection with these tiles has produced some promising results (considering it's a first attempt), ...
1
vote
4answers
124 views

What is the definition of “tiles?”

When we talk of tiles, are we strictly talking about images or the underlying data structures? For example, I read an article which explains that tiles are a data structure that holds your game data. ...
2
votes
2answers
744 views

How do I create curved ground in a 2D runner game?

If I use tiled based map I can have only rectangular objects. What is a strategy for creating slanted or curved ground in that case? Should I use a tile-based map, or should I define corner points ...
0
votes
0answers
29 views

Selecting a range of hex tiles within radius of main tile [duplicate]

What im doing is pretty new to me, or at least i think it is, so I'm not really sure of what im looking for. Hopefully someone here knows =-) Using a grid of hexes I generate, i can hover over any ...
7
votes
2answers
422 views

Deferred tiled shading, tile frusta calculation in OpenGL

I'm trying to do deferred tiled shading in OpenGL using the compute shader but I have hit a snag when trying to create the frustum for each tile. I'm using AMD's Forward+ demo (written in D3D) as a ...
1
vote
3answers
181 views

How do you create your own tileset?

I'd like to create a 2d platformer and I understand that using tiles helps you a lot. I think many use the map editor "Tiled" but I can't find anywhere how do you make your own tileset from a given ...
0
votes
0answers
38 views

Should tiles in a tile-based game draw themselves? [duplicate]

I'm a beginner in game programming, and I want to start with Java (in which I have a strong background I think) and LWJGL. I want to create tile-based games. Let's say I have an object named Tile, ...
2
votes
1answer
259 views

How to split a 2D sprite tile set into individual sprites?

I see a lot of sprite catalogs for games provided as single PNG image, like the one below. I'm interested if I have to manually create tiles from that, or if there's some program that can split it ...
0
votes
1answer
104 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

Efficient approaches to updating adjacent grid tiles when one tile is disabled?

I'm trying to update the surrounding grid of tiles if one of them is disabled (not removed). For example, imagine we have a grid of tiles each with x representing one texture: x, x, x, x, x, x x, x, ...
3
votes
1answer
207 views

Auto-tiling with Yoshi's Island style tiles

I'm creating a 2D platformer and I'd like to implement an auto-tiling system. Normally, this wouldn't be particularly difficult. However, I'd like to have tiles like in Yoshi's Island, where the ...
1
vote
1answer
232 views

Detecting tile with height in isometric game

I'm trying to create an isometric tile-based game (for iPhone) and I'm having trouble with height in tiles. What I currently do (without heights) is apply some mathematic transformations to my ...
0
votes
1answer
70 views

Map editor undo function - Not actually setting values to tiles

I'm currently attempting to implement an undo/redo function for my map editor for a tile-based 2D platformer game made with XNA. I've found a lot of resources online about this and decided to try to ...
3
votes
2answers
367 views

Need to produce an animated texture of Water where each image tiles in all directions

I need to produce a 2D 'animated' texture of "water" for a game in which each image tiles in 'all' directions, much like those produced by the Caustics Generator, but with the power and flexibility of ...
0
votes
1answer
192 views

Roguelike Map Structure [duplicate]

I'm working on a roguelike and would like to know how to structure my map data. I suppose this question could also be extended to any sort of top down 2d game. Anyways! My game will contain object ...
2
votes
1answer
235 views

Fitting tilemap to any screen resolution

My game is a 2D Single-Screen (i.e. non-scrolling) platformer for Android, but the question here doesn't require a code-specific answer. Basically it's easier for me to show the problem using a ...
1
vote
1answer
173 views

How many VBOs should I use and should I keep a copy of their data?

Firstofall, I am sorry if my question is to broad. I am developing a tile based game and switched from those gl.Begin calls to using VBOs. This is kind of working allready, I managed to render a ...
8
votes
2answers
341 views

Diagonal line of sight with two corners

Right now I'm using Bresenham's line algorithm for line of sight. The problem is I've found an edge case where players can look through walls. Occurs when the player looks between two corners of a ...
2
votes
1answer
204 views

Tiled Editor: How is this Map Handling Collision?

BrowserQuest map in question. From what I understand, with tiled, there are two main ways to specify collision: Create an object layer, and interpret the shapes in the engine as collision objects. ...