love.map?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
Person
Prole
Posts: 39
Joined: Thu Jun 18, 2009 2:35 am

love.map?

Post 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]
"Here's another curse for you, may all your bacon burn."
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: love.map?

Post 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
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: love.map?

Post by bartbes »

However... Tiled is in Java, how did you expect that to be implemented nicely in LÖVE (C++)?
User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: love.map?

Post 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
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: love.map?

Post by bartbes »

I know, but he suggested adding a love.map, which is almost impossible, and way too complicated to ever be useful.
User avatar
Person
Prole
Posts: 39
Joined: Thu Jun 18, 2009 2:35 am

Re: love.map?

Post 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.
"Here's another curse for you, may all your bacon burn."
Chris016
Prole
Posts: 22
Joined: Sat Aug 16, 2008 1:58 am

Re: love.map?

Post by Chris016 »

Or build our own love based map editor.. in love. That couldnt be too impossible could it?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: love.map?

Post 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.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: love.map?

Post 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.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: love.map?

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 14 guests