Coder Social home page Coder Social logo

mapeditor / tiled Goto Github PK

View Code? Open in Web Editor NEW
11.1K 350.0 1.7K 97.25 MB

Flexible level editor

Home Page: https://www.mapeditor.org/

License: Other

QMake 0.05% C++ 87.74% C 0.36% Python 1.11% Java 4.02% QML 0.99% XSLT 5.59% CMake 0.12% Nix 0.01%
editor level qt c-plus-plus tile java game-development level-editor map-editor tilesets

tiled's Introduction

Tiled Map Editor - https://www.mapeditor.org/

About Tiled

Tiled is a general purpose tile map editor for all tile-based games, such as RPGs, platformers or Breakout clones.

Tiled is highly flexible. It can be used to create maps of any size, with no restrictions on tile size, or the number of layers or tiles that can be used. Maps, layers, tiles, and objects can all be assigned arbitrary properties. Tiled's map format (TMX) is easy to understand and allows multiple tilesets to be used in any map. Tilesets can be modified at any time.

Build Packages Build status Snap Translation status Open Source Helpers

Installing Tiled

Tiled is available for all major operating systems and can be downloaded either from GitHub Releases or from itch.io. Most Linux distributions also package Tiled, but these packages are usually out of date so you might prefer to use the AppImage or install Tiled through Flatpak or snap, both of which are official releases.

Signed Releases for macOS and Windows

macOS builds are signed by the maintainer, Thorbjørn Lindeijer, who registered as Apple Developer.

Windows installers are using free code signing provided by SignPath.io, and a free code signing certificate by the SignPath Foundation.

Compiling Tiled

Before you can compile Tiled, you must ensure the Qt (>= 5.12) development libraries have been installed as well as the Qbs build tool:

  • On Ubuntu/Debian: sudo apt install qtbase5-dev libqt5svg5-dev qttools5-dev-tools zlib1g-dev qtdeclarative5-dev qbs
  • On Fedora: sudo dnf builddep tiled
  • On Arch Linux: sudo pacman -S qt qt5-tools qbs
  • On macOS with Homebrew:
    • brew install qbs (which automatically pulls in qt)

If you want to build the Python plugin, you additionally need to install the Python 3 development libraries:

Alternatively, you can download Qt here. You will still need to install a development environment alongside and some libraries depending on your system, for example:

  • On Ubuntu/Debian: sudo apt install build-essential zlib1g-dev libgl1-mesa-dev
  • On Windows: Choose "MinGW" Qt version, or install Visual Studio
  • On macOS: Install Xcode

The easiest way to compile and run Tiled is to open tiled.qbs in Qt Creator and run the project from there.

From the command-line, you may need to set up Qbs before you can build Tiled (you will also need to make sure the version of Qt you want to use is in your path):

qbs setup-toolchains --detect     # setup toolchains
qbs setup-qt --detect             # setup Qt (not needed since Qbs 1.13)
qbs                               # build Tiled

You can now run Tiled as follows:

qbs run -p tiled

Qt 6

For compiling libtiledquick (not built by default) you'll need to install the Vulkan headers:

  • On Ubuntu/Debian: sudo apt install libvulkan-dev

Working with Visual Studio 2017

Once Qbs is set up (see previous instructions), it is possible to generate a Visual Studio 2017 project with it that allows you to code, compile and run using that IDE. This can be done with the following command:

qbs generate -g visualstudio2017

Installing Self-Compiled Tiled

To install Tiled, run qbs install from the terminal. By default, Tiled will be installed to <build-dir>/install-root.

The installation prefix can be changed when building Tiled. For example, to use an installation prefix of /usr:

qbs qbs.installPrefix:"/usr"

To install Tiled to a packaging directory:

qbs install --install-root /tmp/tiled-pkg

By default, Tiled and its plugins are compiled with an Rpath that allows them to find the shared libtiled library immediately after being compiled. When packaging Tiled for distribution, the Rpath should be disabled by appending projects.Tiled.useRPaths:false to the qbs command.

tiled's People

Contributors

bdtrotte avatar bjorn avatar burunduk avatar christianpervoelz avatar comradekingu avatar dogboydog avatar eishiya avatar encukou avatar immz avatar jakepetroules avatar ketanhwr avatar lahtis avatar linux-man avatar lyubomirv avatar mauvecow avatar mikepthomas avatar mitchcurtis avatar monolifed avatar mpjeff avatar parkm avatar phlosioneer avatar realmml avatar rhenaudthelukark avatar santossi avatar semtiko avatar skrapion avatar stefanbeller avatar stt avatar teraapi avatar thabetx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tiled's Issues

