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
1 vote
0 answers
92 views

How can I create hexadecimal map files?

I create maps like this, where each tile's data is represented in hexadecimal format: ...
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 ...
0 votes
1 answer
126 views

Huge gaps between my tile textures in Godot

The texture itself doesn't have any gaps in it. I don't know where these gaps are coming from. Someone suggested that I check if the sprite sheet's cell size and padding are correct. When I checked I ...
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
1 vote
2 answers
2k views

How can I add an animation to tile swapping on a tilemap?

I am beginner in Unity and I have created tilemap using new tilemap system in unity which looks like this: I created a script that lets me swap tiles. First I click on some tile and than I choose ...
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 ...
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 ...
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 ...
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 ...
1 vote
1 answer
1k views

How to attach a sprite to a TMXTiledMap at a particular coordinate, in AndEngine?

I am trying to add a sprite at a "grid" location on the tiled map. The TMX tiled Map is like a grid, and you can access the size of the grid by calling ...
1 vote
1 answer
110 views

Is it possible to set properties on a scene in a TileMap/TileSet?

If I have the following: sample of code showing exported properties: [Export] public TileSet TileSet { get; set; } [Export] public string TileName { get; set; } ...
0 votes
2 answers
522 views

How to set GameObject on tilemap through script

In the built in Tile Palette tilemap editor, you can choose a GameObject brush to set custom tile GameObjects. How would I be able to set a gameObject onto a tile through a script?. There is no ...
1 vote
1 answer
90 views

How do I place the local center of my tilemap at 0,0?

If I have a tilemap that is 4x8, positioned at 0,0 in the editor as follows: What code would I use such that it ends up "centered" when my game runs? I'm hoping for an end result that would ...
0 votes
1 answer
485 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
1 answer
1k views

Tile draws pixels from adjacent tiles

Whenever I try to draw from the tile palette, this is the result. why does this happen? I have tried messing around with the palette, how the sprite editor has sliced the tiles and played around with ...
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 ...
0 votes
1 answer
1k views

Draw a player in an isometric tilemap in the right order

I'm trying to create an isometric tilemap world in Godot 4 beta 4. The world is made of blocks on top of each other where for every Y level (thinking the world like if its in 3D coords) there is a ...
0 votes
1 answer
87 views

How do I interpolate light intensity for tilemap's lightmap?

I implemented lightmap creation for a tilemap, but I cannot figure out how do I interpolate light intensity values. For now, my lighted tiles create an obvious grid-like structure. It was pretty easy ...
0 votes
0 answers
46 views

How do I create Mining System like in DomeKeeper / Wall World?

TL;DR - I want to create a mining system like in Dome Keeper / Wall World. I'll start with the fact that I'm new to gamedev, and i did a wholeday of research before writing this post. I want to ...
0 votes
2 answers
282 views

How do I put 3 different tiles in the same place?

I'm trying to make a Color Rings game. When I try to set 3 tiles (rings) in the same cell of the board (same X/Y coord), it shows me only one, the last one in the script. For example, in this case: <...
0 votes
1 answer
1k views

How to build TileMaps dynamically from a database?

The game I'm building allows users to create their own tile maps essentially, so I want the server to respond with tilemap coordinates if / when a user enters their custom world.
1 vote
1 answer
84 views

A-star algorithm after 2D tilemap 90-degree rotation

I am learing Unity and for now trying to implement a simply pathfinding alogorithm in a simply 2D isometric diamond-shaped tilemap. Recently I learned a way how to rotate tilemap and I already have a ...
1 vote
2 answers
442 views

If I have three different kinds of blob tiles, how many tiles do I need?

Blob tiles are autotiles that match edges and corners. I know that for two different kinds of tiles, I need 47 * 2 tiles. But I have three different kinds of tiles. I thought that I needed 47 * 3! ...
0 votes
2 answers
105 views

Correct way to control tiles transparency on tile map?

