Questions tagged [tilemap]

Tile map is a technique of re-using small graphic pieces, tiles, over and over again to shape the game field.

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

TiledMap pathfinding

My LibGDX game will have a tiled-base movement, and I'm trying to find a pathfinding algorithm for automatically moving a character through cells in the open-space map. Since the map will be large and ...
0
votes
1answer
24 views

How to seamlessly handle multiple procedural 2D levels in Unity3D?

I have a dungeon generating algorithm, but I would like to generate X levels, which are all connected somehow. I have a few approaches, but all of them has problems and questions, and I wonder how i....
0
votes
0answers
25 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
0answers
29 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
2answers
41 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 ...
0
votes
1answer
52 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. ...
0
votes
0answers
36 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
1answer
37 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
1answer
35 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
0answers
22 views

Unity Tilemap collider stopping player's movement [duplicate]

I am using tilemap collider to create collision between my world tilemap and the player, but sometimes when the player runs on the tilemap, it stops the player's movement and kind of makes it look ...
0
votes
1answer
41 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
0answers
39 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
2answers
88 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
1answer
175 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 ...
0
votes
0answers
27 views

Tiled map .tmx to Atlas Region libGDX

I have some tiled tmx maps I made. I have a texture atlas that contains all of the textures I'm using in my libGDX game . I have a json tiled map saver class I wrote that stores the atlas region ...
1
vote
1answer
45 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
0answers
11 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
0answers
64 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
1answer
80 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 ...
1
vote
2answers
98 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
2answers
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
0answers
26 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
1answer
42 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
1answer
102 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
1answer
50 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
0answers
110 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
0answers
59 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
1answer
47 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'...
0
votes
1answer
55 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
1answer
57 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 ...
0
votes
0answers
27 views

Creating scriptable object with scene data in editor

This question is about the use of scriptable objects. I am currently developing a game which should have many levels. I already created a system to stay in one scene and load the data from an ...
1
vote
0answers
122 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 ...
0
votes
0answers
41 views

Libgdx Box2d TiledMap Scaling

I think I'm doing something completely wrong but I just can't seem to wrap my head around the box2d pixels per meter conversion. Currently I have a Tiled map with an object layer I want to use as my ...
1
vote
1answer
79 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
0answers
30 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
2answers
53 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
0answers
83 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# ...
1
vote
1answer
513 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
1answer
224 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
3answers
248 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
1answer
73 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
0answers
67 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
1answer
115 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 ...
1
vote
2answers
516 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
1answer
90 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
0answers
72 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 ...
0
votes
0answers
20 views

Why is my Tile Map is not uploading to the pallete?

The tile atlas I made sliced and separated into different sprites. I opened the tile pallete window and created a new pallete. I dragged in the sliced tile atlas into the place where it said (drag ...
1
vote
1answer
519 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
2answers
236 views

Set stats per tile in Unity

I was trying to implement a destructable tile like: ...
1
vote
0answers
87 views

2D Map Chunks - Individual Files?

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 ...