Animated Tiles

Tiles should easily be animated.
Either by using an animated gif or other animated format.
The other option would be to cycle through some tiles within one tileset.

Automapping: Bug with layerpointers

How to reproduce:
use automap, resize map, use automap again.

Analysis:
Automapping uses a a translation table of which layer of the rules need to be copied into which layers of the working map
(it is 'QList<QList<QPair<TileLayer*, TileLayer*> >* > mLayerList;' of an AutoMapper Object)
This translation table is only created, when initially starting with automapping and whe layers are added or removed,
but it is not updated when layers change due to resize (resize is copying the old and resizing the clone, which results into another layerpointer)

Proposal:

  • The fast (in terms of fixing) and ugly way: The translation table should be left half sided empty (i.e. only the pointers to the rulelayers are filled in, the pointers to the working map layers are recalculated each time you use automapping.
  • Whenever a layerpointer changes (resizing, maybe more?) a signal is emited from the mapdocument, so Automapping can properly its pointers. This would not decrease automappings speed while being active.

This was found during fixing issue #29.
I'll try to get into it as soon as I have more time.

Plugins Save

Plugins in tiled using the MapWriterInterface appear on the Export dialog and not on Save dialog.

Maybe we could check if the plugin also includes a MapReaderInterface, if it does, its safe to save because you can also load, if not then its better to export, since the format wont be able to be read again!

Object Bounding Boxes Still Showing On Render

Hi, Currently i'm working on a game and using the save as an image to create background images but when i use object layers to position everything correctly the dashed bound lines are still visible.

Is there any way to turn these off in the code?

Increase display size of useable tiles (tilesets)

I'm on a laptop with a high resolution screen, when selecting the tiles to use, they are just too small. You can zoom in and out on your tilemap, I would like to be able to zoom in and out on the useable tiles (tilesets) too.

I'm using the latest version for Mac OS X

Thanks in advance

custom node attributes would be deleted on save

We have at the moment the problem, that we would need to add attributes to objects (we cant use the properties). If we added them in our ingame editor and save them, they are present, but when we change the map in tiled the attribute would be removed. It would be great if there would be a way, that custom attributes would be stored on load and saved, that we don't need to redo the custom changes in the ingame editor as it would kill any deadline.

Change tool to the Stamp Brush when a tile is selected

  • I have the Eraser selected
  • I select a tile either in the tileset view or by right-clicking in the map
  • It would be nice if the tool automatically changed to the Stump Brush

I know I can just press ''B'' before I select the tile, but it is quite annoying and it happened to me hundred times that I just deleted accidentally a few tiles when I was actually trying to draw.

Better Tileset management

For our project, we have several dozen tilesets and the horizontal tab management is absolutely horrible to work with. Is it possible to either implement a tileset search bar, introduce tileset folders, or at least list the tilesets vertically rather than in horizontal tabs?

Thanks!

Add support for rotating objects

When placing objects it could be usefull to have a function to set a rotation value. At the moment this can just be archived using the properties at the object. It would be good to have the rotation of objects visually representet as else it mostly is needed to test the map in the game.

Internal Restructuring: Remove file I/O from Mainwindow class

Move all file operations such as 'Open file', 'Save file', 'Export as Image'...
(basically all operations containing a file dialog)
to either MapDocumentManager or another new FileIO class.

This will be for features later on, such as project view.
(Calls to open files and such shall not be calls to mainwindow)

Feature Request: Delete objects and tiles

Currently, removing objects and tiles is a pain. It would be very nice if pressing the delete key removes the currently selected objects or tiles.

Currently, the only way to remove selected tiles is with Crtl-X to cut, which is rather unintuitive, while deleting objects requires right clicking and then clicking remove object. Using delete as a shortcut key makes the editor much easier to use and more intuitive.

Reload a map when it changes on disk

When a tileset changes, it is automatically reloaded.
Automapping rules are treated the same way.

Specially when using the "Execute Command" to display and edit the map in a texteditor or such, the map is not reloaded.

Many editors (such as gedit, geany, qtcreator) will display a message "File has changed on disc (is newer) Would you like to reload?"

Either such a question or automatically reloading would be nice for usual maps as well.

Hotkeys and Icons

I'd like icons for zooming and automapping on the toolbar.

Also a hotkey for automapping would be awesome.

Allow specifying the type of a property

In some cases it may be nice to know the type of a property. This can also be used to determine an appropriate editor for the property value, once we have a more advanced property editor.

Suggestions for supported types: string (the default), number (floating point), int, bool

Possibly we could even have "file", which would enable a file chooser.

This issue spawned from the discussion at #12

Automapping: Historysize when drawing directly into set layer

When directly drawing into the set layer, the Automapping breaks the merge ability of the stampbrush.
So for each change (even if only one tile) there is another entry in the history for stampbrushing and for automapping.

Specially Automappings history is memory hungry, since it always takes a full snapshot of the map

Ali-G (The Manaworld contributor, via IRC) reported crashes when using lots of Automapping.

When constantly drawing, it takes about a minute to eat up 50Mb for history.

Automapping: Double Width/Height Tile Rules

With the current automapping it's not possible to have a rule apply a tile that is "double wide".

So I've got some graphics from http://www.lostgarden.com/2006/07/more-free-game-graphics.html which are awesome.

Some of the tiles though are designed to be tiled two at a time. For instance the wall on this image: http://imageshack.us/photo/my-images/708/internalwalls.png/

There's no way to make a rule to automatically place these double wide tiles because the same rule gets repeated over each tile, so only the left row of tiles in the rule gets applied over and over.

There needs to be a change in the automapper logic that says that if a tile has already been set by this same rule then not to overwrite it. Maybe put it behind a flag.

Example map with rules and tiles.
http://www.mediafire.com/?ejn1vw4c2ycikdc

Feel free to use this example map any way you'd like. You can even include it in the distro if you'd like.

Add support for horizontal and vertical flipping of tile instances

When creating maps for certain systems (GBA and Nintendo DS hardware maps in particular, though there may be others) it would be useful to have support for placing tiles on the map in horizontally and vertically flipped orientations. This allows more versatile use of a smaller tileset as it's not necessary to have additional images in the tileset to represent different orientations. This wouldn't be a property of the tiles themselves, but a property of tile instances on the map (i.e. the same tile could be placed on the map, in different positions, in flipped and non-flipped orientations)

Explanation of the feature on Nintendo DS hardware maps: http://www.liranuna.com/nds-2d-tuts/lesson-3/

This issue replaces the following issue on the old issue tracker:
http://sourceforge.net/apps/mantisbt/tiled/view.php?id=41

Properties in layer per cell vs. tileset properties

I would like to see a feature for having properties based on a cell in a layer rather than base it on the tileset. Tileset is too global. If I have a small sample of tiles in a map that need one specific property (object area is not feasible) then creating a new tileset to handle this doesn't make sense. Especially if there are several permutations of the property needed with the same tile. Custom properties on the cell in the layer would be much better.

libtiled: Mapreader should be more faulttolerant

When a tileset is not found, the mapreader should not just complain,
but not load that image and continue on loading the rest of the map
(That is similar to the lazymode in mana mobile; I am not sure if the exact porting is ok for our needs)
Later on this feature can be used for networking as well.

Add support for tile registration points (alignment offsets)

Especially when working with isometric tiles, the bottom left alignment of tiles makes graphics creation and map editing a lot more complicated than necessary.

Currently it is only possible to create decorative parts of tiles ranging upwards (because of the bottom alignment) or to the right (because of the left alignment). A good example is the white tree in the Tiled example screenshot: http://images.mapeditor.org/tiled-qt-screenshot-2-thumb.png. Imagine you would want to extend the tree tile to the bottom/left/right with roots.

A typical example screenshot of such a map/tiles can be seen here (not by me, found it by coincidence). It is especially a good example since a grid can be seen on the screenshot: http://content.screencast.com/users/jwopitz/folders/Jing/media/fe5cc911-99da-4b07-8488-b87103933d1a/00000067.png

The only solution I currently found is to make all graphics a lot larger and edit the map with these larger tiles. But since Tiled does not support a registration point offset, the entire map is displayed displaced by the amount of the actual offset. In my game I display the graphics with the correct offsets and everything is fine, but editing in Tiled gets very unintuitive since the grid does not represent the real positions anymore.

The easiest solution I can imagine is to support a global registration point offset for all tiles or all tiles per tile set.

The perfect solution would be to allow it individually per tile, but the easy solution would solve by far most of the dilemma already and probably is easy to implement.

Compatibility with OS X Lion

The Map Editor Tiled is a great application, I would like to congratulate the developers for this great work.
And I have a suggestion that I believe will do a little better this wonderful app. What would be more integration with OSx Lion, such as:

  • Fullscreen mode, so that the tools are better distributed, allowing more space to work with maps;
  • Use of Popovers and Overlay Scrollbars (giving a better look at the program);
  • Resume, you can close the app and then open and so it can continue working on a map where you left off;
  • If possible the application was available on the Mac App Store;
  • And finally, add a slider to zoom in / zoom out on a map. On the toolbar, without having to click on a menu. Making it easier to edit.

Thank you very much and wish success to this wonderful work, thank you,
Wesley Bastos.

Loading map created in 0.5.1 into 0.6.0 or higher resulting in breakage

So I tried taking a level that I created in Tiled QT 0.5.1 and opened it in 0.7.0. I re-saved it (without making any changes), and the new file was broken in my game... I tried this several times and received the same result every time. I also tried re-saving in 0.6.0, and the same result happened. Re-saving in 0.5.1 was fine, but the breakage is occurring whenever I save in 0.6.0 or higher.

Here's the output I received from my game (my game is based upon some existing code known as the Platformer Starter Kit for PushButton Engine, and I'm not well-versed in its underlying code, so I'm just showing the debug output as is):

http://i54.tinypic.com/2ustp42.png

(had some trouble copying and pasting it as text because the game was going haywire and freezing up my laptop, so that's why I took a screenshot instead)

And here is my level file in two separate versions, one saved in 0.5.1 and the other saved in 0.7.0:

0.5.1: http://www.mediafire.com/file/e57zwdrc7m37cak/level-0.5.1.tmx
0.7.0: http://www.mediafire.com/file/5act0wa7349ajsh/level-0.7.0.tmx

I'm sure that I didn't accidentally add any tiles, because I went through the entire process of opening my original file and re-saving in the multiple versions (including the 0.5.1 from which it originated), and the problem occurred on versions 0.6.0 every time. I'm also sure that I'm not mixing up QT and Java versions; every time, I used a build of the QT version.

show tile positions when object layer is selected.

I'm finding it a little frustrating not being able to know what tile position my mouse is over when I have an object layer selected. When creating enemies for my game I need to define patrol points in tile positions, I do this through the objects properties. In order to find the correct positions I need to switch to a tile layer, record the positions, switch back to object layer, select object, add to properties. Its quite tedious when I need to move objects around.

Project specific objects configuration

Hi

For level designers making it simpler to add the same object with the same properties to the map more than one time. It is a project specific description of object templates with their properties. This configuration is just an optional file referenced in the *.tmx file (multiple *.tmx files can reference the same configuration for the same project).

Full request can be found here:

https://docs.google.com/document/d/1k4KUVRZsT5klPhLGBRXSIZIhLBR-n2OxLYWnKP-tBTY/edit?hl=de&authkey=CIPK9OkO

Thanks.

Tile objects cannot be flipped

As far as I can tell, TIle Objects cannot be flipped. Pressing X and Y does nothing and manually editing the xml to set the high bits has no effect.

Gid in libtiled

Hi, i would like to see a gid property in Tiles.

Most save and load plugins use gid for store tiles, i think.

Would be nice to have a Tiled::Tile::gid() method.
And a static Tiled::Tile::fromGid().

Timer issue

I am getting some issues running Tiled (0.6.0 or master).
I get this when i close tiled:

Application asked to unregister timer 0x2f000010 which is not registered in this thread. Fix application.

Running on Ubuntu Natty 32 bits

Handling the last open files not correct

How to reproduce:

  • open&save some files (so that at startup all these are reopened)
  • close tiled
  • delete one of those files
  • restart-> you will get an error message that a file was not found
  • close and restart again -> you get the message again, that the file is missing. Should this warning only come once?

Therefore I'd propose the rewrite the last opened remembering section:
As of now there is only a list of files opened lately and a number of how many need to opened at startup.
To solve the problem, we'd need 2 independent string lists. One of both holds the recent used files, the other holds the files to be loaded at startup. That list should be updated everytime tiled is closed.

Add support for polygon objects

Allowing a polygon rather than a rectangle to define the area of an object would be much more flexible. This feature is especially helpful when using objects to define collision areas.

The rectangle objects will stay since for most use-cases it is enough. A polygon shaped object will be stored in the TMX format as follows:

<object ...>
 <polygon points="0,0 -64,64 64,96"/>
</object>

Some work has been done on this feature half a year ago by Werdn (https://gitorious.org/~werdn/tiled/werdns-tiled-qt/commits/polygon_tool), but since it doesn't implement it in the way I would like and it's left in an unfinished state, I'm redoing it from scratch.

This feature is sponsored by Zipline Games, Inc.

Compatibility

The tiled map file created by Tiled(Mac v0.6.2) cann't be opened using Tiled(win 32, v0.6.1, v0.6.2);
The error message is "Error loading tileset image: D:/maps/city tile.jpg' Line 4, column 58"
the size of tileset image is 827_531, and the size of the tile is 16_16

and The tiled map file created by Tiled(win 32) can be opened using Tiled(Mac), but cann''t be opened by cocos2dfor iphone

Add layer index to TMX-file.

Right now, the position of the layer is indicated by the order it's written to the TMX-file.
It would be great if we could add an "index"-attribute to the layer element.

Example:

 <layer name="Background" width="30" height="30" index="0">
  <data encoding="base64" compression="zlib">[omitted]</data>
 </layer>
 <layer name="Middle" width="30" height="30" index="1">
  <data encoding="base64" compression="zlib">[omitted]</data>
 </layer>
 <layer name="Foreground" width="30" height="30" index="2">
  <data encoding="base64" compression="zlib">[omitted]</data>
 </layer>

Suggestion for changing cursor outside (isometric) maps

When starting to use Tiled in isometric mode, it confused me quite a lot that I was not able to set tiles into the map, while the only problem was that I needed to scroll quite a lot to the right/down to find the actual map. (Took me 2 hours and the help of the IRC chat to figure that out.)

It would add to Tiled's usability if it was somehow clear that I was trying to set a tile outside the actual map. Here are a few suggestions, some of them probably very easy to implement:

  • Position the viewport to the middle of the map, so at least the grid is visible after creating a new map
  • Make the blue highlighted grid cell red when outside the map
  • Decorate the tile with something making clear the tile can not be set there (e.g. a red X over the tile)
  • Add an error sound when clicking outside the map (the dark deep sound which tells you that you did something wrong)
  • Make the background a different color outside the actual map

Thanks a lot for Tiled!

Allow changing the properties of multiple tiles simultaneously

When you're using tile properties intensively, it can get very annoying to edit the properties of many tiles, since at the moment you can only edit the properties of one tile at a time. It should really be possible to edit the properties of multiple tiles at the same time.

Problematic here is dealing with the inconsistent state that the multiple selected tiles might be in. They do not necessarily already all have the same properties or the same value for existing properties. The GUI should reflect this.

This issue was moved from the old issue tracker:
http://sourceforge.net/apps/mantisbt/tiled/view.php?id=48

On MacOS the Control key does not work as a modifier

On MacOS the control key does not allow itself to be used as a modifier as the OS uses this to signify a right-mouse button. This is the default behavior as the trackpad has only the one button. For anything that uses the control key to be a modifier, is there a way of using an alternate button on MacOS, such as Alt? Or a way to configure this so it can be set by the user? The circle functionality won't work under the default settings of both Tiled and the OS.

Add configurable layer height offset

Some tilesets allow layers to be stacked to create varying heights. An example of such a tileset can be seen on Lost Garden:

http://www.lostgarden.com/2007/05/dancs-miraculously-flexible-game.html

Or for example this isometric outside tileset:

http://opengameart.org/content/isometric-64x64-outside-tileset

It would be nice if Tiled supported these kind of tilesets, by allowing maps to define a height offset between (tile) layers.

This issue replaces the following issue from the old issue tracker:
http://sourceforge.net/apps/mantisbt/tiled/view.php?id=88

32-bit OS X binaries

Would it be easy to include 32-bit binaries for OS X on your web site? I have an old laptop and am unable to run the 64-bit app. I've tried building from source but installing qt4 with Macports is an error-filled nightmare.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.