Some 2D top-down games use tile maps and use transparent tiles for representing static objects. For example Stoneshard. When the character walks behind a tree, the tree becomes partially transparent. (...
0 votes
0 answers
55 views

How to display objects behind tall structures in 2D tilemaps

I'm interested in what happens when you have structures/buildings on a 2D tilemap that are tall enough to block the view of the player. AFAIK, there's a few approaches: Do nothing to display the ...
0 votes
0 answers
66 views

How to generate visually stunning tilemaps?

I previously asked this question but I don't think it was well phrased, so I want to rephrase the question. I want to generate tilemaps that resembles the pixel art world maps from "Shovel ...
1 vote
0 answers
165 views

Godot 4 - Isometric Snap Grid

While there is rotation in the snap grid settings it does not seem to be rotating the displayed grid. I can use a Isometric tilemap, but without a grid displayed at all times, I cannot perfect ...
1 vote
2 answers
1k views

Voxel terrain vs AABB collision detection

I am trying to implement collision detection in a voxel game. Currently I check the side of the collision by finding the closest side and checking whether there isn't a solid block next to that side. ...
0 votes
0 answers
66 views

How to draw a tile placement grid in a 2d isometric place/world?

I'm working on an isometric 2d tile based game in ruby using SLD 2. The tiles are 40px wide and 20px tall. I'm trying to figure out how to draw the grid (where each cell of the grid is a potential ...
0 votes
1 answer
233 views

Procedural Path Generation

I've been trying to make an algorithm to procedurally generate a path from a tile map attached below. I'm just looking for a method to go about doing this. EDIT: I want to make a path for a tile map ...
0 votes
0 answers
82 views

Can WFC generate aesthetically pleasing maps?

Is wave function collapse actually capable of generating aesthetically pleasing tilemaps? Let's very roughly define "aesthetically pleasing" using an example from the world map of "...
0 votes
1 answer
158 views

Simulated light for a 2D tile-map with just SDL2?

I'm working on a 2D tile-map RPG with C++17 and SDL2 + SDL_Image. There are daily cycles, weekly cycles and seasons. Even a kind of weather engine provides atmosphere. The moods and times of day are ...
0 votes
1 answer
90 views

Optimal Approach for Transmitting and Rendering Large Pixel Art Game Maps in Unity

I'm working on a pixel art game in Unity, and my backend (Which is actually written on Golang) has generated a massive dataset of tiles for a 1000 by 1000 world (it could be even more). I'm wondering ...
1 vote
0 answers
39 views

How to fix collision for objects beyond their green lines?

As you can see in the image those are collision lines but its kinda of disingenuous as there are I would say invisible collision blocks on the X's, I tried messing around with the sorting layers and ...
0 votes
0 answers
966 views

Google maps layer for strategic game

I found one web site http://e-sim.org/googleMap.html which is similar to my game idea. But I have no experience on game maps developing. Can anyone share ideas how to make similar functionality like ...
0 votes
2 answers
855 views

Unity Tilemap.BoxFill is not filling correctly

So I have a tilemap that already has tiles on it. What I want is to clear it all out and create a solid rectangle of one tile, with which the rest of the monobehaviour will 'carve out' to create a ...
0 votes
1 answer
168 views

How can I make colliders-only visible in Godot?

Specifically, I'm looking for any way to see a collision-only item from a Mesh Library in a GridMap. (The tag says "tile map", which it technically isn't; but there's no option for a grid ...
0 votes
1 answer
4k views

Collision Player and Tilemap Unity

i am a student in austria. I am working on a project for school, where we have to make our own first game with unity. Because it is the first time using unity, i constantly run against problems. Most ...
0 votes
0 answers
44 views

How to draw new tile on existing tilemap

I created a simple prototype/script which has to draw a predefined tile on an existing tilemap (and highlight the hovered tile). But for some reason, even though it adds the tile to the correct place, ...
0 votes
1 answer
146 views

How to process tiles of different sizes?

I have next problem. Sprite sheet that I have has sprites of different sizes. I use 16 pixels per unit. On the screen you can see a choosen tile and that it's height is 14 pixels. I can't resize it ...
3 votes
0 answers
163 views

2D Tilemap Collision resolution in C#/MonoGame

A bit of context about my game: I'm nearly 2 years deep into development of my game called Cosmorists. It's programmed in C# using the .NET 7.0.11 framework, and MonoGame 3.8.1 game framework and it's ...
0 votes
1 answer
40 views

Why is the grid's Z coords = -10

I'm using mouse input to move the player from where they are to where the mouse position is relative to the cell on a tilemap. However I found when I click on a point of the tilemap, the z coordinate ...
0 votes
1 answer
511 views

High CPU usage with Godot tilemap

I am using Godot as my game engine and I am making a basic 2D game, I have a small map with 1 Player and 5 Enemies walking around in it. The game includes some basic code for walking and shooting at ...
0 votes
0 answers
39 views

Missing tiles when rendering an isometric Staggered tilemap in Unity

I'm trying to show tiles on an isometric staggered tilemap in Unity, but some tiles are missing. I think the problem might be with where I'm placing the tiles or some floating-point precision issues. ...
0 votes
0 answers
36 views

Character is stuck between grid cell gap [duplicate]

I started making a D&D-style turn based tactic game. I have a problem with my tilemap. I made a script to find the location on the tilemap for my character and for the tile I clicked with the ...
1 vote
0 answers
256 views

Selecting tiles with mouse on isometric map with height and slopes

I want to implement an isometric map with rectangular tiles similar to how it was in simcity 2000, where tiles could have different heights and tiles with different heights were connected by slopes. ...
2 votes
3 answers
2k views

How to make a noise gradient?

Introduction: I am working on a heat map made by Perlin Noise with the next result: (Figure 1) ...
3 votes
1 answer
2k views

Is there a way to set custom data per cell in Godot 4?

My idea is to mark a cell as "occupied" when a character is in that cell doing something so no other character can be on that cell working. My first thought was to set a ...
3 votes
1 answer
619 views

Rendering Tilemap Tile Layer Side by Side for Infinite/Endless Runner Game

I was strugeling this for days how to implement tilemap into libgdx and box2d with infinite/endless scheme. I can load a single map and display everything on screen. But placing 2 or more tilemap side ...
0 votes
0 answers
52 views

Only first line/column of level text file gets loaded into tile map

I'm trying to make a map using a text file, but it only does the first line / column and not the rest. I know the problem is in getTileImage. ...

1
2 3 4 5
15