Hot answers tagged

4 votes
Accepted

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

I solved this problem by extending the TileMap class thus: ...
amkingTRP's user avatar
  • 198
3 votes

How do I smoothly connect isometric tiles at different height levels?

I looked at this old question here: How to create tilted (height) isometric tiles. but I can't understand the solution of "shearing to the right, then rotate by 45 and scale in height". The ...
Isikyus's user avatar
  • 31
3 votes
Accepted

How do I place objects so they snap to my TileMap in Godot?

Godot snaps to the grid guidelines and not the cells between them. So you won't snap to the middle of the square that you're dragging to. That's because you're snapping the position of the object (...
idbrii's user avatar
  • 783
3 votes
Accepted

Is there any standard format for engine agnostic 2D tilemaps?

I'd say the closest you're likely to get is Tiled's TMX format. Many games will use Tiled as a map authoring tool and use import plugins for various engines to import those maps at development time. ...
DMGregory's user avatar
  • 133k
2 votes
Accepted

Making a 2D Grid Map UI in Unity

You could use a setup with two cameras. The first one pointing at the 1st person view of the player. The second one pointing at a Tilemap and rendering to a render texture by setting that render ...
Philipp's user avatar
  • 119k
2 votes
Accepted

How do I make AI avoiding obstacles on tile map?

Since heights of tiles and entities may vary dramatically, the idea of comparing their centers is wrong way to solve this problem. After some research I came up with a solution which supposes ...
Steyrix's user avatar
  • 203
2 votes

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

If I'm reading Godot's Terrain TileSets documentation right, you can potentially select a different tile for any permutation of terrain types painted in this square and the 8 squares around it. So if ...
DMGregory's user avatar
  • 133k
1 vote
Accepted

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

You need to decouple/disconnect different parts of your application. Ideally, you want to have some object representing the board in memory which only deals with gameplay-specific concerns (placing ...
Basic's user avatar
  • 1,242
1 vote
Accepted

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

I think what you want is to create a black texture with the same size as your screen, set it as the render target, render blurry white circles to it at the locations of the light sources, with the ...
HolyBlackCat's user avatar
  • 2,006
1 vote
Accepted

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

What I would suggest in this case is the following: Rendering details like pixel colour, are usually not crucial to game logic. Since you will need to render the 1000x1000 map as a texture, it is ...
Engineer's user avatar
  • 29.4k
1 vote

How can I make colliders-only visible in Godot?

Seems I actually can find invisible meshes relatively easily by switching display mode to "Display Overdraw", which is great. There's still a little guesswork as to where to look, but that's ...
Michael Macha's user avatar
1 vote
Accepted

How to process tiles of different sizes?

It appears like the tiles you have here are partially transparent tiles that are supposed to be placed on a separate layer with full tiles on the layer below them. That way they can be used to create ...
Philipp's user avatar
  • 119k
1 vote

How to disable a layer in a Tilemap's collision mask via code?

You should be able to set an empty mask. Here you are setting the mask of the layer 0 to the value 2 (which has only one bit set): ...
Theraot's user avatar
  • 26.2k
1 vote

Why use sprite tile maps on the GPU in WebGL?

This technique has the advantage that you can render the whole tile layer as one single quad. That means that there are just 4 vertices that need to go through the vertex shader. The rest happens in ...
Philipp's user avatar
  • 119k
1 vote

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

You need 698 tiles for the full blob pattern with three terrains. It's less than \$3^9\$ as not all combinations make sense. You can see the full list with this tool, selecting blob, and put terrains ...
BorisTheBrave's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible