Questions tagged [tilemap]
Tile map is a technique of re-using small graphic pieces, tiles, over and over again to shape the game field.
728
questions
1
vote
2
answers
803
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
17
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
158
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
1
answer
451
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
0
answers
37
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
48
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
66
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
35
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
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
1
answer
250
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 ...
0
votes
0
answers
950
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
782
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
36
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 ...
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 ...
0
votes
0
answers
41
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
77
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
93
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
39
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
422
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
30
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.
...
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
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.
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
188
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
613
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
586
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
49
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
vote
1
answer
353
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
95
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
148
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
839
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 ...
2
votes
1
answer
1k
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
2
answers
67
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 ...
0
votes
0
answers
277
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 ...
1
vote
2
answers
2k
views
How to flatten the collider for a tilemap?
I am relatively new to game development, and am working on a simple 2D platformer. I have created a tilemap and painted some tiles for the character to walk on.. but he is getting stuck. Yes, I know ...
1
vote
1
answer
64
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
972
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 ...
0
votes
1
answer
232
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 ...
3
votes
2
answers
448
views
Why use sprite tile maps on the GPU in WebGL?
I'm trying to figure out the best way of rendering my layered tiled maps with WebGL, and have come across this tutorial several times: https://blog.tojicode.com/2012/07/sprite-tile-maps-on-gpu.html
...
2
votes
1
answer
166
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
118
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
198
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! ...
3
votes
1
answer
1k
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 ...
1
vote
0
answers
237
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
586
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
142
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
89
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
1
answer
195
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#.
...