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
0
votes
0
answers
42
views
How to check in Unity whether tile B can be reached in a straight line from tile A?
I'm currently trying to smooth out my A* paths based on this article.
This is what I want to achieve:
But sadly I'm stuck at implementing the Walkable method.
I ...
0
votes
2
answers
125
views
Capping neighbour height difference on heightmap?
I am generating a heightmap with some basic perlin noise but I need to cap the differences between each neighbouring value. A cardinal neighbour can only be ...
2
votes
1
answer
3k
views
Get the tile in unity tile map
I am trying to get the sprite of a tile in unity from where a raycast hits. Right now it only works in some cases, and always in positive x.
This is my current code.
...
1
vote
0
answers
83
views
What are the pros and cons of using larger tiles in a 2d game with freely placed entities?
I am working on a 2d game with the Godot Engine and I'm about to start drawing the tiles for the ground tileset. These will be used solely for the purpose of painting the ground because the trees, ...
1
vote
1
answer
1k
views
Saving predesigned tilemap "rooms" and access them in script in Unity3D?
I'm working on a top-down rogue-like in Unity3D, and I already have some kind of dungeon generation.
The next feature I'd like to implement, is to predesign some kind of "event rooms" (i.e. boss ...
0
votes
1
answer
2k
views
Tiles in the Tilemap dont overlap properly
This is my first try making a "proper" game in Unity. I'm using the latest version (2019.2.2 at the time of writing) and I'm writing with C#. This is a project I'm doing for my studies, together with ...
0
votes
1
answer
3k
views
Can I use different Tile/Sprite Sizes on the same Tilemap?
My partner and I are creating a 2D RPG with D&D elements with Unity.
I am very new to Unity and making games in general, apart from 2 games which I created with Java and the rougelike tutorial ...
1
vote
0
answers
56
views
Reusing tilemap segments
I'm wondering how I can incorporate reusable tilemap segments in my workflow.
For example: I construct a room out of my tile palette, and I want to reuse this room in multiple places.
Is there some ...
1
vote
2
answers
650
views
How to create a map array with multiple layers?
I’m trying to create a map array without using JSON because I want to dynamically generate the map:
...
1
vote
1
answer
2k
views
OpenGL tile map rendering with 1 quad for all tiles and 1 texture atlas
I'm using lwjgl to experiment with 2D games.
I made some maps with Tiled (small 30x30 maps) and currently I draw them by loading the tileset image as one texture and extracting from it the texture ...
1
vote
1
answer
93
views
2d array with empty elements
I am working on a game with a number of different grid components. Each grid would be about 15 squares wide by 15 squares tall. Each of the squares may either contain an item or not.
Is there any way ...
0
votes
0
answers
32
views
Frog-Lilypad Animation: Animate Unity2D Tilemap based on Player position
I'm developing my first Unity game, involving a frog jumping on lilypads. As the frog leaves a lilypad, I would like it to sink beneath the surface. Here's what I have currently, with the lilypads as ...
0
votes
0
answers
676
views
Moving player one tile at a time (Javascript)
I've been watching this tutorial and found the code works flawlessly. Although, there is something he doesn't cover in the video. How to move the player one tile at a time. Every tutorial I've found (...
1
vote
1
answer
1k
views
Getting center cell of Unity3D's isometric Tilemap, the resulting position offsetted by a distance?
I am new to Unity3d's Tilemap system and found a problem I couldn't figure out at the time of writing this question. What I want to do is to create a bunch of GameObject overlaid in each of the tile's ...
2
votes
2
answers
2k
views
Destructible tiles in unity's tilemap
I'm creating a 2d game and I want to make it so that tiles are destructible whenever a projectile collides with a tile, the problem is I don't know how to get the tile that the projectile is colliding ...
9
votes
2
answers
2k
views
Is there a name for this technique to put the tiles on the corner of a level?
A very common approach in development of old games is to put the tile set on the corner of a level, to use it as a reference. For example:
On this level, the developers put a set of tiles in the ...
0
votes
0
answers
31
views
Find mouse pos in 3D space?
I have a game where there is a set of tiles rotated 45° away from the camera. I want to work out what tile is being hovered over by the mouse, and for that I need to translate the mouse pos on the ...
0
votes
1
answer
257
views
How to handle a scrollable map and player coordinates
I have a large map that a player will navigate over. Currently, it is just a single background image, but I would like to make it tiled map. How do I properly keep track of player coordinates?
...
0
votes
1
answer
292
views
How can I do a Metroid like transition between two tilemaps with Monogame Extended?
I want to do a transition like those in the Metroid games. Here is an example of what i mean: https://www.youtube.com/watch?v=RKJ3MAi0ZI0.
You enter the door, the screen fades to black and the camera ...
0
votes
1
answer
1k
views
How do I determine the rotation of a Tile using Tilemap in Unity 2d?
I want to know the rotation of the tile in C# in order to do some logic on another object that is sitting on the tile. The rotation matters for the logic. I don't see anything except GetTileData in ...
1
vote
0
answers
2k
views
How to write on a Tilemap using a C# script?
I loaded my tileset asset TileSheet.png using the Tile Palette (Window -> 2D -> Tile Palette).
This created the folder "...
1
vote
0
answers
371
views
Aligning a sprite with a tilemap
I'm trying to create a hybrid system for my Unity game. I want to use tilemap for collision and use sprites for the world.
I drew a sprite onto a 40x40 checkerboard grid as can be seen here. I wanted ...
0
votes
1
answer
327
views
Algorithm for finding edge vertex points on a tilemap
I have a 2d tilemap array contains 1 or 0. 0 corresponds empty tile, 1 corresponds solid tile. If tile is 1 I draw a texture.
I have to find edge vertices and coordinates that 1's grouped.
I couldn't ...
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
232
views
Should I generate 2 array map or use tilemap?
So, I'm trying to build a 2d multiplayer bobmerman game. Right now I have whole map as 2d integer array. I'm thinking if I should change it to tilemap. In the future, I will want to be able to ...
2
votes
0
answers
1k
views
Unity2D TileMap Collider Update Optimization
I'm currently working on a 2D tile-based side-scroller (similar to Terraria). I am using Unity's TileMap feature to draw tiles onto the screen and have my player collide with them as if they were ...
1
vote
1
answer
722
views
Finding a path with minimal number of turns on a grid?
There is a path, generated by my implementation of A*, where diagonals aren't allowed, and the heuristics is the Manhattan distance.
Is there a way to always or nearly always find a path with the ...
0
votes
0
answers
41
views
Placing tile on second layer results in wrong tile, or changes nearby tiles
So I am working on a 2d game and running into strange behavior when trying to add tiles to a tile map.
The first layer seems to work fine but if I add a new layer it will always place the same tile ...
1
vote
2
answers
83
views
Even tiles wide pathfinding on square based tilemaps?
By editing my A* algorithm as such that:
a tile is valid if all of its neighbours are valid (checking this N-1 deep)
I can find N wide paths, where N is odd, and my unit just follow the "center" ...
0
votes
0
answers
790
views
How do I determine the distance between two points in tilemaps in unity?
If I have a tilemap with multiple layers, is there any way that Unity offers to help me infer the distance between the two points?
Also, as a related question: Are there any libraries written in C# ...
3
votes
1
answer
7k
views
How can I change a sprite used for a Unity Tilemap tile at runtime?
I want to change Tile's sprite during runtime, but it doesn't render.
...
3
votes
1
answer
2k
views
Loop around a 2D Tile Map
I have made an algorithm for procedurally generating a 2D tile map in Unity.
The player can use the mouse to pan the view and look at the map.
My intention was that when the player reaches one of ...
3
votes
3
answers
2k
views
How to render top-down perspective in a tile-based RPG?
My question is specifically about the type of perspective that GBA Pokemon games like Fire Red/Leaf Green have:
I'm not sure of the correct terms for what I'm trying to achieve.
I am using SDL2 and ...
1
vote
1
answer
394
views
Unity3D Raycasting in Start behaves uncorrectly, but works correctly in Update?
I have this method, which just raycasts at a position downwards, and checks what tile is there, if there is one:
...
1
vote
0
answers
128
views
Why don't I see tile-based 3D graphics? [closed]
As we know, tiles can make it quicker to update large portions of the display at once, as compared with a bitmap. To put, say a letter, on the screen, the Commodore 64 typically does two writes (the ...
0
votes
1
answer
2k
views
How can I show tilemap coordinates in-game in Unity?
I have a game that uses a tile map, and I'd like to draw numbers representing positions on the tile map while playing the game. This would, for example, let me easily write down a note that I want to ...
8
votes
2
answers
17k
views
Player gets stuck on edges between TilemapCollider2D tiles
I'm currently working on a simple 2D Physics-Based Platformer Project. However, I ran into the following issue:
I'm using a Tilemap and a TilemapCollider2D to display the world. When I move the player ...
0
votes
1
answer
595
views
Isometric coords to cartesian coords
I'm new to the tilemap feature of Unity, and I'm having a hard time with all those coords.
I created a new project, added an isometric tilemap and left all values to their default. In the Unity ...
1
vote
0
answers
111
views
Connecting varying tilemap layouts at possible connection points?
I'm building an isometric 3D ARPG in Unity3D, and
I have a tilemap, for example a dungeon.
I have tiles marked where a door could be placed.
I select a random "could-be-a-door" tile from the ...
2
votes
1
answer
4k
views
Unity tilemap collider not colliding with rigidbody
In the wireframe you can see the tilemap collider for this hill. The red circle falls right through however. The circle has a 2D rigidbody attached. Everything is on the Default sorting layer and on ...
2
votes
2
answers
1k
views
Set stats per tile in Unity
I was trying to implement a destructable tile like:
...
1
vote
0
answers
289
views
2D Map Chunks - Individual Files? [closed]
I have a 2D map of 500 x 500 tiles, split into chunks of 256 x 256.
I'm saving each chunk as a separate file, and I have them loading in as the player moves around. This means however there's over ...
0
votes
1
answer
118
views
Split tile based map file into multiple files
I have a gigantic map file (1440x1080) that I wish to split into smaller files (45x45) for faster client reading. I plan to split offline (when running DEV server) so I am not too worried about speed....
0
votes
0
answers
598
views
Godot: Possible to create a 2D tilemap and set it as a texture for a 3D surface?
If I created tilemap of some sort of pattern or image and wanted to set it as the texture of a 3d surface or 3d model, how would I do it?
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
185
views
Map generator sometimes doesn't work
I am making a dungeon map generator and am currently trying to make it place empty rooms. It first checks if the space is empty and then places a room.
The problem is that most of the times it ...
0
votes
0
answers
59
views
server coordinate to client coordinate
I've a really quick and maybe dump question and I don't really know how it is handled generaly. I want to make a tile base multiplayer game.
Player doesn't teleport from a tile to another but just ...
0
votes
1
answer
181
views
How to propertly send map to clients in MMO?
I'm designing a game where the map has 1 M tiles. The game is simple, is a 2D game with low graphic requirements and without player movements, only change states, so I don't need to update player ...
0
votes
7
answers
20k
views
Unity create Animated Tilemap?
Im trying to create an Animated Waterfall Tilemap from a tutorial video.
In his video when the author right clicks he can see a Animated Tile > under CREATE option.
But In my case its not there !! ...
0
votes
2
answers
721
views
How do you setup a scrollable overworld map on an HTML/JQuery based game?
Problem and Requirements
I'm putting together a simple game that will involve an overworld map consisting of 12px x 12px square terrain tiles. These maps may be as large as 500x500 in size (so 250k ...