Skip to main content
The 2024 Developer Survey results are live! See the results

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
1 answer
268 views

How to propertly send map to clients in MMO?

I'm designing a game where the map has 1 M tiles. The game is simple, is a 2D game with low graphic requirements and without player movements, only change states, so I don't need to update player ...
Federico Caccia's user avatar
0 votes
1 answer
571 views

Javascript/HTML5 canvas: Integrate scrolling tilemap with map server

I am playing around adapting the example code at Mozilla Dev Network: Square tilemaps implementation: Scrolling maps to fit with a server I wrote myself. There's a link to the original source code at ...
Fedor Alexander Steeman's user avatar
0 votes
1 answer
71 views

Camera not in sync with player

I am currently working on a game in XNA and MonoGame. This game is supposed to be a port of KidsCanCode's tutorial series of creating tile-based games in Python. Here is a link to one of the videos in ...
Labrockstar's user avatar
0 votes
1 answer
551 views

Tiled - Possible to create a terrain from this specific tileset?

I'm really new to Tiled and I can't get the hang of creating terrains. I have these really nice 2D assets I would like to use but I can't get the terrains to work. I'm trying to create a dirt path ...
Brigante's user avatar
  • 101
0 votes
1 answer
724 views

Love2D STI library not drawing map at all (black screen)

I'm trying to use a pretty standard map with the Simple Tiled Implementation module for Love2D, but no matter what I try, I can't get it to display anything but a black screen. Here's my current code (...
Alexis Purslane's user avatar
0 votes
2 answers
947 views

Phaser is not loading the same map created in Tiled software

I have created a sample map using the tiled software. Then tried to load the same on a webpage using phaser.js. But I am not getting the proper result. Is there any mistake in my code or something ...
Ashish's user avatar
  • 25
0 votes
1 answer
637 views

How to load/unload chunks data where view port is currently focused on?

I have a 2D tile based engine with infinite procedural chunk generation. But I can't invent an algorithm, that will fill only chunk tiles on view port (and destroy old). Pls help ViewPort size can ...
Michael Kors's user avatar
0 votes
1 answer
624 views

Optimization of 2D terrain generation algorithm

I am generating 2D terrain with 2D opensimplex noise, however I am having a problem with the FPS that is low when generating the terrains in TileMap. An example of how my game generates the terrain in ...
PerduGames's user avatar
0 votes
1 answer
279 views

How do I deal with this tilemap wraparound edge case?

I'm building a 2D game engine that uses tilesets to build levels. I recently added functionality to handle wraparounds (ie. where the right edge of the map connects to the left edge.) The engine ...
Mason Wheeler's user avatar
0 votes
1 answer
958 views

How to draw a character behind and in front of a building? (isometric map)

how is it possible to draw the player behind and in front of some building in an isometric map : should I slice them, replace the number in the map (one number for a tile usually) by an array of ...
Reign Ravel's user avatar
0 votes
1 answer
397 views

Unity 2D sprite animation keep in sync after setting inactive

