Hot answers tagged

26 votes
Accepted

How can I implement persistent state for objects defined in a level?

I think not overthinking this issue will give the best results so I would just implement a simple key-value saving system into your game that you store along your other save data and then load on-...
user avatar
  • 7,650
10 votes
Accepted

How can I create a six sided tillable perlin noise image?

I don't recommend using the "increase the dimensions and orbit in a cylinder" trick here. It has several disadvantages: More expensive to compute: Perlin noise needs to select and ...
user avatar
  • 115k
6 votes
Accepted

Is there any way to change compression type of TMX file?

You can change it in the map properties. (Map -> Properties...)
user avatar
5 votes
Accepted

How do I add a sprite to an object layer?

First of all your sprite image needs to be part of a tileset. If your sprites use individual images, you should use Tiled >= 0.10 so that you can set up a tileset as a "Collection of Images" which you ...
user avatar
4 votes
Accepted

Tiled object layer draw sprites

All current implementations of TiledMapRenderer, such as BatchTiledMapRenderer, do not have the functionality to render any MapObject. You'll have to create your own implementation of TiledMapRenderer....
user avatar
  • 985
4 votes
Accepted

Is it cheaper to let each tile have its own collision?

Depending on how collision is implemented, the per-tile boxes may actually be more efficient (in case the bodies are in a Quad Tree most of them are easily discarded, but in the second case it may ...
user avatar
4 votes
Accepted

Drawing object lines in the Tiled map editor

Tiled does support drawing lines as collision objects. To do this, you should just not close the polygon (right-click once you're done with the polyline). In the past these have been separate tools, ...
user avatar
3 votes

How to use 16/32 square pixel tiles in tilemap on arbitrarily sized canvas in Phaser

The usual workflow with tilemaps in Phaser is this: You make a tile map, probably in a map editor like Tiled, and export to a format that Phaser can support, like JSON. Load the tile map in Phaser. ...
user avatar
  • 14.6k
3 votes
Accepted

Why is libGDX's HexagonalTiledMapRenderer adding extra space?

Try turning on the grid in Tiled (Ctrl+G) and adjusting your "Tile Side Length" in the Map Properties so that the grid matches correctly with your tiles. It may fix the libgdx rendering issue, and ...
user avatar
3 votes
Accepted

Sharing Tiled Maps

Haven't come across anything like that yet. But you could check GitHub for games that use Tiled. Then you can download their Tiled files and images. Here's one such repository: https://github.com/...
user avatar
3 votes

Draw image layer in tmx map - libgdx

When browsing the libgdx documentation (for example at http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/MapLayer.html), I don't see any mention of the image layer, so most ...
user avatar
3 votes
Accepted

Tiled height level collision

In Tiled you can add layers. Use a layer for the ground level, elevation1, elevation2 etc. Define a ladder/stairs tile with a property (in the tileset tile property) to indicate the player can move ...
user avatar
  • 3,989
3 votes

Tiled height level collision

Instead of defining a tile-type as "blocked" or "walkable" in general, define the four edges of a tile as "blocked" or "walkable" separately (a completely impassable tile would have all edges as "...
user avatar
  • 112k
3 votes
Accepted

How to extract a point in LibGdx from Tiled map?

Actually points in LibGDX are treated as RectangleMapObject with height=0.0 and width=0.0. Below debbuger output of object that is point on the tiled side:
user avatar
  • 66
2 votes
Accepted

isometric tile tiled format javascript

From the screens it's kinda obvious, that your tiles are positioned wrong. So it seems your X axis needs to go from top-left to bottom-right and Y axis from top-right to bottom-left. Right now X goes ...
user avatar
  • 10.1k
2 votes
Accepted

Is it possible to make a TileMap that adjust it self to multiple screens?

How do you expect the tile map to adapt to the screen size? If you need it to adapt in a way that requires rearranging tiles or using different map dimensions, then you won't generally get around ...
user avatar
2 votes

Libgdx, tiled map - how to reload layer?

You could have an array of coordinates of collected coins, and then iterate over that and restore them when the level should be restarted. In general, for this problem you will want to keep the ...
user avatar
2 votes

Box2D - Platformer tiled map problem

This is a quite known issue in box2d, the problem is that you are rendering a rectangle per Tile and in the joint of those there is a ghost vertex, you can read extensive explanation here: http://www....
user avatar
2 votes

Static spawning locations for players, creatures, items in Tiled map editor

If you would use the Type field instead of the Name field, then you could set a color for each type of object in the preferences. It would also autocomplete in this field for the types you have ...
user avatar
2 votes
Accepted

Static spawning locations for players, creatures, items in Tiled map editor

One thing you can do is to use multiple layers. Instead of using the Name tag of the object/collider to identify the type of the entity to be spawned, you use the layer name, so you would have Player-...
user avatar
  • 4,296
2 votes
Accepted

How to use Tiled Editor to recreate a 2D map?

About resizing, as @bornander commented, there's a menu action for resizing that you need to use rather than directly changing the size in the Properties view. The following article is about ...
user avatar
2 votes

Java libgdx Game Screens and rendering tile map

The constructor of your gameScreen class does not initialize the camera and renderer fields, ...
user avatar
  • 4,296
2 votes

How do I properly load maps?

This is a common problem caused by using floating point numbers for your camera movement. Occasionally, you will see the spaces between tiles. There are two ways you can counteract this: Round your ...
user avatar
  • 985
2 votes
Accepted

How to integrate Tiled maps and collision detection with pygame?

Since no other solution to this question has been posted - and I now know a solution - I figured I would answer my own question so it may be useful for others. Consider the Tiled map that looks like ...
user avatar
  • 183
2 votes
Accepted

Texture appearing blurry

Select the texture you have imported in the Project tab, and then in the Inspector, set ...
user avatar
  • 29.1k
2 votes
Accepted

How should I manage Roguelike levels/maps in JavaScript?

I see nothing fundamentally wrong with your approach. Just a few thoughts: Map is a pre-existing javascript data type. So unless the code in your answer actually ...
user avatar
  • 241
2 votes
Accepted

How do you use these kind of rpg ground tileset ?

This tileset is famous because it was used in RPG maker VX. It seemingly consists of 6 tiles (2 by 3) and it even outputs tiles in that size, but it actually handles the tileset as if it was 4 by 6: ...
user avatar
  • 14.5k
2 votes

Segmentation Fault using Allegro_Tiled, function al_open_map();

Looks like you are not initializing the library with al_init call. It tries to retrieve some standard directory to know where is the map stored, but crashes ...
user avatar
  • 166

Only top scored, non community-wiki answers of a minimum length are eligible