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

16
votes
1answer
5k views

Isometric rendering and picking?

I've been looking for a formula to plot (world->screen) and mouse pick (world->screen) isometric tiles in a diamond-shaped world. The ones I've tried always seem to be, well, off. What's the ...
36
votes
3answers
15k views

Random map generation

I'm starting/started a 2D tilemap RPG game in Java and I want to implement random map generation. I have a list of different tiles, (dirt/sand/stone/grass/gravel etc) along with water tiles and path ...
15
votes
3answers
15k views

How can I create a random “world” in a tile engine?

I am designing a game that is working on a classic tile engine, but whose world is generated randomly. Are there existing games or algorithms that do this? The procedural generation algorithms I have ...
79
votes
9answers
23k views

How do you generate tileable Perlin noise?

Related: Simple noise generation Understanding Perlin Noise I'd like to generate tileable Perlin noise. I'm working from Paul Bourke's PerlinNoise*() functions, which are like this: // alpha is ...
2
votes
2answers
3k views

Loading and unloading “chunks” of tiles in a 2d tile engine with 2d camera

I am making a 2d tile based game in C# and XNA 4.0. I am having trouble loading and unloading "chunks" of tiles(blocks). The whole world is randomly generated and is infinate on both axis. How would I ...
6
votes
1answer
5k views

What is a good technique for 2D tile-based terrain generation meeting these requirements?

As a summer project I decided it would be fun to make a Flash game. Right now I'm going for something like the look of Terraria. It's been a lot of fun, but today I've hit a snag. I need a way to ...
8
votes
8answers
4k views

How do I prevent my platformer's character from clipping on wall tiles?

Currently, I have a platformer with tiles for terrain (graphics borrowed from Cave Story). The game is written from scratch using XNA, so I'm not using an existing engine or physics engine. The tile ...
6
votes
1answer
1k views

Finding out which tile a mouse click landed in

I am working on an isometric grid based game and im having an issue trying to link a mouse click from the user to a tile. I have been able to split the problem into 2 parts : Finding a rectangle ...
7
votes
5answers
4k views

Best technique for drawing isometric tiles

I'm thinking about making a simple isometric game with HTML5 Canvas, and wondering what's the fastest way to render the tiles. Since the tiles are diamond shaped, but drawImage draws rectangles, I ...
12
votes
5answers
4k views

2D Level design/editing/saving questions

I thought about making a simple 2D Sidescroller game like SuperMario. Then i wondered about how to save, load or create the levels for the game. The first thing i thought of was drawing a simple ...
4
votes
3answers
8k views

2D Tile-based Collision Detection

I've been planning an indie game project for a while now. I'll summarise it for you so I can get right to the question. It's done entirely using the latest version of XNA through Visual Studio. ...
7
votes
2answers
477 views

Making a symbol appear on any colour

I'm developing an RPG/roguelike-style game. Instead of having maps like: ......... ......... ....@.... ...h..... Oh look, a dwarf. I was having solid background tiles, So sort of a tile based RPG ...
5
votes
2answers
2k views

How do I resolve a collision with two tiles at once?

I am having some problems with collision detection. I have 2 types of objects excluding the player. Tiles and what I call MapObjects. The tiles are all 16x16, where the MapObjects can be any size, but ...
25
votes
5answers
11k views

How to create a hexagon world map in PHP from a database for a browser based strategy game

I'm trying to create a hexagon world map for my PHP browser based strategy game. I've created a table in my database with the following data per row: id, type, x, y and occupied. Where type is the ...
28
votes
6answers
4k views

How can I design good continuous (seamless) tiles?

I have trouble designing tiles so that when assembled, they don't look like tiles, but look like a homogeneous thing. For example, see the image below: Even though the main part of the grass is ...
12
votes
4answers
15k views

Best Way to Create A Map for a 2D Game?

I apologize for the subjective "best" keyword. My friend and I have started creation of a 2D adventure game. It will be top-down in the style of pokemon or zelda (just the perspective). We have been ...
6
votes
3answers
5k views

Whole map design vs. tiles array design

I am working on a 2D RPG, which will feature the usual dungeon/town maps (pre-generated). I am using tiles, that I will then combine to make the maps. My original plan was to assemble the tiles using ...
10
votes
2answers
3k views

How do I tackle top down RPG movement?

I have a game that I am writing in Java. It is a top down RPG and I am trying to handle movement in the world. The world is largely procedural and I am having a difficult time tackling how to handle ...
8
votes
3answers
2k views

2D Top down view maps

I was wondering how this works. Do you load the complete map when the game starts up, or do you load parts of the map at runtime? And how would you save the maps? Would it be in XML or some binary ...
13
votes
2answers
1k views

How do you handle uneven tiles while rendering a tile map?

Here is what I want to do with my tile map that I am unsure of. As you can see the top walls are way larger then the bottom and side ones (this is also an issue with my corners which are odd shapes ...
10
votes
2answers
1k views

'Zoning' up areas on a large tile map, as well as dungeons

My game is having a map like that of Minecraft, in the way it's pseudoinfinite and randomly generated. And big. Say the user has explored a 1000x1000 zone (2D here), so that's 1,000,000 tiles. ...
2
votes
2answers
3k views

How to Create a Grid for a 2D Game?

So I'm currently writing the engine for my videogame. I've almost integrated Tiled (I think) so I should have a map-creator here soon. My question is, how do I actually make the grid? I'm really ...
11
votes
1answer
7k views

Tile sizes in 2D games [closed]

While developing a small game using tile-mapping method a question came to my mind: I would develop the game on Windows but wouldn't exclude adapting it to another platform. What size(in pixels) ...
6
votes
5answers
4k views

Alternative to 2D array in a tiled-map structure

After searching for a long time, I'm surprised this question was not asked yet. In a 2D, tiled-map game, how do you handle the map ? I'd be glad to have your point of view in any languages, though I'm ...
4
votes
2answers
3k views

Map tile terrain transitions with 3-4 different types

Making transitions between two different tiles is a fairly well understood problem. The easiest way is to look at the 0.5, 0.5 and use the resulting 4 corner points to select a transition tile, as ...
6
votes
1answer
4k views

Repeat texture in libgdx

How to fill region with repeated texture? Now I'm using next method: spriteBatch.begin(); final int tWidth = texture.getWidth(); final int tHeight = texture.getHeight(); for (int i = 0; i < ...
1
vote
2answers
871 views

How to calculate the direction a ball must bounce

I have a tile engine I have made. I can detect collision between the ball(the player) and the tiles. When a collision is detected all the colliding tiles are stored inside a list. My question now is, ...
6
votes
3answers
488 views

Finding possible moves for an entity in a 2d tiled game

I'm having issues coming up with a specific search term for this, but how would one go about finding the possible moves in a 2D turn-based strategy game (i.e. FF:Tactics, Fire Emblem, Advance Wars). ...
2
votes
2answers
867 views

How do I find which isometric tiles are inside the cameras current view?

I'm putting together an isometric engine and need to cull the tiles that aren't in the camera's current view. My tile coordinates go from left to right on the X and top to bottom on the Y with (0,0) ...
11
votes
1answer
4k views

How can I define a complex collision area on top of a tile map?

As many people recommended, I am using Tiled map editor to create a map for my game and it's great particularly because libgdx framework also provides with API for maps from Tiled. I understand I can ...
25
votes
3answers
3k views

Random seed function for map generation?

I am looking for a function to generate a random tile-based map as the visual boundaries of the map change (by going through the map). I want the map to be infinitely large, and have maze-like ...
9
votes
2answers
5k views

How to create tilted (height) isometric tiles

This is perhaps best explained pictorially. I am trying to create a 2.5D isometric game. My vision is for the game to look something like my goal: I am not a graphics artist, so I'm having some ...
23
votes
4answers
2k views

Is the Manhattan distance monotonic when used as heuristic function?

I have a square-based map. Only horizontal and vertical movement is allowed (no diagonals). Movement cost is always 1. I'm implementing an A* algorithm on that map, using the Manhattan distance as a ...
4
votes
2answers
2k views

How should I represent a tile in OpenGL-es

Let me start with I am currently learning OpenGl-es using Android. I have been having the hardest time trying to design a simple and logical way of making tiles (2d flat polygons). The tutorials tell ...
3
votes
2answers
308 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 ...
2
votes
2answers
353 views

How to draw tile edges when you don't know where they're going.

This is more of an art question than a programing one but still game development. I have a tile engine that makes a map randomly from tiles, each tile is a square 3x3 grid. The problem is that while ...
2
votes
2answers
992 views

Projectiles in tile mapped turn-based tactics game?

I am planning to make a Laser Squad clone and I think I have most of the aspects covered. But the major headache is the projectiles shot/thrown. The easy way would be to figure out the probability of ...
21
votes
3answers
1k views

Making walls in tile-based games: what am I missing?

After spending time today to jot down some notes regarding the implementation of walls into my tile-based game, I've suddenly realized it's not going to be as simple as I imagined before. While the ...
5
votes
2answers
1k views

How do I get the distance between 2 points on an isometric grid?

How do I get the distance between 2 points on an isometric grid? I'm creating a facebook isometric game (in as3), and when I move around a particular type of building, I need to know if it comes ...
4
votes
3answers
1k views

Rendering tiles on 3/4 perspective

Using a 3/4th perspective, I'm trying to create a way to render cliffs where nothing is overlapped, and it creates an accurate representation of the elevation. This is a rough mockup of how it might ...
4
votes
2answers
1k views

Container classes in tile-based games.

I've recently begun working on a tile-based tactical game, and I have questions regarding a couple of key moments. Is it feasible to organize the tilemap as an array of containers, which can hold the ...
2
votes
2answers
752 views

How can I efficiently store tilemaps in work memory?

I've been working on different tile-based projects, but never really bothered with being efficient memory-wise. Each tile was represented by a tile class which would hold the following: X and Y ID ...
1
vote
2answers
560 views

Displaying possible movement tiles

What's the fastest way to highlight all possible movement tiles for a player on a square grid? Players can only move up, down, left, right. Tiles can cost more than one movement, multiple levels are ...
7
votes
2answers
329 views

Algorithm to select all cells inside rooms/regions

I have a 2d game map consisting of several 'rooms' For example, here is a 2D map grid: (Brown cells = wall tiles) If I click on a tile (that isn't brown), I would like to obtain an array of all ...
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 ...
5
votes
1answer
576 views

Tile coordinates

Simple question I have here. Say my tile map is based on 32x32 tiles for an 800x600 image so let's say 25 tiles across and 19 down. So now I have that cell 0 of any row contains the first 0-31 ...
4
votes
1answer
676 views

Character jittering with this tile based collision code

I have been trying to get my collision code working for hours now but with every resource I have tried my character still jitters. First I tried using the platformer sample but my character still ...
2
votes
3answers
681 views

Collision Detection Problems

So I'm making a 2D tile based game but I can't quite get the collisions working properly. I've taken the code from the Platformer Sample and implemented it into my game as seen below. One problem I'm ...
1
vote
1answer
489 views

Box2D: Efficient method to create b2Chainshapes for a tile-based map?

I'm working on a platforming game with tile based levels. I store the collision model for my tileset in an array. This is how the collision model for a 4x4 tilesheet would look like (I can't post ...
1
vote
2answers
1k views

2d very large tile based game, zoom and pan considerations

what's a sensible way of implementing zoom and panning for my game? each tile is very large, 100,000 x 100,000 pixels, with some objects possibly being only a single pixel at maximum zoom (small ...