I am creating a 2D sprite-based game and the tile map contains many animated background tiles (such as water). The map contains many areas that can be transitioned between in a Zelda style (camera ...
Sarathi's user avatar
  • 121
0 votes
1 answer
734 views

Love2D and 'Tiled' - Detect if player is over certain tile/Collision

I created a 50x50 tile map with 32x32 tiles in Tiled and exported it as a Lua file so I can use it in Love2D. I have a player you can move around the world but I'm attempting to convert the player's x ...
freemann098's user avatar
0 votes
1 answer
378 views

Unity TopDown parallax effect only working in three of four directions

I'm a hobbyist at programming so I'm sure I'm missing something very simple: Basically I have a script that has a method for repositioning a 3x3 grid of tiles every time the player goes out of the ...
Dbilyk's user avatar
  • 33
0 votes
1 answer
138 views

tile map collision with player not working - 2D c# xna

Currently the tile map is drawing fine but I am not sure how to proceed with collisions between the player and some of the tiles. Would it be better to specify certain tiles that the player can't move ...
Anonymous5642's user avatar
0 votes
1 answer
989 views

Top down tile based game render order

I'm making a simple top down (like this) tile based game (using JavaScript, for reference) I use Tiled for making maps. I have sprites that are more than one tile high, and so whenever they are in ...
Oliver's user avatar
  • 151
0 votes
1 answer
321 views

LibGDX - Centering different sized Tile Map Levels

Suppose I have a Level 1 tilemap which is 32 x 16 tiles in size, and when the player exits into another room, which is on 10 x 6 tiles in size, what's the best way to center the viewport. At the ...
James Stoddern's user avatar
0 votes
1 answer
3k views

Monogame - custom json content importer

I am trying to build a JSON tile map importer for the content pipeline of Monogame but I'm having difficulty doing so. I have been following this tutorial and got something... But now it appears my ...
PowerUser's user avatar
  • 222
0 votes
1 answer
598 views

js canvas tiled map - for loop, while, or matrix

I am making a top-down view tiled map in canvas, where player is always in the middle of the screen, and map scrolls depending on where you go, like in moba games. I also want it to loop infinitely in ...
user2701428's user avatar
0 votes
2 answers
528 views

2D Animated Tile rendering

The current game I've been working on needs to have animated tiles. I have a code for Tile and TileMap from my previous game ...
userx01's user avatar
  • 346
0 votes
1 answer
160 views

Tile collision detection

Right. So I was making this simple game. The player is two tiles wide, and four tiles high. My current code is really buggy (it was better before my rewrite) Here it is: ...
EEVV's user avatar
  • 171
0 votes
1 answer
642 views

LibGDX hexagonal tilemap getting adjacent tiles

How do I get all adjacent tiles to a hexagonal tile, my tile map is using a staggered co ordinate system with an odd stagger index and I am using libgdx java. ...
TheMagicShroom's user avatar
0 votes
1 answer
1k views

Tile map collision C++, SFML

My problem with the collision here is more to do with how to decide which tile the player is in. Each quad of the map is 16 pixels squared (Vertex array), and the player moves in 1 pixel jumps. ...
Joel Bevan's user avatar
0 votes
1 answer
659 views

SFML drawing Tiles low fps

...
ashley's user avatar
  • 11
0 votes
1 answer
466 views

How can I store tile maps as PNG images?

I want to let players of my top-down game save, load and share worlds as PNG images. How do I read the colors in a PNG file or change them? I imagine something like this: ...
thedobbles's user avatar
0 votes
1 answer
7k views

How to draw the simplest grid map OpenGL 1.0 [closed]

I want to draw a simple black & white grid map, like that: I have been searching for a way to generate tile, a tile map and tho and I want to draw this map and thats all. I mean that I want to ...
Hanan Yahimoviz's user avatar
0 votes
1 answer
133 views

Network tilebased game updates design

I have a top/down grid based multi-player game. So I have a 2D array on the server that holds the entire map and a much smaller 2D array on the client that holds only what the client needs to see of ...
user441521's user avatar
0 votes
1 answer
181 views

Tile map only rendering 1 layer when it should be 3 [closed]

I've been working on this for a while and I can not seem to figure it out. I had the fileParser() method in the constructor and it worked fine. Then I was told it's very bad practice to have it in the ...
Twiggy's user avatar
  • 123
0 votes
1 answer
135 views

TileMap not not rendering [closed]

I have a tile map that I would like to be able to move while playing the game. In the code you will see the posX and posY variables. I used these variables so that when I complete this, I can have the ...
Twiggy's user avatar
  • 123
0 votes
1 answer
399 views

Moving a tiled map in a jframe

I rendered a tiled map, with the help of slick2d, in my JFrame in Java. I can move my main character, but it is just that the character itself moves. I would like to do it that, if the player moves, ...
TheDoge's user avatar
0 votes
1 answer
2k views

How do I efficiently display image tiles in Unity 4.3 free

I previously wrote a TileEngine with SFML that I would like to port to Unity3D 4.3, but have not found a way to draw a tile on the screen programmatically in Unity. All I am looking for something ...
Neophyte's user avatar
  • 583
0 votes
1 answer
283 views

updating 2d array to contain chunk of larger 2d array - for 2d tile map

What i need help with is how can i get a chunk of a large 2d char array and update it so i am only drawing enough tiles to cover the screen? Currently, i load all the chars from a text file and store ...
user3256254's user avatar
0 votes
1 answer
1k views

limits of tiles on tilemap, for mobile devices?

how many tiles are we allowed to add on a Tile map, using softwares like Tiled , to target mobile devices? Some devices cannot load a texture that exceeds 2048x2048, would you know how a tilemap works ...
Paul's user avatar
  • 679
0 votes
2 answers
3k views

Simple 2d tile based lighting in xna

I am currently trying to implement simple lighting into my game. My world is represented in a 2d array of numbers, each number being a certain tile. I am changing the color parameter in the ...
user2904986's user avatar
0 votes
1 answer
2k views

Top-Down Tilemap Rendering and Collisions in Libgdx

I'm sorry if this question has been previously answered, but I was unable to find an answer here or through google. I'm trying to make a simple roguelike-like that would feature a top-down tile map, a ...
purpleladydragons's user avatar
0 votes
1 answer
237 views

Passing through edges of AABB collision

When I move, I grab the tile in front of the player, but when the player is colliding between two tiles, I grab the wrong tile due to rounding error. I made a video explaining what I mean. As you can ...
user avatar
0 votes
1 answer
888 views

Map handling - Indoors/Outdoors and loading large maps

I have two questions regarding the handling of maps. Question 1. My map will consist of outdoor enviroments as well as dungeons, houses etc. How would I go on about connecting the outdoors with the ...
Oakin's user avatar
  • 78
0 votes
1 answer
607 views

Should I make the Cells in a Tiledmap as null when my player hits it

I am making a Tile Based game using Libgdx. I took the idea from SuperKoalio platformer demo by Mario Zencher. When I wanted to implement Collectables in my game , I simply draw the coins using Tiled ...
Vishal Kumar's user avatar
0 votes
1 answer
1k 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 ...
kraze's user avatar
  • 21
0 votes
2 answers
638 views

Building placement in tilemaps (pattern matching)

I'm building a small RTS and in my code I've given my buildings a pattern, much like you would pieces in tetris, i.e. I want to place irregularly-shaped buildings on a map without overlaps. The map ...
Superflat's user avatar
  • 105
0 votes
1 answer
271 views

General approach to isometrics

I am currently discovering the world of isometrics, now I found out there are two approaches to creating the tilemap; Just create 2:1 ratio tile-images and draw those. Creating squares and ...
Thizzer's user avatar
  • 83
0 votes
1 answer
2k views

How to get tilemap transparency color working with TiledLib's Demo implementation?

So the problem I'm having is that when using Nick Gravelyn's tiledlib pipeline for reading and drawing tmx maps in XNA, the transparency color I set in Tiled's editor will work in the editor, but when ...
Adam LaBranche's user avatar
0 votes
1 answer
627 views

3d js map rendering

In the past I've done a 2D tile map using HTML, CSS and Javascript. Now I have the task of creating a 3D version using the same technologies - think of it like a space map where all planets have x/y/z ...
gotha's user avatar
  • 101
0 votes
1 answer
978 views

Moving a sprite over a tile map

I am working on a tile based game in Java. I have a 2D array of tiles (JComponents) in a GridLayout, this is fine for creating the world (I think), but I am stumped at how to move the sprite smoothly ...
Miles's user avatar
  • 105
0 votes
1 answer
37 views

Should tiles from a tileset atlas be separated into individual images when the program loads?

I load a large tileset image in at the start of my program. To draw the game world, I loop over a 2D array of tile IDs and based on that ID I cut out a 16x16 portion from the tileset and draw that as ...
ChocolateCyanide's user avatar
0 votes
0 answers
46 views

Why are my trees so small?

Sorry I can't figure out a better way to phrase this but when I try to draw trees on a seperate tile map they look really small? I've looked around online and I can't figure out how to fix this
IamaPineapple24's user avatar
0 votes
0 answers
32 views

How to make a tilemap in pygame?

so I have some Python code to generate a random 10x10 grid in which a mine will be or won't be placed, I am having trouble trying to convert this list into a use-able set of coordinates. Any help ...
Joshua Carlson's user avatar
0 votes
0 answers
34 views

How can I instantiate an object on all tiles of a hexagonal tilemap?

On startup, I want to instantiate a text object on each tile (displaying its info). How can I accomplish this for a hexagonal tilemap? Here's my poorly written code that doesn't work. It seems to ...
Alyssa's user avatar
  • 1
0 votes
1 answer
47 views

Tilemap.SetTile results in no visible change in build

I have an issue with how the Tilemap works in build, using version 2022.3. I update my Tilemap with Tilemap.SetTile(Vector3Int pos, null) and it works just fine in ...
Crafik's user avatar
  • 1
0 votes
1 answer
45 views

Which coordinates should I use to generate a 2D lightmap properly?

Recently I noticed that my 2D lightmap rendering has an issue - lighted area is getting rendered as far from the actual light source as the world coordinate of the light source grows. E.g. when world ...
Steyrix's user avatar
  • 225
0 votes
0 answers
18 views

Can I extract/bake the collisions generated by a tilemap collider?

Given a tilemap, with a tilemap collider, is it possible to extract/bake the current collision(s) onto a separate gameobject independent from the tilemap/tilemap collider? My 2D game streams a large ...
Saturn's user avatar
  • 1,753