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
1
vote
0answers
37 views

Javascript: world tile generator bug? collision not working, player falls down? [closed]

Hi I have a serious problem here, When I generate my tile map from an array with numbers [0,4, ...] (0 > for air, 4 for solid) inside of generateWorld()... the ...
2
votes
3answers
628 views

Array-based tilemaps and bounding box (aabb?), how to do efficient tile collisions?

At one point in my game I had every tile as it's own object, so that I could use standard AABB collision testing easily. I later realized this was horrible for performance and simply made my tiles be ...
1
vote
0answers
161 views

How do I calculate the visible area of a big isometric map? [duplicate]

I have a simple isometric map of 128px x 128px, tile in a 2D field [xxxx][xxxx] I have a problem with my calculating. I need to get startx:[0], startY[0] and ...
3
votes
1answer
79 views

How to implement different shapes for an area of affect spell?

Let W = wizard Let 0 = Cast range of spell, or AOE Here is the problem: I have a 2D tile map of squares. Let's say I want to have a wizard cast a spell that surrounds his body equally. For this, it ...
-1
votes
1answer
507 views

Perlin noise always produces the same map. How do I generate a different map?

My tile map takes a spritesheet, slices the tiles up based on a resolution, and assigns each tile to an array, which uses an integer. Since perlin noise generates a float between 0 and 1, I multiply ...
0
votes
0answers
52 views

Using libGdx and Box2d for game and getting this error- “incorrect checksum for freed object”

