Page 1 of 1

love.map?

Posted: Thu Jun 25, 2009 3:04 pm
by Person
I was trolling the internet the other day, looking for a sophisticated map editor to use with another engine I work with. I came across this...

http://mapeditor.org/
Image

Tiled is an open source map editor that includes layers, multiple palettes, isometric and orthogonal support, transparency/translucency, and a host of other useful features. It runs on java, so is cross platform by default. I believe it is open source. On the title page it says it is free software and in the downloads page it has a link to a src file (which I assume means source code). This map editor has it's own wiki to show how it uses it's map format for inclusion into projects. It also has a plugin system for those who want Tiled to be able to edit a custom map format.

I was thinking that maybe it would be nice to get a love.map thing happening. Say I have my map and I...
current_map = love.map.loadMap( mymap.map )
love.map.displayMap( current_map )

As I type this it sounds easy and useful but maybe it would be better just to make this a .graphics thing? As in love.graphics.loadMap ( filename )? I just think this could be a useful addition to LOVE and was wondering if other people wanted to have Tiled to use.

[Edit]
*Smacks face* I really need to learn to search for stuff before I make huge posts about it! Although, those earlier posts and topics were mostly about creating an application to decode Tiled map files for easier use, not about adding a love.X thing. Upon reading the earlier posts though, it became clear that maybe it should be a distributed design. Such as...
love.filesystem.loadMap( filename )
love.graphics.displayMap( mapname )
love.filesystem.loadPalette( filename )
love.map.changeMapTile( map, mapX, mapY, palette, paletteX, paletteY )
I still dont know...
[/Edit]

Re: love.map?

Posted: Thu Jun 25, 2009 3:26 pm
by Robin
Person wrote:I believe it is open source
It's GPL'ed, so yes, it is open source.
See http://hg.mapeditor.org/tiled/index.cgi ... 47/COPYING

Re: love.map?

Posted: Thu Jun 25, 2009 5:33 pm
by bartbes
However... Tiled is in Java, how did you expect that to be implemented nicely in LÖVE (C++)?

Re: love.map?

Posted: Thu Jun 25, 2009 7:56 pm
by osgeld
it outputs its format in XML

and you can turn off base 64 gzip, even turn off binary encoding, what your left with is a very (large) easy to read plain text file

Re: love.map?

Posted: Thu Jun 25, 2009 8:45 pm
by bartbes
I know, but he suggested adding a love.map, which is almost impossible, and way too complicated to ever be useful.

Re: love.map?

Posted: Thu Jun 25, 2009 10:03 pm
by Person
I'm sorry if I didn't present that idea as clearly as I had hoped. I meant that maybe there could be a love.map but it would most likely be a love.graphics function instead because all you are doing is loading/editing the output of Tiled which, as was stated, is in XML.

Tiled and LOVE would remain separate applications and one would only use Tiled to create maps and palettes (for editing of loaded maps). It would most likely take a long time to create custom functions and systems to load and display the Tiled maps properly.

I know it could be done with love.filesystem and custom functions but my thought was that it would be more beginner friendly if built-in support for Tiled output was added.

Re: love.map?

Posted: Fri Jun 26, 2009 3:02 am
by Chris016
Or build our own love based map editor.. in love. That couldnt be too impossible could it?

Re: love.map?

Posted: Fri Jun 26, 2009 6:06 am
by bartbes
It's kind of hard to decide which tile editor you support.. I know there is some editor for GTA-styled games somewhere on these forums, so a LÖVE tile editor seems possible too, but I'm not sure if this should be in the core code or if it should be a user-created lib.

Re: love.map?

Posted: Fri Jun 26, 2009 6:58 am
by Jasoco
I'll just stick to my current method of numbers representing the x and y coordinates of a tile in a PNG and an "x" if the tile is passable or not.

I played with Tiled and couldn't get it to do collision maps. And it exported to formats I wouldn't know what to do with. Even the LUA one. I'd write a plugin to save my own format but if I knew Java, I wouldn't be coding in Lua right now.

Re: love.map?

Posted: Fri Jun 26, 2009 11:07 am
by rude
I personally don't think there should be a single "love.map", as it probably won't be flexible enough. It should be possible to write Tiled support in pure Lua, though.