Questions tagged [tilemap]

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

131 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
91 views

2D Tilemap Collision resolution in C#/MonoGame

A bit of context about my game: I'm nearly 2 years deep into development of my game called Cosmorists. It's programmed in C# using the .NET 7.0.11 framework, and MonoGame 3.8.1 game framework and it's ...
Stellar Roots's user avatar
3 votes
0 answers
157 views

How can I divide tile-based space into largest the possible squares?

I'm trying to find a way to take a tilemap like the top image and divide it into square spaces like the colored areas in the second image.
IanLarson's user avatar
  • 771
3 votes
0 answers
250 views

Find all tiles by ID in layer

In phaser 2.6.2, is there a way to retrieve all tiles given their ID from a TilemapLayer? The method searchTileIndex on Tilemap ...
youri's user avatar
  • 133
2 votes
0 answers
98 views

2D game make precise collisions

I am currently creating a personal 2D tile map game in Java. This is the first time I have attempted to make any sort of game, so I don't have a lot of techniques known by experienced developers. ...
LuckyBandit74's user avatar
2 votes
0 answers
987 views

How to load parts of a large tilemap like chunks in Unity 2d?

I use more pictures so you can understand my opinion better. Here is the video link I recorded. My code has a problem that I use for to render it and cause it to "lag" for 1-5 seconds, so I ...
Qusdrok's user avatar
  • 21
2 votes
0 answers
226 views

Automatic 2d tileset textures

I am currently trying around with automatically generating a dungeon. I'd like to use this tileset https://opengameart.org/content/a-blocky-dungeon TLDR: how do I automatically apply a texture to a ...
CodingKiwi's user avatar
2 votes
0 answers
749 views

Navigation Mesh, Chunks and Funnel Algorithm

I am building a little RTS-like game as a side project and I am currently working on pathfinding. My approach to pathfinding is heavily inspired by things I saw in the Starcraft II map editor, which ...
Markus's user avatar
  • 21
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 ...
Ben Mroz's user avatar
2 votes
0 answers
791 views

Webgl: pixel perfect tilemap rendering?

The problem described below is a follow-up of Seamless tilemap rendering (borderless adjacent images). I'm not sure to fully understand the rendering issue I have, so I'll try to describe as much as ...
Nemikolh's user avatar
  • 121
2 votes
0 answers
232 views

State machines and map transitions

I've implemented a [basic] FSM in my game and it currently does its job very well. Recently I have come across a "problem" that I need to show a "Loading map. Please wait..." screen for as long the ...
Yves Calaci's user avatar
2 votes
0 answers
453 views

Hex axial coordinates to table coordinates conversion

I am developing a browser game based on a hex map. I am storing my data based on axial coordinates system. I developed a function which shows me axial coordinates of hexes within ...
Abdel5's user avatar
  • 173
2 votes
0 answers
973 views

Tilemap layer scaling and Camera issue in Phaser

I'm working with the Phaser framework and I'm struggling with a camera/rendering issue when scaling a tilemap layer to simulate a zoom feature in my project. The camera size is set to 1024x768px.(...
koalaforce's user avatar
2 votes
0 answers
1k views

Multi-layered tilemap

I need to be able to efficiently render a tilemap which can be constructed this way: There is one non-transparent base layer Then there can be 3 partially-transparent layers on top of it. Each tile ...
bobby's user avatar
  • 173
2 votes
0 answers
408 views

How can I mimic an isometric perspective using square tiles?

Can an isometric perspective be mimicked with traditional square tiles? Can't the effects of the 45-degree overhead view simply be "drawn in" to the square? How would this work? Picture this: the ...
Chris Scott's user avatar
1 vote
0 answers
35 views

How to fix collision for objects beyond their green lines?

As you can see in the image those are collision lines but its kinda of disingenuous as there are I would say invisible collision blocks on the X's, I tried messing around with the sorting layers and ...
Thecodingnoob's user avatar
1 vote
0 answers
183 views

Selecting tiles with mouse on isometric map with height and slopes

I want to implement an isometric map with rectangular tiles similar to how it was in simcity 2000, where tiles could have different heights and tiles with different heights were connected by slopes. ...
SavedowW's user avatar
1 vote
0 answers
234 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 ...
Nomi's user avatar
  • 33
1 vote
0 answers
89 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 ...
genfy's user avatar
  • 43
1 vote
0 answers
106 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 ...
Oli's user avatar
  • 115
1 vote
0 answers
94 views

2D tilebased collision system

Hi i want to implement a collision system (something comparable to super mario) I would like it to have objects which can have any size (the hitbox of it) And it should be reasonably efficient (so ...
Mia's user avatar
  • 11
1 vote
2 answers
778 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. ...
Wojak2121's user avatar
1 vote
0 answers
37 views

Libgdx tiles get overlapped on render

I'm trying to create a Tilemap with 64x64 textures which follows this configuration. ...
BadProgrammer's user avatar
1 vote
0 answers
89 views

Line of Sight/Clear Path Check Theta* For Rectangle Character

I am implementing Theta* pathfinding in a tile-based 2D game. A tile is either blocked or unblocked. The character has a rectangle collider with a width and height in tiles. Is there an algorithm for ...
John's user avatar
  • 13
1 vote
0 answers
1k views

How can I generate a TileSet from an existing image of a level?

Let say I have this level from Zelda: ALTTP. I know that each tiles are 16x16. How can I generate a tileset and map from part of the original image? (Image source)
NickB's user avatar
  • 111
1 vote
0 answers
372 views

LibGDX Lights and Shadows for my 2D TiledMap Game (like Terraria/Starbound)

Im currently working on my Terraria-Clone. After I have finished generating the world, I would like to add light and shadow to my game. For example, it would be light in the Upperworld during the day, ...
KleeSup's user avatar
  • 11
1 vote
0 answers
353 views

Procedural terrain in the Style of "Zelda: A Link to the Past"

I am working to create a system that randomly generates pseudo-3d terrain on a tile grid using the methods used in the legend of zelda games between link to the past and minish cap. I have created a ...
zane49er's user avatar
1 vote
0 answers
1k views

How to fix pink tiles when there is a problem with the Shader?

Because of some dumb mistake I did fifth time, I had to repaint my level in my 2D game. The problem is that the tiles I use from the Tile Palette turn into pink ...
padawan's user avatar
  • 233
1 vote
0 answers
91 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, ...
user9564371's user avatar
1 vote
0 answers
66 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 ...
ralh's user avatar
  • 111
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 "...
Decrypted's user avatar
  • 111
1 vote
0 answers
436 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 ...
Garflington's user avatar
  • 1,055
1 vote
0 answers
130 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 ...
Tudvari's user avatar
  • 721
1 vote
0 answers
356 views

Performance problems with scrolling html5 canvas for large tile-based game

I try programming a splix.io clone as an electron app and do the visualization via the html5 canvas. The movement across the tiles should look fluent like the original, so I target 60 frames a second. ...
Medolie's user avatar
  • 11
1 vote
0 answers
85 views

LibGDX TileMap problem

my LibGDX map find olny two Layers but the map.tmx file contains more than two layers. Where is the problem? ...
Vincent Schiller's user avatar
1 vote
0 answers
141 views

Why are my water tiles not animating?

My game can display tiles such as Grass tile, Dirt tile and Rock tile with no problems. Now I am trying to display water tile and animate it but for some reason it is not animating and only displaying ...
AaySquare's user avatar
1 vote
0 answers
198 views

libgdx- tilemap rendering problem

I don't really know how to describe my tilemap rendering problem with words, so I think the best way is to show the pictures. This is how my map looks like when it rendered correctly: but when I ...
TNT6's user avatar
  • 21
1 vote
0 answers
402 views

Using binary space partition to lay out scenes in game

Q: How can I randomly lay out these house scenes in the larger scene such that they don't overlap? I'm using the Godot Engine to create a little 2D RPG kind of game. I'm laying out a village in a ...
Ertain's user avatar
  • 63
1 vote
0 answers
404 views

How to stop this object from overlapping tile's corners in 2D tilemap

I am using a tilemap to create my 2D world. All tiles and the player has an AABB. Currently, I'm detecting collisions with surrounding tiles the player is in, from the player's center. This works, but ...
M.T.'s user avatar
  • 11
1 vote
0 answers
294 views

Advice on mapping tiles to a height map/3D world

I've been attempting to think of a way to map tiles to a height map. Where a grid can be either layered or integrated into the world data. However, since I am not using voxels I could use some advice ...
Gen's user avatar
  • 11
1 vote
0 answers
127 views

Cocos2dx v3 Problem with moving Sprite on tilemap after it was scrolled up

I have a problem I can't solve so far. I have a scene with tile map on it. And there is a Sprite spawnpoint on map. This Sprite should do MoveTo() action to the point where TouchEnded(). It all works ...
x90's user avatar
  • 11
1 vote
0 answers
632 views

Optimize field of vision algorithm in a grid tiled map

I am trying to implement Field of View algorithm in my game and I followed the great tutorial here : sight-and-light and here is what I got so far : As you can see it works fine for me :) And then I ...
user772349's user avatar
1 vote
0 answers
844 views

How to use multiple tilesets in a map?

I'm currently looking at this phaser example: http://phaser.io/examples/v2/tilemaps/blank-tilemap Here, the author creates a simple tilemap editor. In line #33 he adds a preloaded image as tileset. ...
john d. doe's user avatar
1 vote
0 answers
418 views

Box2dMapObjectParser isometric map - bodies have wrong position and size

I'm using Box2dMapObjectParser to load Tiled objects layer onto my IsometricTiledMapRenderer'ed ...
Lior Iluz's user avatar
  • 113
1 vote
0 answers
121 views

Hexagonal tilemap is being distorted

So I made a hexagonal tilemap of ocean tiles and then picked a few tiles to be land. When I pick all adjacent tiles to the hexagon it usually works, but for tiles that are on certain columns it does ...
TheMagicShroom's user avatar
1 vote
0 answers
290 views

Climate / weather generation on 3d hex map

I am working on 3d hex map game. I am aiming to dynamical generate map (as new players joins). To make the map realistic I am looking for some climate/weather models which possibly I could use so that ...
Abdel5's user avatar
  • 173
1 vote
0 answers
233 views

Efficiently rendering tiled map on OS X

I'm writing an original (top-down) SimCity clone in Swift and attempting to use SpriteKit as the basis for the game. However, I am running into performance issues when rendering and animating the tile ...
Christian Benincasa's user avatar
1 vote
0 answers
694 views

Sprites on scrolling tmx map (LibGDX)

I have .tmx map loaded, and a camera to see it. The map is bigger than the camera viewport, so I need to move that viewport scrolling the camera. Now I want to draw a sprite on the map. To do that, at ...
Victor Buendía's user avatar
1 vote
0 answers
226 views

How can I modify my procedural shadows to also show some of the walls?

I'm rendering shadows in Libgdx with the method from this tutorial. I think it's a nice and easy method. I render all my shadows in a framebuffer, then invert it. Before invert: After Invert: ...
Kani's user avatar
  • 177
1 vote
0 answers
271 views

Rendering tile maps for mobile devices

Hitting a bit of a roadblock with my game's development and I'm just looking for some outside advice. I'm trying to render a tilemap for my mobile game (Android) and I'm using LibGDX. Now, here's ...
yesbutmaybeno's user avatar
1 vote
0 answers
431 views

Touch Gesture Map Movement

I really dig the way that the map is moved in Clash of Clans (https://itunes.apple.com/ca/app/clash-of-clans/id529479190?mt=8)... I can recognize the pinch and finger movement needed for the zooming ...
antman's user avatar
  • 11