I am new in game development and I am using libGdx with box2d in my game, whenever I try to switch screen (both screens has ...
5
votes
2answers
2k views

How can I fill the interior of a closed loop on a tile map?

In my game the player can dynamically modify terrain. The map is stored within a 2D array of prefabricated 3D objects. This is working well for now. The player modifies terrain by selecting what ...
0
votes
1answer
610 views

Data structure for logical representatios of maps for a 2D top-down RPG

I wish to logically represent a map for a 2D top-down RPG using a a bidimensional list (in python) structure. The map is like a variable size chess board. The first dimension represents the north-...
2
votes
1answer
164 views

Need some insight on mesh triangulation and geodesic spheres

I am making a game that's going to use a Class 1 (This is (n,0)) Goldberg Polyhedron as the map, that is I'm planning on using the hexagons and 12 pentagons as tiles for a tile-based game. When it ...
0
votes
1answer
609 views

How to draw a character behind and in front of a building? (isometric map)

how is it possible to draw the player behind and in front of some building in an isometric map : should I slice them, replace the number in the map (one number for a tile usually) by an array of ...
1
vote
1answer
678 views

SpriteKit SKTileMapNode with Tileset Integration

SpriteKit supports tile maps as of iOS 10 and has a pretty powerful engine. Only, I am having trouble discovering if it is possible, and how to natively create, tile sets directly from a tileset image....
0
votes
2answers
214 views

Wrong UV calculation

For a personal project, I'm trying to implement a tilemap. My goal is to obtain this But all I got is this I am calculating the UV coordinates inside my shader, with this formula. 8 and 13 is the ...
3
votes
1answer
4k views

OpenGL large tile map rendering

I want to be able to have a big tilemap (e.g. like Terraria, or an infinite procedural generated one), with only a handful of tiles on my screen. This means that I have a texture atlas (i.e. ...
8
votes
2answers
3k views

Drawing huge amount of tiles in Monogame (XNA) efficiently

I'm asking this question because I haven't found a definitive answer to it. Let me first of all state a few things about the game and what I have already done. The game is a going to be a RTS set in ...
1
vote
1answer
380 views

TiledMap taking a lot of time to load in libgdx

I am developing a game using libGdx in which a level has 2400 * 450 tiles Map and each tile is of 4 pixels. I am also using box2d...
0
votes
1answer
218 views

Unity 2D sprite animation keep in sync after setting inactive

I am creating a 2D sprite-based game and the tile map contains many animated background tiles (such as water). The map contains many areas that can be transitioned between in a Zelda style (camera ...
2
votes
3answers
466 views

Use tilesets or a complete image?

Whats the advantage of using tilesets instead of importing the entire image itself ? Is it giving us some sort of advantage (in terms of memory maybe) ? Also, how much of a disadvantage would it be to ...
1
vote
1answer
230 views

How to cache tile map?

I am trying to write a strategy game with PHP, and basically I have a 1d based tile map (grass, dirt, sand, castles, etc.) stored in a database. Now where is 40k records, from x1y1 to x200y200 and I ...
0
votes
1answer
168 views

LibGDX - Turning TiledMapTiles into objects

I'm working on a harvest moon type game and I've already created lots of assets and have a working player. Now the issue is with the tile map. I use Tiled Map Editor to make the map and it renders ...
2
votes
1answer
2k views

Unity2D 100x100 tile map, best practice?

I'm trying to create a top-down map in Unity2D, this map will act as an ocean that a 1 tile sized boat will drive across. I want to be able to generate this map programmatically by going through the ...
0
votes
1answer
68 views

How to convert or import files from Illustrator in Tiled for game development?

I have created all my images for a game in Illustrator, now I want to convert them in Tiled Sheets for developing my game in libGDX. So could I import or convert these ...
0
votes
1answer
477 views

Love2D and 'Tiled' - Detect if player is over certain tile/Collision

I created a 50x50 tile map with 32x32 tiles in Tiled and exported it as a Lua file so I can use it in Love2D. I have a player you can move around the world but I'm attempting to convert the player's x ...
1
vote
3answers
1k views

Top down 2D game: hole tiles

I'm making a top down 2D game in Unity, here's my doubt: how can I add "hole" tiles to it, so the player could fall (something like Zelda: Link to the past, or the water tiles in Enter The Gungeon)? ...
1
vote
0answers
301 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 ...
-1
votes
1answer
53 views

Map not loading from text file

Ok, so I have a text file filled with 0s and 1s. When there are 1s, I want the code to add a block to the block array. For some reason it is not reading it right at all. World.java: ...
0
votes
1answer
77 views

Map Engine Rendering Broken

So I've been making my own tile map engine in LibGDX as the one currently implemented doesn't support collision detection with scaling. So I've come up with my own Layer and Map class and a drawing ...
0
votes
1answer
237 views

Reason for white lines in tile-based game

My game is tile-based. I am getting this lines between two tiles. They don't look nice. How can i resolve this issue?
-2
votes
1answer
160 views

Collision using Tilemaps [closed]

How do I get the player in a platformer to collide with tiles My code for my for loop is ...
0
votes
1answer
261 views

Unity TopDown parallax effect only working in three of four directions

I'm a hobbyist at programming so I'm sure I'm missing something very simple: Basically I have a script that has a method for repositioning a 3x3 grid of tiles every time the player goes out of the ...
0
votes
2answers
904 views

Placing units on isometric map (2D)

I'm making a map editor for further RTS game (2D), something like the first StarCraft Editor. Terrain tiles will be a rhombuses. So I'll probably just make an 2D array with intigers, that corresponds ...
0
votes
1answer
87 views

Tilling with SDL2 via Clipping - Some bug which is hiding quite well

right at the moment i am writting some code for demonstration purposes. unfortunatly i have an stubborn bug in my code which is invisible to me. The Problem is I am trying to draw a Map. The Map ...
3
votes
0answers
209 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 ...
0
votes
1answer
373 views

How do I represent blended tiles in a mesh/vertex array?

I recently started making a Terraria clone using the LÖVE library, which is based in OpenGL. In Terraria, for each tile, there is a large texture with all possible combinations for merging with ...
0
votes
1answer
114 views

tile map collision with player not working - 2D c# xna

Currently the tile map is drawing fine but I am not sure how to proceed with collisions between the player and some of the tiles. Would it be better to specify certain tiles that the player can't move ...
1
vote
1answer
525 views

How to draw textured tile map in opengl

I am trying to create a textured hexagonal tile map in opengl. I have the VBO and respective index buffer. Additionally I have a texture atlas for texturing individual tiles. I'm attempting to create ...
0
votes
1answer
69 views

Enemy AI chase twitching left and right to move vertically

I'm making an enemy follow the player based on his possition and attack if he is within a distance and his last movement (if the enemy last moved to the left, it will attack to the left, etc.). It ...
0
votes
1answer
536 views

Top down tile based game render order

I'm making a simple top down (like this) tile based game (using JavaScript, for reference) I use Tiled for making maps. I have sprites that are more than one tile high, and so whenever they are in ...
4
votes
1answer
708 views

Create a seemless grid-based polygonal tileset

The aesthetics I am going for is demonstrated by many simulation games such as Simcity. But I am looking at this particular example: Polygonal Planet Project by Oskar Stålberg. I understand the ...
4
votes
3answers
726 views

How to make my Diamond-Square-algorithm less 'random'?

I'm currently writing a world generator for a Tilemap-Engine in C++. But there is a little problem concerning the Water to Land ratio. My DiamondSquare-class returns a field of random float-values ...
20
votes
3answers
4k views

Best practice for map coordinate system

Are there any conventions and/or best known methods around coordinate systems in game maps? Is the origin usually positioned in the center of the map? Or does it live in a corner and the map is built ...
3
votes
2answers
696 views

How do I efficiently manage a tile-based map with items and characters?

I'm working on a simple C++ game to learn the language. It's ASCII, and features a tile-based map, enemies and items that spawn randomly. The player is, as usual, the '@' character. I'm trying to find ...
1
vote
1answer
70 views

XNA player/tile collision not working perfectly

So I've built a map tile engine in XNA, and have been working on the player/tile collision. The method I'm using works well to some extent, but the player will often move through the walls and get ...
1
vote
1answer
99 views

Create Full Tile Map Zone in an Art Software, then generate corresponding tile name list?

I'm completely new to tile map creation. I'm a programmer and I'd like to make life easier for myself. It's a bit long to explain the problem I think I have, but bear with me. The Scenario: From ...
0
votes
1answer
702 views

JavaScript - Updating a canvas real-time… from server-side or client-side

I have this 2D tilemap game 13x13 viewport (169 tiles drawn on canvas at a time) of a 150x150 map. Each tile is 32x32px. Obviously I only update the 13x13 viewport... I want to update a canvas in ...
0
votes
1answer
74 views

only one tile being drawn xna c#

I have been looking at tile engines for the past few days and decided to have a go at my own one for educational purposes. I want to use different textures for the tiles of my map, for example 1 = ...
2
votes
1answer
118 views

In my tile-based game, GameObjects are stored in a std::map<Vec2Int, GameObject>, but I want the GameObjects to be in control of their position!

GameObjects are stored in a Tilemap class, within a std::map<Vec2Int, GameObject> container. The Vec2Int struct describes ...
0
votes
1answer
190 views

LibGDX - Centering different sized Tile Map Levels

Suppose I have a Level 1 tilemap which is 32 x 16 tiles in size, and when the player exits into another room, which is on 10 x 6 tiles in size, what's the best way to center the viewport. At the ...
1
vote
1answer
1k views

Tile based movement with SKAction (Xcode 8, Tile Map)

I am trying to make a game where the Hero can move like in Pokemon with SKActions. But the movement looks unprofessional and have delays. How can we handle to move the Hero smoothly with SKActions ...
0
votes
2answers
603 views

How to make an object move outside the map and appear on the other side with a tilemap?

I have a tilemap where a character moves from tile to tile. I'm trying to make it possible for the character to move outside the screen and reappear on the other side, just like the tunnel in Pacman. ...
-1
votes
1answer
268 views

How to set building in sequence like COC game using tiles map in cocos2d-x V3.9?

i am developing game in cocos2d-x V3.9. i want to create base like COC game. set all buildings in sequence and it can't be overlap with each others. i want also make boundary for develop city view. ...

1 2 3
4
5
12