Questions tagged [tilemap]

Tile map is a technique of re-using small graphic pieces, tiles, over and over again to shape the game field.

Filter by
Sorted by
Tagged with
0 votes
0 answers
42 views

Placing tile on second layer results in wrong tile, or changes nearby tiles

So I am working on a 2d game and running into strange behavior when trying to add tiles to a tile map. The first layer seems to work fine but if I add a new layer it will always place the same tile ...
Jason Crosby's user avatar
0 votes
0 answers
887 views

How do I determine the distance between two points in tilemaps in unity?

If I have a tilemap with multiple layers, is there any way that Unity offers to help me infer the distance between the two points? Also, as a related question: Are there any libraries written in C# ...
Alexander Trauzzi's user avatar
0 votes
1 answer
137 views

Split tile based map file into multiple files

I have a gigantic map file (1440x1080) that I wish to split into smaller files (45x45) for faster client reading. I plan to split offline (when running DEV server) so I am not too worried about speed....
KisnardOnline's user avatar
0 votes
0 answers
648 views

Godot: Possible to create a 2D tilemap and set it as a texture for a 3D surface?

If I created tilemap of some sort of pattern or image and wanted to set it as the texture of a 3d surface or 3d model, how would I do it?
Kennichi Nitta's user avatar
0 votes
0 answers
67 views

server coordinate to client coordinate

I've a really quick and maybe dump question and I don't really know how it is handled generaly. I want to make a tile base multiplayer game. Player doesn't teleport from a tile to another but just ...
Fosheus Badabu's user avatar
0 votes
1 answer
432 views

Depth sorting issue

I've been working on a custom tile-based map editor for a while now, and everything works as expected, or so I thought until I've tried rendering the actual map including the dynamic objects as well. ...
TheDBeetle's user avatar
0 votes
2 answers
709 views

Generating nav meshes from tile based map (2D)

I'm working on a pathfinder for a MMORPG game, it's not mine; I'm RE it, now I need to create a pathfinder for monsters. But I figured that the client uses tiles for it's pathfinder (for players). ...
Xyt's user avatar
  • 3
0 votes
0 answers
102 views

How are really big maps made? [duplicate]

I'm interested in how huge games like The Witcher 3 and Skyrim create and save the open worlds. In my own game I used a system where I stored the map data in a file seperated by commas. For example '...
Featherball's user avatar
0 votes
0 answers
579 views

trying to get an int grid of values from unity tilemap

I'm trying to get a 2 dimensional grid of values from a tilemap and found this which seems to do the trick: ...
benbyford's user avatar
  • 135
0 votes
1 answer
67 views

Box2D and OrthographicCamera working incorrectly

I'm trying to build a simple game where TileMapRenderer renders a labyrinth, a ball moves in it and camera follows it. I'm currently having the following bug: For some reason, the game renders the ...
F4irline's user avatar
0 votes
2 answers
911 views

2d tile map render rotation math?

I am working on a personal project and am trying to make a 2d tile map render that needs to handle rotation. I am using raylib to handle the drawing stuff onto the screen and am using this function ...
Mclog21's user avatar
0 votes
0 answers
174 views

How to display a huge image in Unity 2D scene?

I need to display a huge image (big like earth) in a 2D scene, it is a PNG format image of real world map. I think like the other map APPs, the map image should be loaded and displayed tiles by ...
Suge's user avatar
  • 141
0 votes
0 answers
61 views

Using libGdx and Box2d for game and getting this error- "incorrect checksum for freed object"

