Questions tagged [tilemap]
Tile map is a technique of re-using small graphic pieces, tiles, over and over again to shape the game field.
703
questions
1
vote
2
answers
386
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
1
answer
35
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
1
answer
228
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
276
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
0
answers
24
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
90
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 ...
0
votes
1
answer
385
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.
...
3
votes
1
answer
122
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/...
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 ...
1
vote
0
answers
45
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
100
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#.
...
0
votes
0
answers
80
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 ...
0
votes
1
answer
3k
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
1
answer
69
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
1
answer
53
views
Having a Logic Error in my tile rendering code
I am a novice programmer.
In my program, I can render a 5000 x 500 map, but it renders incorrectly, instead of this :
,,~,,,,~,,,,,~,~,,,,,~~,,,~,,,~,,,~,,~~~,~~~,,,~,,,,~,~,,,~~,~,,~,~,~~,~,,,,,~,,~~,...
1
vote
2
answers
459
views
Cocos2d savegame cctmxtiledmap
my game features several tilemaps that are initially loaded from a tmx file and modified during gameplay.
How can I save the changed tilemaps in a save game? Will NSCoding do the trick here or is the ...
10
votes
2
answers
1k
views
Diagonal line of sight with two corners
Right now I'm using Bresenham's line algorithm for line of sight. The problem is I've found an edge case where players can look through walls. Occurs when the player looks between two corners of a ...
0
votes
1
answer
54
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
95
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 ...
1
vote
1
answer
210
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 ...
2
votes
1
answer
1k
views
How to render a large tile-based 2D world efficiently (using JavaFX/ScalaFX or more generally)
I have a file tileset.png containing a dozen 32*32 tiles. When my game starts, it generates the world randomly with the available tiles and the size of the world ...
0
votes
1
answer
503
views
Why isn't my tilemap collider appearing?
I am trying to make a 2d game but my player falls through the tilemap every time.
My tilemap collider doesn't seem to show up.
What is going on and how do I fix this?
The first image is rigidbody ...
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
418
views
Removing walls of a tilemap at runtime in unity
I've been trying to implement some light procedural generation into my game, nothing fancy. Just spawning rooms down in different areas in order to add some replayability. I watched a few videos and ...
3
votes
1
answer
500
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
1
answer
757
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.
2
votes
1
answer
464
views
How can i get object from TMXTiledMap and store it in Dictionary variable ? [duplicate]
I've been following a tutorial to make tiled map in cocos2d x 3.0 ,
but i couldnt complete the rest of the tutorial because its for coco2d x 2.0 version,
How can i get a value of property that is ...
1
vote
2
answers
1k
views
Which data structure to use to render a large isometric game world?
I'm starting development of a 2d isometric (tiled, roguelike) game and I'm brainstorming which kind of data structure I would use to store runtime data like tiles and entities, but I don't want to use ...
1
vote
0
answers
53
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
158
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
27
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 = ...
1
vote
1
answer
706
views
How can i get a value from object in tmx file in Cocos2d x 3.x?
I want to set my sprite in x coordinate based on an object in TMX map file,
this is my code:
...
30
votes
2
answers
17k
views
Algorithm for procedural 2D map with connected paths
Problem to solve: Generate a random 2D dungeon map for a tile-based game where all rooms are connected.
I am looking for better solutions than what I currently have.
My current solution is that I run ...
0
votes
2
answers
667
views
Generating nav meshes from tile based map (2D)
I'm working on a pathfinder for a MMORPG game, it's not mine; I'm RE it, now I need to create a pathfinder for monsters. But I figured that the client uses tiles for it's pathfinder (for players). ...
0
votes
0
answers
26
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 ...
2
votes
1
answer
888
views
How to zoom in and out the full tilemap from center in phaser?
I am developing a game where I need to zoom in entire map also I can be able zoom out. I have created a tilemap using tiled software and rendered it using phaser.js. How can I add this function to my ...
0
votes
1
answer
194
views
Turn-based grid movement - each click of the clock you want to move the player
I am working one the movement for a tactical turn-based pygame.
I'm stumped as to how to get a selected object to move one tile at a time up to it's max movement to the mouse's pos.
Right now this is ...
0
votes
1
answer
676
views
Love2D STI library not drawing map at all (black screen)
I'm trying to use a pretty standard map with the Simple Tiled Implementation module for Love2D, but no matter what I try, I can't get it to display anything but a black screen. Here's my current code (...
0
votes
0
answers
82
views
How can I select the larger multi-tile sprites in tilemap in Unity?
I'm trying to import the larger tiles into the tilemap so I can add them on the grid. But once imported, it's either impossible or really hard to select the large tile. Am I doing it wrong? Is this ...
0
votes
1
answer
187
views
Isometric tilemap circle around object
I am developing an isometric game like Anno 1602.
I have an isometric tilemap. The default tilesize is 64x31.
My goal is to show the area a building has influence to. For that I want to show a circle ...
0
votes
1
answer
233
views
Tilemap is rendering all tiles as black squares
I'm trying to render a 2D tile map. I've placed a Tilemap object in the scene from the create 2D object context menu, set a reference to it to one of my script ...
8
votes
2
answers
617
views
Efficiently updating building effect radius coverage
I've already searched for answers but I was not able to figure out the best approach for handling expensive functions/calculations.
In my current game (a 2d tile-based city building) the user is able ...
1
vote
2
answers
389
views
Efficiently determining which buildings are connected by roads
I have a question about the most effective way to detect road connection in a tile based world. Some time ago I already asked for "How to improve performance for expensive functions in 2d city builder"...
-1
votes
1
answer
270
views
Java create a Polygon for each island in tile game
I am making a 2d top-down tile based game, which is randomly generated each new world.
What I want to do is create a Polygon (or other more appropriate shape I don't know of) for each landmass not ...
0
votes
1
answer
121
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
1
answer
281
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 ...
2
votes
1
answer
617
views
Unity higher Z position tiles rendered underneath
When placing tiles in an isometric tile-map in Unity, I try to place blocks on top using the "Z Position Value" However it looks like higher Z position values get rendered underneath.
In ...
0
votes
0
answers
59
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
253
views
Tiling 2D textures in random order
I am wondering what the best way to make a random set of 2D textures. Currently I have tried the follow code but I am aware that when this comes to collisions that would be an issue. Therefore I would ...