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)

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 ...
32
votes
3answers
11k 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 ...
13
votes
3answers
12k 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 ...
78
votes
9answers
20k 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
2k 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 ...
5
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 ...
7
votes
8answers
3k 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 ...
12
votes
5answers
3k 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
7k 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
439 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 ...
25
votes
5answers
10k 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 ...
12
votes
4answers
13k 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 ...
7
votes
5answers
3k 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 ...
9
votes
2answers
2k 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 ...
7
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 ...
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. ...
13
votes
2answers
989 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 ...
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 ...
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
2k 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
3k 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
763 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, ...
27
votes
6answers
3k 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 ...
10
votes
1answer
3k 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 ...
23
votes
3answers
2k 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 ...
8
votes
2answers
4k 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 ...
6
votes
3answers
4k 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 ...
22
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
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 ...
2
votes
2answers
261 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
958 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
2k views

Collision Detection, player correction

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 ...
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 ...
1
vote
2answers
623 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 ...
7
votes
2answers
305 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
1answer
557 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
651 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
643 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
2answers
857 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 ...
7
votes
3answers
1k views

What is a good flat file format for storing a 2D tile map that can grow infinitely in any direction?

I am creating a simple map engine that will automatically expand in any direction with procedurally-generated content as needed. What is a good way to store map data, anchored at a 0,0 origin so that ...
4
votes
4answers
1k views

Tile editor for flash based games?

I am trying to make the age-old version of pacman. And only then that I realized that I need to spend a heck lot of time for making the tile matrix itself. It gets messy more and more. I've also ...
3
votes
3answers
651 views

Keeping player aligned to grid in Pacman

I am making a Pacman game using XNA. The game is tile based, with each tile being 32 pixels. As the player moves, I need to know whenever it is perfectly on a tile (ie position of 32, 64, etc...) so ...
2
votes
2answers
1k views

Efficient collision detection - tile based HTML5/Javascript game

I'm building a basic RPG game and I'm looking at collisions/pickups etc now. It's tile based and I'm using HTML5 and Javascript. I use a 2D array to create my tilemap. I'm currently using a switch ...
2
votes
2answers
775 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) ...
2
votes
2answers
458 views

Calculating the number of tiles shown on an isometric map

I'm currently changing an existing computer game from a top-down view to an isometric view. The map consists of an infinite number of tiles. Only the tiles which are currently visible in the players ...