Questions tagged [tilemap]
Tile map is a technique of re-using small graphic pieces, tiles, over and over again to shape the game field.
719
questions
0
votes
0
answers
20
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
votes
0
answers
101
views
How to generate levels similar to Spirit Hunters: Infinite Horde?
I am doing research on map generation, and want to know how to generate something like this area in the game Spirit Hunters: Infinite Horde:
Here are the specific features I want to reproduce:
Layer ...
1
vote
0
answers
118
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. ...
0
votes
0
answers
39
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.
...
2
votes
1
answer
171
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 ...
1
vote
1
answer
113
views
How to disable a layer in a Tilemap's collision mask via code?
I have a tilemap in Godot 4.1 and I have defined a physics layer for a tileset, but I cannot figure out how
to disable a layer in collision mask in code.
I already found out that I should get tileset ...
0
votes
0
answers
44
views
Drag and Drop tile in TileMap
I am new to using TileMaps so I am not sure if this is possible.
How can I add a Drag & Drop option for my TileMap?
I have no problem identifying a click on a tile but don't know how to go about ...
0
votes
1
answer
88
views
How do I smoothly connect isometric tiles at different height levels?
I am trying to figure out how to smoothly connect isometric tiles at levels. For example, below are tiles at different levels.
I want to smoothly connect the tiles at the two levels based on the ...
0
votes
1
answer
117
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 ...
2
votes
1
answer
350
views
How do I place objects so they snap to my TileMap in Godot?
When I'm placing objects on tiles in my TileMap, they snap to positions that aren't on my tile's grid. I drag my object to the middle of the grid square, but it keeps snapping to the corners.
I'm ...
0
votes
0
answers
138
views
Navigation in a TileMap with 2 types of tile in 1 cell in Godot4
I'm stuck with the navigation in a TileMap based scenario in Godot 4. My intention is to make the enemy (boats) to chase the player while avoiding procedurally ...
0
votes
2
answers
47
views
How to calculate shadow position below arcing projectile in Isometric 2d tilebased grid?
I have an Isometric 2D grid-based tilemap, and am firing a projectile (at Vector P1 in image below) from the player (at Vector A) to a location "above" a target location (at Vector B). This ...
1
vote
1
answer
59
views
Is there any standard format for engine agnostic 2D tilemaps?
Basically that. I tried searching for standard 2D tilemaps formats or encodings, but I haven't found anything significative. I know that big engines use their own formats (Godot Resources, for example)...
0
votes
1
answer
137
views
Making a 2D Grid Map UI in Unity
I am trying to make a simple 2D square grid for a map UI. The game itself is also 2D and the player can only make discrete movements between the square, but the player view is first person (you see a ...
2
votes
1
answer
143
views
How do I make AI avoiding obstacles on tile map?
I implemented 2 NPCs chasing the character using Dijkstra algorithm for pathfinding. Tile map is represented by graph, where a node is basically the tile, and the adjacency list consist of adjacent ...
0
votes
2
answers
92
views
Drawing a box using rule tiles in unity
SO I have a tile sprite like so :
I want to use this to draw boxes on a 2d map using rule tiles. But I can't seem to get how to set rules for it in unity.
These are the rules I have :
And this is ...
0
votes
1
answer
116
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! ...
1
vote
0
answers
157
views
How to make a moving platform with Unity Tilemap?
I am trying to make a 2D level of a game and want to know how to move a specific tile left and right.
All the level is designed on a single Tilemap. I want to move one platform left and right. How ...
0
votes
0
answers
388
views
How to draw thin borders / walls on a Godot tile map?
I'm trying to make a map of a home consisting of rooms with thin walls for a simple top-view game. I'm struggling to implement thin walls with the tile set.
Let me explain what I mean: if two cells ...
3
votes
1
answer
133
views
What was the rationale behind the updating of 'changed' tiles in John Carmack's Adapatie Tile Refresh?
I was recently reading up on Carmack's Adaptive Tile Refresh, of which was written extensively in this thread, to implement in a hobby gamedev project of mine: https://retrocomputing.stackexchange.com/...
1
vote
0
answers
75
views
What's the best way to store irregular areas of my map? (hierarchical pathfinding and grid segmentation)
This is for the development of a roguelike/management game.
I'm trying to implement HPA (hierarchical pathfinding with A*), and I've found a few good resources (suggestions appreciated) in the forms ...
0
votes
0
answers
463
views
Possible to have Rule Tiles work with Rule Tiles in other Tilemaps in Unity?
I am using Rule Tiles to draw walls for my top down 2D Unity game. I have already been able to implement custom Rule Tiles that will work with each other (ie two different Rule Tile setups that still ...
3
votes
1
answer
970
views
Tilemap missing collision options?
I've been having a lot of trouble getting tiles to have collision in the newest Godot 4 beta10.
I thought there was supposed to be a physics tab that would give collision options like in previous ...
0
votes
1
answer
128
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
233
views
Can I use normal images to make tiles in Unity?
If I'm not wrong, those are steps to use tiles with Tilemap in Unity
Upload sprites to Unity
Create a palette.
Upload sprites to the palette to create tiles.
I need some static images to use with ...
0
votes
1
answer
611
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 ...
1
vote
0
answers
76
views
How to structure/size isometric sprites
I'm taking a look at a isometric asset pack from Kenney, and all the images are 512x256..even images with just a small barrel in it. Seems like a lot of space is wasted?
Is this good practice, to keep ...
0
votes
0
answers
267
views
How to render and interact with a seamless wraparound world map, in the style of e.g. Civ 5, in Godot 3?
I asked a similar question on the Godot subreddit but I want to ask here as well in hope of getting more detailed/different answers.
I'm making a world map for a turn-based tile-based 3D strategy game ...
0
votes
0
answers
39
views
Player Camera and Map Scrolling not working as intended
I'm creating a top-down 2D rpg game in c++, and I can't seem to wrap my head around the concept of map scrolling.
My camera system is centered on the player every time my player moves, (cameraPos = ...
0
votes
0
answers
37
views
Unity 2d - Creating Temporary Objects Within the Scope Of the Camera View
I want to create one large tilemap, and want objects placed on it like multiple blades of grass and trees. I want the tufts of grass and tree objects to be placed based on specific placeholder tiles ...
0
votes
1
answer
160
views
How to change the alpha of a tilemap if the player is in it in Unity
I'm working on a 2D game and would like to have it so when I'm entering a building, the roof fades away. This is my current attempt, I'd just like to know how to set the alpha of a tilemap through c#.
...
1
vote
1
answer
450
views
How do I clear all gameobjects placed on a tilemap?
If I call the following on a tilemap:
myTilemap.ClearAllTiles();
It clears all tiles placed using the tilemaps built in system. But if I've placed any tiles via ...
0
votes
1
answer
190
views
Bottom-left cell position is incorrect?
I need to get the position of the bottom-left cell on my tilemap. I used Floor.CellToWorld(Floor.cellBounds.min) (Floor is the name of my tilemap) and I used Gizmos ...
0
votes
0
answers
83
views
How to quickly calculate the number of tiles between buildings in a tile system
my friend and I are currently working on a city builder game like Anno/Cities Skylines but with some own ideas and tweaks. (of course, on a much smaller scale)
Currently, we are struggling a bit with ...
0
votes
1
answer
1k
views
Unity tilemap WorldToCell returns floored world position
I have a tilemap that is filled with tiles by script. That works well so far.
Now my aim is to make the tiles interactable by making them clickable.
I achieved this by adding an EventSystem object ...
0
votes
0
answers
130
views
How to determine for every wall in a 2D tilemap where's the "inside"?
I'm working on an ARPG, and I'd like to implement a "fading walls" system similar to Diablo II's.
Let's say I have this tilemap, where
Black tiles are walls,
Brown tiles are floors,
White ...
1
vote
1
answer
407
views
Problem with placing isometric tiles above and below each other
In unity when using the in built tale palette to place tiles into the scene, I have come across a small problem. Im using an isometric tile-map and whenever i go to place a block, I end up placing a ...
0
votes
0
answers
52
views
Unity question about tilemap
So if I planning to make big location like for example Stardew Valley with tile size 32x32, should I make all map and just have it, or should I load tiles as player moves to them. I actually new to ...
0
votes
0
answers
141
views
My tilemap is semi-transparent
I am new to Unity, and I am following the following tutorial:
https://code2d.wordpress.com/2020/07/21/tilemaps/
However, my tilemap is semi-transparent. Any way to remove the transparency somehow? See ...
0
votes
0
answers
23
views
Sorting tile unity problem [duplicate]
I have a top down Tiled map, and I would like to extract every single tile from the map and set z order layer according to the Y position they have, I have already found the way to have every single ...
0
votes
0
answers
280
views
Making sure the player and the camera are in the borders
What I need is a way to automatically create an invisible border around the current tilemap (tile map uses simple rectangular tiles)
The player character uses
...
1
vote
1
answer
1k
views
Setting a border around a unity 2d tile map
I've a procedurally generated hex tilemap, which is larger than the bounds of the screen (when not zoomed out). What I want to do is create a border around the tilemap.
The tilemap is a child of a ...
0
votes
1
answer
370
views
Color glitch with tilemap.SetColor() in Unity
I've been experimenting with Tilemap to display tiles (with random colors) in script with SetColor() and other methods:
...
1
vote
1
answer
674
views
Trying to get sprite from isometric "z as y" tilemap
I'm using code like the following with a tilemap and tilemap collider 2d:
var ray = Physics2D.RaycastAll(worldCoordinate, Vector2.zero);
Unfortunately, when I ...
0
votes
1
answer
75
views
How can I determine which 2d entity was selected from a overlapping pile
I'm using C++ and SDL2 to learn about coding by creating a clone of a 2d tile-based game I enjoy.
To setup my problem; There can be multiple items dropped on a tile by the player or other entities ...
0
votes
1
answer
77
views
How can I implement the player being able to place tiles on a 1d array grid?
Tell me if I need to provide more info.
My tile-based sandbox game needs to allow the Player to place tiles He has collected. But the problem is, I do not know how I can place the tile based on the ...
1
vote
0
answers
89
views
2D tilebased collision system
Hi i want to implement a collision system (something comparable to super mario)
I would like it to have objects which can have any size (the hitbox of it)
And it should be reasonably efficient (so ...
1
vote
1
answer
449
views
My sprite is hovering slightly above my tilemap in Unity 2D
I have a simple object with a Rigidbody 2D and a Box Collider 2d, that's supposed to fall and land on a tilemap with a static <...
2
votes
1
answer
177
views
How to properly handle hundreds of layers of tiles
GOAL
I am making a top-down tile-based sandbox game, and it will have 400 layers of destroyable terrain, It will not use chunks, it will store the map in memory like Terraria, but only render the ...