I am new in game development and I am using libGdx with box2d in my game, whenever I try to switch screen (both screens has ...
ZaidRehman's user avatar
0 votes
1 answer
263 views

LibGDX - Turning TiledMapTiles into objects

I'm working on a harvest moon type game and I've already created lots of assets and have a working player. Now the issue is with the tile map. I use Tiled Map Editor to make the map and it renders ...
Dennis Björk's user avatar
0 votes
1 answer
86 views

Map Engine Rendering Broken

So I've been making my own tile map engine in LibGDX as the one currently implemented doesn't support collision detection with scaling. So I've come up with my own Layer and Map class and a drawing ...
Ammar Tarajia's user avatar
0 votes
1 answer
163 views

Tilling with SDL2 via Clipping - Some bug which is hiding quite well

right at the moment i am writting some code for demonstration purposes. unfortunatly i have an stubborn bug in my code which is invisible to me. The Problem is I am trying to draw a Map. The Map ...
ExOfDe's user avatar
  • 213
0 votes
1 answer
85 views

Enemy AI chase twitching left and right to move vertically

I'm making an enemy follow the player based on his possition and attack if he is within a distance and his last movement (if the enemy last moved to the left, it will attack to the left, etc.). It ...
Neko's user avatar
  • 3
0 votes
0 answers
217 views

What's the best way to store tiles' infos in a 2D table?

I need to know what's the less time / memory consuming way to store the infos about each tile in a 2D table. The first thing that came to my mind was creating a table holding the infos, and then ...
user6245072's user avatar
0 votes
0 answers
438 views

Dealing with floating point imprecisions in a 2D Tiled based game

I'm using unity3d to create a little horizontal tile based platformer game. My entities have a rectangle defining their collision volume. On the other hand I'm using a camera configured to 1 unit = ...
Notbad's user avatar
  • 1,075
0 votes
1 answer
397 views

Rendering three-dimentional array of tiles (as a tilemap)

I'm trying to create 2d game engine in C++ using SDL2 (actually some code was migrated from SFML). I want to have a flexible multilayer tilemap that can store different types of tiles. My current ...
Mohrcore's user avatar
0 votes
0 answers
128 views

Tilemap not rendering properly

I'm making a single-screen scrolling platformer (OpenGL/SDL) and I've made a tilemap out of a 2D array, pre-sized with variables of the LEVEL_HEIGHT and ...
loremIpsum1771's user avatar
0 votes
1 answer
975 views

LibGDX - Getting Tile Map Layers Problem

While following a tutorial with LibGDX, I am working with tile maps. This is the method that I'm using: tilemap.getLayers().get("Collision Layer"); or ...
PlatyPi's user avatar
  • 102
0 votes
1 answer
253 views

XNA Platformer - Where should tile collision handling be?

I've started using XNA and am working on a simple 2D platformer (single level). However, I am stuck as to where the collision detection should be handled. Here is my current project structure: The ...
Kendall's user avatar
  • 107
0 votes
1 answer
321 views

TileMap or Voxel collision detection

I have a conceptual question: In the case of Tile Map, each block has the information from the enemies who are going about it. But what if some of these enemies are far greater than the block? I have ...
user3786450's user avatar
0 votes
1 answer
215 views

Reading map.txt from assets android

I'm a beginner android developer currently working on my second app which is a platformer game. I'm trying to read the level map (which I've stored in the assets folder) but I keep getting a ...
Macharia's user avatar
0 votes
2 answers
578 views

Tile map creation, problem with position of tiles

I am trying to create a basic tile map script to learn Unity and I am unable to understand why my tiles are spaced far apart and I can't seem to control their spacing. Moreover, there seems to be a ...
Wraithseeker's user avatar
0 votes
1 answer
2k views

Datastructure for infinite 2D map [duplicate]

I started a 2D Tilegame programmed with libgdx which needs potentially infinite tiles. That means when the player arrives the border of the map it should be possible to generate even more tiles. So a ...
Hummel's user avatar
  • 9
0 votes
1 answer
336 views

Rendering mountains around a tile layer [closed]

When making a 2D Pokémon game, I just faked elevation by putting mountain tiles underneath the land. Now my tiles are 3D models, so I'm using layer properties to define their elevation. What I don't ...
Shien's user avatar
  • 257
0 votes
0 answers
3k views

How to overlay texture materials on top of each other in Unity 2D tiled game

I'm learning how to do a 2D tile-based game. So far, I have followed this tutorial which seems like a good starting point. With his method of building the raw triangles and then applying the uvs, I ...
meepboop's user avatar
0 votes
1 answer
253 views

Tiling 2D textures in random order

I am wondering what the best way to make a random set of 2D textures. Currently I have tried the follow code but I am aware that when this comes to collisions that would be an issue. Therefore I would ...
Eric Coufmann's user avatar
0 votes
2 answers
166 views

Gameobject-Component model with many background tiles - long iteration time

So I'm making a game engine for a game I'm making - the game is a 2D tile-based game I've implemented a gameobject-component style for the engine, for decoupling reasons However, every frame, the ...
Ben Ezard's user avatar
  • 150
0 votes
0 answers
319 views

How to find boundaries in an isometric tilemap?

I have an issue with my 2D isometric engine. I'm using my own 2D camera class which works with matrices and need to find the tilemaps boundaries so the user always sees the map. Currently my map size ...
Yheeky's user avatar
  • 305
0 votes
1 answer
345 views

Tile System with moving Platforms

I am using a tile based system where the level is stored in a char: ...
Ryan Foy's user avatar
0 votes
0 answers
60 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 ...
Stowelly's user avatar
  • 174
0 votes
0 answers
64 views

XNA 2D Tile Map zooming to arbitrary point [duplicate]

I'm working on a game in XNA with a 2D tilemap as the playfield. I'm using a spritebatch with a transformation matrix to provide movement and scaling of the playfield. I'm trying to add a zoom ...
Kieran's user avatar
  • 205
0 votes
2 answers
2k views

Tile map collision and object handling

I want to program a game. In this game there is a tile map and objects that interact with it and them self. For that I made first a TileMap class, in it is only the data of the tile map. Its a very ...
user2933016's user avatar
0 votes
0 answers
145 views

Tilemap mesh issue with z, -z axis

I don't understand why the created mesh is upside down if z ( z*tileSize ) is positive, the mesh is then rendered with the texture looking down. With "-z", the mesh ...
Paul's user avatar
  • 679
0 votes
1 answer
650 views

Tile Maps and vertexZ order for sprites

Here is the setup. I have a orthogonal tile map made with Tiled. There are 5 layers. The bottom 4 comprise the background, while the top layer is the foreground that I will refer to as the “tree” ...
Pluvius's user avatar
  • 311
0 votes
1 answer
2k views

Creating a BufferedImage with several smaller images?

I am making a 2D tile based game. The tiles render fine from a spritesheet and a text file. However, I am using a for loop to draw the map to the screen. When it refreshes, it slows down the loop, and ...
user avatar
0 votes
1 answer
216 views

Is caching tiles like this a good idea?

I have a 2d int array which represents tiles on level like this: 0000000000000000000000 0000000000000000000000 0000000000000000000000 1111111111111111111111 I ...
user avatar
0 votes
1 answer
66 views

Torque2D createTileLayer

The script reference "manual" is not much of a help. When I look up createTileLayer(tileCountX/tileCountY/tileSizeX/tileSizeY) it doesn't say more than it creates a ...
Max Kielland's user avatar
0 votes
0 answers
908 views

can it be done with 2D engine or is it real 3D? [duplicate]

Possible Duplicate: How should I sort images in an isometric game so that they appear in the correct order? My isometric game looks flat; how can I improve this? I'm working with andengine on a ...
Christophe Debove's user avatar
0 votes
1 answer
264 views

Copies of GameScene created when called additional times

UPDATE: It no longer crashes after removing [self removeAllChildrenWithCleanup:YES]; from onExit. The artifacts still remain ...
Orin MacGregor's user avatar
0 votes
1 answer
575 views

2D Tile Based Particle Collisions

I have a basic 2D particle system and I'm now looking to implement collisions, however I'm not sure on what the best way to do it is. My game is tile based and runs in XNA Game Studio 4.0. I've seen ...
MrPlosion1243's user avatar
0 votes
1 answer
938 views

How do I use SetTile() with a tile asset/ scriptable tile?

How do I use Tilemap.SetTile() with a tile asset? I want to use it for scriptable tiles in the 2d-extras package, such as rule tiles, weighted random tiles, and ...
IllegalRazer's user avatar
-1 votes
3 answers
560 views

Java Tilemap Collision

I have tilemaps represented by values from 0 to 4. How can I make the player collide with tiles represented by 3 and stop the player from passing through it ? Here is my code for the player and ...
user2957632's user avatar
-1 votes
1 answer
360 views

Loading the map from an image file in C++

For my platformer tile-based game I want to be able to load the game map from an image file. Consider the following 25x15 px .png (enlarged) representing some level: Assume that each specified ...
weno's user avatar
  • 541
-1 votes
1 answer
470 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 ...
user2957632's user avatar
-1 votes
1 answer
746 views

Perlin noise always produces the same map. How do I generate a different map?

My tile map takes a spritesheet, slices the tiles up based on a resolution, and assigns each tile to an array, which uses an integer. Since perlin noise generates a float between 0 and 1, I multiply ...
Gman0064's user avatar
-1 votes
1 answer
607 views

LibGDX - Map Boundaries

Synopsis Well, I'm making a little top-down JRPG and today I was like 'Yeah, I'm gonna bust out this whole map collision thing!'. I failed. Problem So I went on the internet and looked up 'LibGDX ...
Ammar Tarajia's user avatar