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
3answers
47 views

How to store information into the tile?

I have made a map via TilePallete tool. Now I want to store information in certain tile. How I can do this? ForEx: I'm hittin a certain tile and I need it to have info about health remaining. For ...
0
votes
2answers
52 views

How to figure out that I'm onto ice tile?

It might be very silly question but serfing for two hours still can't find an answer. I'm trying to replicate battle city. I've made level with TileMap. But can't figure out how to know that my tank ...
-2
votes
2answers
86 views

Loading the map from an image file in C++

For my platformer tile-based game I want to be able to load the game map from an image file. Consider the following 25x15 px .png (enlarged) representing some level: Assume that each specified ...
1
vote
1answer
53 views

C++ SDL2:2D tilemap with every tile has its own behavior

I am working on 2D tile based game. I want to render the tilemap from a file but every tile has its own behavior for example: magmablock : poorlava(); slimeblock : knockback(); I have this ...
0
votes
1answer
65 views

Tile based game data structure

I've been working on a top down 2d game and the character moves freely around the map, like zelda link to the past. How would you model the data structure for such a game in order to implement ...
0
votes
0answers
51 views

(Unreal) Creating 3D tiles (cubes) for the scenery of a 2.5D rpg (similar to Pokemon Gen IV and V)

I developed a concept for a college class and I think it has enough potential to actually become a game. The visuals will be similar to games like Pokémon Black and Octopath Traveler as in the ...
0
votes
1answer
19 views

Unable to edit tile sizes in unity

I'm trying to change the size of sprites in unity to fit the palette. Except there are no options to change multiple sprite sizes at once. But when I watched a youtube video on tilemaps and palettes, ...
0
votes
0answers
39 views

How to erase the small gaps in tilemap in Unity?

I want to erase small gaps in my tilemap. The gaps look like this: The texture I used has no gaps: I tried by disabling anti aliasing.It didn't worked so what can I do in this case?
1
vote
1answer
39 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
44 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
31 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
43 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
118 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
38 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
51 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
69 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
25 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
65 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
42 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
106 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
297 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
35 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
12 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
87 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
187 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
155 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
27 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
52 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
118 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
92 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
191 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
78 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
52 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
190 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
60 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
28 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
160 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
58 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
91 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
32 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
54 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
121 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
810 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
255 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
332 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
75 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
68 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
182 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 ...