Completely Lua/Love2D based map editor and player

Showcase your libraries, tools and other projects that help your fellow love users.
pauljessup
Party member
Posts: 141
Joined: Wed Jul 03, 2013 4:06 am

Re: Completely Lua/Love2D based map editor and player

Post by pauljessup » Fri Jan 03, 2014 2:25 am

Thank you for the kind words :)

I took the day off from my mini hiatus to add the basic object dropping, editing, moving, etc.

After this I'll add the ability to choose objects from a list of ones generated from the plugin directory...but that will be later.

I'm beat!

LOL.

pauljessup
Party member
Posts: 141
Joined: Wed Jul 03, 2013 4:06 am

Re: Completely Lua/Love2D based map editor and player

Post by pauljessup » Fri Jan 03, 2014 8:05 pm

Okay, added object dropping from a list, etc.

I think this is just about ready for a release. A few small bugs still, but ones that won't impede using the library and very rarely show up. I'm going to create a basic example and some how to use tutorials.

pauljessup
Party member
Posts: 141
Joined: Wed Jul 03, 2013 4:06 am

Re: Completely Lua/Love2D based map editor and player

Post by pauljessup » Fri Jan 03, 2014 9:08 pm

Note to self about what is needed for documentation/tutorial:
creating templates for maps
creating animations for maps
creating objects for maps and map editing
some practical examples. Like a step by step on how to make a simple game and having the editor pop-up in game
a tutorial for using the map editor if you don't want to use the object plugin system

In the future (not something that needs to be done NOW):
documentation on adding in new map editing tools
documentation on creating layer plugins

pauljessup
Party member
Posts: 141
Joined: Wed Jul 03, 2013 4:06 am

Re: Completely Lua/Love2D based map editor and player

Post by pauljessup » Sat Jan 04, 2014 3:54 am

Here;s the latest demo:

https://dl.dropboxusercontent.com/u/635 ... entea.love

Oh, and the license I'm thinking of using is the libpng license.

User avatar
SiENcE
Party member
Posts: 782
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Completely Lua/Love2D based map editor and player

Post by SiENcE » Sun Jan 05, 2014 7:23 pm

I testes your latest version.

Some things I noticed:
-deletion of objects not possible
-moving the map via cursorkeys and w,a,s,d should be possible
-put deletion on right-mouse button

Bugs
-after startup and doing nothing for a while I get this error at tileset.lua:112 (a nil value)
=> it seems, when the cursor is our of the window, the x value inceases and than you can an overflow

So far, nice progress and good seperation into a library! Do you want to open source this as library? This way others could easily add an tileeditor to love games.

pauljessup
Party member
Posts: 141
Joined: Wed Jul 03, 2013 4:06 am

Re: Completely Lua/Love2D based map editor and player

Post by pauljessup » Mon Jan 06, 2014 1:43 am

Deletion of objects is on right mouse click. It's on the bottom of the menu. When you hover over it, it says "Delete object".

-moving the map via cursorkeys and w,a,s,d should be possible

I want to keep the code using as little of the love. hooks as possible, so as not to pollute your own love. hooks too much (and so you don't have to worry about conflicts when using libraries that create a virtual joystick interface, like TLBind). It's a very simple thing to add yourself into your own code when using it- just add a greentea:scroll(x, y) into your love keyboard handler (where x, y would be the direction in which they scroll based on keyboard input).

"-after startup and doing nothing for a while I get this error at tileset.lua:112 (a nil value)
=> it seems, when the cursor is our of the window, the x value inceases and than you can an overflow"

This must be an old copy your testing out...these issues where fixed recently. I'll check to make sure that the .love file is using the most up to date version.

"Do you want to open source this as library? "

It is open source? Github:
https://github.com/pauljessup/greentea

&you can open the .love file with an archiver of your choice and take a peek at the examples source code.

"This way others could easily add an tileeditor to love games."

That's the point and the whole purpose for this. It's also called a "library" for a reason :) I want other people to use it, and I'm trying to find a versatile license where I still retain the basic copyright, but other people can use it in whatever they want, commercial games included. Libpng seems to be the best bet.

pauljessup
Party member
Posts: 141
Joined: Wed Jul 03, 2013 4:06 am

Re: Completely Lua/Love2D based map editor and player

Post by pauljessup » Mon Jan 06, 2014 2:10 pm

I noticed you mentioned adding it as a right click for deleting, right click and single click on an object already have a purpose. If you hove the mouse over an object, a tool tip will come up saying "right click to move, left click to edit". You right click you can move the already placed object. If you left click, an edit menu pops up, allowing you to move the object up or down a layer, change the opacity of an object, or delete an object.

pauljessup
Party member
Posts: 141
Joined: Wed Jul 03, 2013 4:06 am

Re: Completely Lua/Love2D based map editor and player

Post by pauljessup » Mon Jan 06, 2014 4:41 pm

Hmm.Need to add an undo. yeah that's kinda important.

User avatar
OttoRobba
Party member
Posts: 104
Joined: Mon Jan 06, 2014 5:02 am
Location: Sao Paulo, Brazil

Re: Completely Lua/Love2D based map editor and player

Post by OttoRobba » Mon Jan 06, 2014 7:47 pm

Hey, pretty cool tool. I'm looking forward to it getting ready for primetime :)

Three quick suggestions on what is probably low hanging fruit, based on my quick testing here:

-Allow using the arrow keys to move around
-Show a minimap with where the user currently is on the map he/she is editing
-Ask beforehand for the path to the tileset, the grid size and whatnot

I also found a bug. If I let the mouse rest on the corner, pushing the editor, it will go up to 300 and give an error:

"greentea/map/tileset.lua:112:attempt of index a nil value"

Keep up the good work, this could be very useful :D

pauljessup
Party member
Posts: 141
Joined: Wed Jul 03, 2013 4:06 am

Re: Completely Lua/Love2D based map editor and player

Post by pauljessup » Mon Jan 06, 2014 8:30 pm

Hey, pretty cool tool. I'm looking forward to it getting ready for primetime :)
Awesome, thanks :)
-Allow using the arrow keys to move around
This is something I mentioned above- this is a library. And one that I don't want to intrude too much onto the actual game code you develop. For someone using the library and adding the map editor part to their game, this keyboard movement would be very simple to add. I don't want to restrict what other people can do based on what I think they should be able to do, if that makes sense. Leaving it as it is currently allows you to use something like TLBind if you so desire :)
-Show a minimap with where the user currently is on the map he/she is editing
This might be an optional function I add.

-Ask beforehand for the path to the tileset, the grid size and whatnot
If this is an in-game editor, this would be very disruptive, don't you think? Instead for the time being I think being able to programmatically set it up is beneficial...there will be better instructions later.

I also found a bug. If I let the mouse rest on the corner, pushing the editor, it will go up to 300 and give an error:
This was mentioned above, and like I said above- this is probably to do with the current demo. The github library itself this error doesn't happen.

Glad you're excited!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest