Questions tagged [tilemap]
Tile map is a technique of re-using small graphic pieces, tiles, over and over again to shape the game field.
756 questions
0
votes
0
answers
16
views
How to properly manage vertical offset for ghosts oscillating between tiles in Pac-Man ghost house
-2
I am implementing ghost behavior in a Pac-Man clone, specifically the behavior when ghosts are inside the ghost house during the waiting phase.
The issue is that ghosts inside the ghost house do ...
1
vote
3
answers
247
views
Enemy movement system on a 2D grid (Zelda-like)
I’m trying to implement a top-down Zelda-like enemy movement system. Consider a screen of x tiles wide by y tiles tall, each tile being 16x16 pixels.
I’m not asking for code here. I’m asking for ...
0
votes
0
answers
38
views
How do you setup a ramp with an existing tile-set in Unity?
(Beginner questions)
How do you setup the ramp with the tiles in unity?
The graphics and the behavior?
I've been checking this free tileset:
In the image it has connected ramps
I cannot seem to get ...
0
votes
0
answers
27
views
TileMapLayer doesn't move along with its parent node
I'm using Godot 4.4.1 and currently learning how to build auto dungeon generator. The dungeon "room" is developed using TileMapLayer.
Room parent are set to ColorRect for background.
I use ...
1
vote
2
answers
137
views
Change the tile in the tile map at runtime
So I am making a game which has a farm. The farm is a tile map with each individual tile being a crop/mud.
I want to achieve the following
As the player interacts with a particular crop tile, I change ...
0
votes
0
answers
136
views
How do I add an outline to a Unity tilemap?
Is it possible to add a nice outline to a unity tilemap?
For example, if my tilemap looks something like the image on the left, I want to make it render like the image on the right:
I found this ...
0
votes
0
answers
59
views
What are some different ways that tiles are stored in a game during runtime
I am making a 2d rpg game that uses tiles to store the terrain data. Also the map is procedural generated infinite world type.
I saw an approach called clipmaps to ...
0
votes
0
answers
96
views
How to Have Tiles of Different Materials on Single Tilemap
I'm developing a tile-based game where some of the tiles have unique materials (generally to avoid repetitive patterns by sampling a large or procedural texture using world space coordinates). However,...
0
votes
0
answers
70
views
Invalid Pixel Offset Calculation Fix?
I am currently using a SDL_Texture *texture as a chunk in my world that is being Perlin noised onto to make terrain.
Using a 2d array of these I tile the plane. But ...
1
vote
1
answer
322
views
What is the relation between TileMapLayer, Terrain Set and Terrain?
Godot 4.3 introduced TileMapLayer as node, which was previously part of TileMap node.
Each TileMapLayer allows defining different Terrain Sets.
Each Terrain Sets allows defining different Terrains.
I'...
1
vote
0
answers
67
views
How are the Inspector, Select Tab, and Paint Tab related in the Terrains settings?
use: Godot Engine v4.3.stable.official, TileMapLayer
How are the Inspector, Select Tab, and Paint Tab related in the Terrains settings?
There are many settings that need to be configured in Terrains, ...
1
vote
1
answer
200
views
I'm not sure how to set up tile animations in TileMapLayer
use: Godot Engine v4.3.stable.official, TileMapLayer
I don't quite understand how to configure tile animations.
As a reference, I'm watching this video:
https://www.youtube.com/watch?v=it0lsREGdmc
I'm ...
1
vote
2
answers
690
views
How to use Y-sort between the TileMapLayer and the player
With the following structure, I turned on Y-sort for everything, but it doesn't work as expected (the player can't stand in front of the tree).
I'm using Godot v4.3.
Node tree
Standing front: Not work
...
1
vote
1
answer
335
views
Understanding polygonal approach for procedural generation of roads and rivers
First of all, I have already discovered these questions and their answers:
Road / river generation on 2d grid map
Algorithms for rainfall + river creation in procedurally generated terrain
Generating ...
0
votes
0
answers
103
views
Merging sprites to be used as a single tile
I am attempting to make a CompositeTile out of 4 sprites (one for each corner of the tile) that can be used as a single Tile ...
0
votes
1
answer
173
views
How Does Y Sort Allow Partial Overlap with Objects in Godot?
I watched the video:
https://www.youtube.com/watch?v=60rpO_0CJII
Why is the character able to move behind the chair? I understand that it's thanks to Y Sort, but it seems to be applied to the entire ...
1
vote
0
answers
149
views
I would like to know more about the “three commonly used tile sets” mentioned in the video [duplicate]
Around 35 seconds into this video, three commonly used tilesets are mentioned: "15-piece, 47-piece, Reduced."
The video points out some issues with these tilesets, but it doesn't seem to ...
0
votes
0
answers
148
views
Changing tile texture based on neighbor tile types
I am creating a 2D game with Unity. I have a map, which is a Tilemap. Currently I have 3 types of tiles: water, sand, grass.
Goal: I need to make a tile which would automatically change its texture to ...
1
vote
0
answers
157
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
101
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
0
answers
84
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
0
votes
0
answers
160
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
156
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
1
answer
85
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
482
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 ...
1
vote
1
answer
494
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
0
answers
56
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
186
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
1
answer
538
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 ...
1
vote
1
answer
201
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 ...
0
votes
2
answers
255
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
85
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
84
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
283
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 ...
0
votes
0
answers
151
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
423
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
165
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
51
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
288
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
401
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
368
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 ...
0
votes
1
answer
60
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
0
answers
38
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
383
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
73
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.
...
3
votes
1
answer
4k
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
2k
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
254
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
447
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
2
answers
951
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 ...