Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tilemap]

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

-1
votes
0answers
34 views

LibGDX AStar Pathfinding on a Tiled Map

I want to have pathfinding in my .tmx file that I created with the Tiled tool for libgdx, but I am just a beginner wirh libgdx. I use Tiled to build my game map. In this grid map, I want to add a ...
0
votes
0answers
19 views

How do I load tile map with phaser 3

I created a simple tilemap with tiled, and I'm trying to load it. The code and files can be seen here: https://codesandbox.io/s/qqq47wqv3w I'm not getting any errors in the console, but the canvas ...
0
votes
0answers
19 views

Unity2D - Tilemap Challenges

At the moment, I am working on wrapping my head around what the Unity tilemap is doing programmatically. I have looked through the online documentation as well as taken a look at their official source ...
0
votes
0answers
9 views

Why does the position of my BoxCollider2D go to hell when it falls onto a TilemapCollider2D?

Here's what it looks like before hitting play: Notice the transform: the Player Game Object's position is 0, 0.5, and 0. Now when I start the game: Here's a close-up look: What the hell? Initially, ...
0
votes
1answer
41 views

How to give individual tiles their own collider in Unity's tilemaps?

My floor tile is a 2D drawing of a 3D platform, for lack of a better description. I want my player character to stand not on the top of the tile but a little inside it, as the red circle does in the ...
0
votes
0answers
51 views

How to center tiles in scene (grid) without using 0.5 positions

If I create a tilemap, its tile anchors default to 0.5. This means that I need to use sprite positions like 1.5, 2.5, 3.5, etc. I'd prefer to use sprite positions like 1, 2, 3 instead. But I don't ...
-1
votes
1answer
61 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. ...
0
votes
0answers
35 views

How should I make a Tile-based Plat-former engine using Processing js?

I'd like to know what structures I should use for creating a Tile-based Platformer. I've created platformers before using processing js. Is there any documentation on this? Before I do this I'd like ...
0
votes
1answer
51 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). ...
1
vote
1answer
183 views

Unity tilemap spacing between imported sprites

What am I missing here? Is Unity's tilemap limited to size 32x32? I am trying to understand why my sprites in my Unity tilemap are spaced apart from one another such that if I paint them into the ...
0
votes
1answer
187 views

How to create “border” around tilemap in Unity

I'm setting up a 2D arena game, and I'm trying to implement an ability for tilemaps to be highlighted (on hover). I've already managed to get a Vector3 of the hovered tile using rays and WorldToCell, ...
0
votes
0answers
98 views

Fast 2D tilemap rendering using modern OpenGL

let me try to keep myself short. I will start out with trying to explain my current situation, then what I need advice for and finally my current approach. Sooo, as the title suggests, I'm trying to ...
1
vote
2answers
92 views

How can I store my 2D map in JAVA?

I'm working on a 2d adventure game where the player can explore a random generated map. It's working perfectly if I set it to be about 3000x1000 blocks (my array is 3000x1000x2), but this is TOO SMALL....
2
votes
1answer
133 views

How to make the background tilemap in Unity3D have a “far away fog effect” filter in a sidescroller game?

I would like my background made of the same tiles as my foreground but with a filter which makes it appear further away from the camera. Making the objects smaller is easy, I just have to decrease ...
1
vote
1answer
73 views

How to avoid rows on screen when cutting spritesheet tiles?

I'm having a problem with my spritesheet, I generate a map but when I zoom in on it I can observe these lines as in the image below: When I used the tiles each in their separate image, that did not ...
0
votes
0answers
36 views

Pseudo 3d roguelike: map representation [duplicate]

I know it's a very common question, so I'll try to be specific. I'm working on a pseudo 3d (like Dwarf Fortress or Cataclysm: Dark Days Ahead) roguelike. How you'd represent a map in a roguelike? Let'...
0
votes
0answers
31 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 '...
0
votes
1answer
29 views

Libgdx Tiled | Using setTile results in a NullPointerException

So, I'm attempting to change the texture of a block when the player comes in contact with it by using cell.setTile(tileSet.getTile(926). I've already looked at ...
0
votes
0answers
44 views

Perfect Tiling for Photos of Floors and Walls

I am trying to design a realistic 3D environment from photos, where by means of a photo of a portion of a wall or floor, you can clone this photo and create a complete wall or floor. However, when I ...
1
vote
1answer
398 views

Tile palette off-centered

Unity has a wonderful Tile Palette feature. However after I drag and drop the sprites to the Tile Palette, the tiles are off-centered like so (Notice the white square, it's the cursor): I've tried ...
1
vote
0answers
69 views

Performance problems with scrolling html5 canvas for large tile-based game

I try programming a splix.io clone as an electron app and do the visualization via the html5 canvas. The movement across the tiles should look fluent like the original, so I target 60 frames a second. ...
1
vote
1answer
90 views

How can I create a slope/hillsde tileset?

I struggle to create a 2D slope/hillside for a tileset. Not an impassable mountainside like in Pokemon, more a gentle slope which you can walk both directions. When you see the tilemap, one should get ...
1
vote
1answer
67 views

How to drag 2D objects and stop it if collides with other 2D object?

This is the code I am using but it's not working. It drags other object on collision: ...
1
vote
0answers
75 views

LibGDX TileMap problem

my LibGDX map find olny two Layers but the map.tmx file contains more than two layers. Where is the problem? ...
0
votes
0answers
38 views

Unity tilemap wrong draw order

I'm currently making some mockups for my upcoming game using tilemap. The game will be in semi top down perspective. However, I experienced an issue where the draw order of the tilemap is sometimes ...
0
votes
1answer
317 views

Isometric Map with different Z-axis values

I want to create a isometric tile map editor just like the one shown in the images ( pictures are from the game Zoo Tycoon ). I know how to render the tiles when there is only one Z value ( zero ), ...
2
votes
1answer
96 views

Array of map data renders the map the opposite way

A while ago by following some tutorials I made a game map array consisting of 0, 1 and 2. I program it the way I want to see it: ...
0
votes
0answers
107 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: ...
1
vote
2answers
100 views

How can I deal with tilemap position in the editor?

Right now it is quite hard in Unity 2017.2 to track where is the (0, 0) coordinate in the tilemap editor, when painting. I tend to use a displayable dummy game ...
0
votes
0answers
18 views

Render pre-placed tiles in Tile-Game?

I spent hours thinking of how you would do this, without sacrificing major amounts of efficiency. Basically, it is a pre-placed tilemap that is rendered in "chunks" (like minecraft) for my game so I ...
1
vote
1answer
77 views

Is it bad practice to use the entire map image as a tilemap?

I made a map in photoshop which I want to use as a map in my game. The question is should I try to cut it up to pieces, or is it bad (performance wise) if I use the way I made it. The picture itself ...
0
votes
0answers
90 views

How to do proper collision detection on a tilemap array?

I want to implement a simple collision detection so that when my character hits one of the objects it can't move any further. I have seen some tutorials on collision but the thing is that they are ...
1
vote
2answers
85 views

HTML canvas how to create big game world and show only a part of it on canvas?

I originally created this question at stackoverflow but got no answers, so hopefully someone will be able to help me here. So for the first time ever I'm making a html canvas game. So far I came up ...
0
votes
0answers
28 views

How SKTileMapNode size impacts game?

Despite already having some experience with mobile dev and swift, I am now trying to learn spritekit for some gamedev. I decide to start trying some map creation, with SKTileMapNode, while learning ...
0
votes
0answers
33 views

How to prevent fixed-tile movement

I have a tile-based game with dimensions of 28 x 31 (I'm recreating Mrs. Pacman), and inverted y-axis. The upper-left tile is 1,1 and the lower right is 28,31. Due to the map being very small, I'm ...
0
votes
2answers
88 views

Storing 2d map data as PNG

Just a question regarding the storage of 2D map data. There are several topics discussed within gamedev, i.e. Array Storage: How to store 2D tile-map, custom map formats: A way to store potentially ...
4
votes
1answer
80 views

Help Improving Map Generation

I've recently attempt for the first time to implement a map generation system and while it does work, it doesn't work exactly the same I want but I'm not really sure on what changes I can make it to ...
2
votes
1answer
256 views

Basic Random Tile Map Generation

Currently I've got a map like this: It's pretty simple but what I want is that area of tiles to be random, with the number of tiles present being random (Within a minimum and maximum amount of tiles ...
1
vote
1answer
134 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 ...
2
votes
1answer
656 views

Runtime Access to Unity 2d Tiles

I'm trying to use Unity's 2017 tilemap features. What I would like to do is push a tile's sprite up (change its offset), so that the sprite moves up pixel by pixel and the top of the sprite loops (...
1
vote
2answers
78 views

How can I find multiple starting areas on a procedural map?

I'm using perlin noise to generate a 2d map, with ground types and natural resources. When you start a new game I need to place your town hall as well as your opponents in such a way they are on ...
0
votes
1answer
25 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 ...
0
votes
1answer
783 views

Strange warping/shimmering effect with Unity Tilemap and Cinemachine

I'm using a Cinemachine Virtual Camera in a 2D project to follow around a target. The ground / background is a Unity Tilemap GameObject. As you can see in the gif above (or on Imgur), when following ...
0
votes
1answer
194 views

Sprite character/item less than tile size

I am starting to work on a 2d top down tile-map game for fun and learning purposes. I have read some great answers here re tile-map size vs character sprite size, pixel density, ppu, screen resolution ...
0
votes
0answers
184 views

Pixi.js Tilemap is stuttering while scrolling on 60fps

When i am trying to scroll my tilemap then it is lagging every now and then. DEMO (Movement: WASD) It doesn't matter if it is a large or a small map (on the top left you can switch between a small ...
1
vote
0answers
104 views

Why are my water tiles not animating?

My game can display tiles such as Grass tile, Dirt tile and Rock tile with no problems. Now I am trying to display water tile and animate it but for some reason it is not animating and only displaying ...
0
votes
0answers
285 views

How to render a large tile-based 2D world efficiently (using JavaFX/ScalaFX or more generally)

I have a file tileset.png containing a dozen 32*32 tiles. When my game starts, it generates the world randomly with the available tiles and the size of the world ...
8
votes
1answer
171 views

How can I procedurally find a wall that separates two or more points on a grid-based map?

I'm trying to generate walls that cut off a given point from other given points. The attached image shows the sort of thing I'm after: Blue separated from Red. Blue separated from Red and Yellow. ...
0
votes
1answer
37 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 ...
0
votes
1answer
127 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 ...