These are the tiles it's using:
http://opengameart.org/content/tiny-16-basic
Completely Lua/Love2D based map editor and player
-
- Party member
- Posts: 355
- Joined: Wed Jul 03, 2013 4:06 am
-
- Party member
- Posts: 355
- Joined: Wed Jul 03, 2013 4:06 am
Re: Completely Lua/Love2D based map editor and player
Some more screenshots of some stuff I added...floodfill, eraser, layer moving/layer opacity changing
-
- Party member
- Posts: 355
- Joined: Wed Jul 03, 2013 4:06 am
Re: Completely Lua/Love2D based map editor and player
I get a stack overflow error when doing a floodfill that affects blocks at the edge of the screen. Anyways nice editor! I'd like to use this at some point.
-
- Party member
- Posts: 355
- Joined: Wed Jul 03, 2013 4:06 am
Re: Completely Lua/Love2D based map editor and player
Sadly I do know about that bug, and am working on it..lol
Yeah, It's still very much a WIP - I still need to fix some other nagging bugs and add in the object tool stuff...
And then document, document, document.
Awesome that you want to use it
I'm hoping someone somewhere other than me might find it handy. Esp. since it looks like ATL is no longer being actively worked on ![Sad :(](./images/smilies/ms-sad.png)
Yeah, It's still very much a WIP - I still need to fix some other nagging bugs and add in the object tool stuff...
And then document, document, document.
Awesome that you want to use it
![Smile :)](./images/smilies/ms-smile.png)
![Sad :(](./images/smilies/ms-sad.png)
-
- Party member
- Posts: 355
- Joined: Wed Jul 03, 2013 4:06 am
Re: Completely Lua/Love2D based map editor and player
Added in map templates and the ability to choose a default tile when adding a new layer.
The map templates allow you to create a way that makes consistent maps (for layers, etc) that would be good across an entire game. Each time you make a new map, if you specify a template it uses the template you specify. For example, let's say I create a new map and use the example template. It then looks in the folder greentea/plugins/templates and finds the example.lua file and then loads that template.
Here is what the template basically looks like:
You can do some pretty interesting thing with templates- since each layer can have it's own tileset, you can feasibly create a series of layers to be used in the editor that have shadows, a night layer with lighting, fog/wind/rain, a layer for just houses, for just about anything. Because of the way it draws, you can have a large number of layers before anything slows down at all. I've had 150 layers for a speed test, and so far even that didn't slow down.
Right now the example is using 800x600 and scaling up x2. That's because I'm using 16x16 tiles, and want a kinda retro look. You can do any resolution with or without scaling. The only downside is right now, you need to use greentea:scale(x, y) to get the scaling done if you want to use the editor. This is because it needs to change the mouse positions and such by the amount it's scaled. So, for example, this might be difficult using something that automatically sets and changes the resolution, like TLfres. Am working on seeing if there is some way around this.
The map templates allow you to create a way that makes consistent maps (for layers, etc) that would be good across an entire game. Each time you make a new map, if you specify a template it uses the template you specify. For example, let's say I create a new map and use the example template. It then looks in the folder greentea/plugins/templates and finds the example.lua file and then loads that template.
Here is what the template basically looks like:
Code: Select all
local example_template=Class{}
--inherits from the base template.
example_template:include(gt_template)
--the main function we need to override. We can also override and create others,
--but in order for it to do anything interesting, :create needs to be overridden.
function example_template:create(greentea)
--this example creates a ground, and then a second ground (for details).
--above that, it adds a fog layer that constantly scrolls.
greentea:add_layer({id="ground",
opacity=255,
speed=1,
default_tile=13
})
greentea:add_layer({id="ground2",
opacity=255,
speed=1,
default_tile=80,
})
greentea:add_layer({
id="fog",
type="parallax",
opacity=155,
speed=2,
default_tile=1,
tileset={
id="fogtiles",
tile_height=16,
tile_width=16,
image="game/maps/fogtiles.png",
},
values={scroll_x=0, scroll_y=.2}
})
return greentea
end
return example_template
Right now the example is using 800x600 and scaling up x2. That's because I'm using 16x16 tiles, and want a kinda retro look. You can do any resolution with or without scaling. The only downside is right now, you need to use greentea:scale(x, y) to get the scaling done if you want to use the editor. This is because it needs to change the mouse positions and such by the amount it's scaled. So, for example, this might be difficult using something that automatically sets and changes the resolution, like TLfres. Am working on seeing if there is some way around this.
-
- Party member
- Posts: 355
- Joined: Wed Jul 03, 2013 4:06 am
Re: Completely Lua/Love2D based map editor and player
Okay, taking a break from this for a few weeks to rest my wheels.
When I return, I'm adding these features to the editor:
Object Dropping
Object Editing/moving up and down layers easily/opacity/deleting
Adding these features to the map loading/playing:
Tiled Loading, using the Tiled -> Lua export from Tiled. When you save these maps, however, it will need to save them in the .gtmap format.
"light" version that just has the map player, not the editor. This will be good for when you want to do a release of your game and remove the ability to edit maps. It will make for a smaller upload/download/etc. Already supports the ability to make a light version, just need to roll it up and test it.
Fixing these bugs:
Randomly when creating a new layer it gives a nil errror.
A Flood fill that's more accurate.
Then documenting and slapping a release on it.
It shouldn't take me too long, but I need a break for a bit after this whirlwind week of coding.
When I return, I'm adding these features to the editor:
Object Dropping
Object Editing/moving up and down layers easily/opacity/deleting
Adding these features to the map loading/playing:
Tiled Loading, using the Tiled -> Lua export from Tiled. When you save these maps, however, it will need to save them in the .gtmap format.
"light" version that just has the map player, not the editor. This will be good for when you want to do a release of your game and remove the ability to edit maps. It will make for a smaller upload/download/etc. Already supports the ability to make a light version, just need to roll it up and test it.
Fixing these bugs:
Randomly when creating a new layer it gives a nil errror.
A Flood fill that's more accurate.
Then documenting and slapping a release on it.
It shouldn't take me too long, but I need a break for a bit after this whirlwind week of coding.
-
- Party member
- Posts: 355
- Joined: Wed Jul 03, 2013 4:06 am
Re: Completely Lua/Love2D based map editor and player
Also: I plan on following this up with a few other projects I've been mulling about. These should pretty much use the same layout/concepts/etc, so that they can work together or apart pretty easily, and if you get used to using one library, the other ones are pretty simple.
Here they are, in order of "going to do them":
Chamomile- A paper doll sprite editor/player, for making paper doll style sprites in a game. This would make it easy to create NPC's, etc. When this is done a plugin for map objects will also be bundled with it, so you can use it very easily with Greentea (the mapeditor). So, in theory, you'll be able to visually create paperdoll npc's and drop them on the map.
Mint Tea- A return to the SNES Style GUI system I was working on awhile back. Refitting, rebuilding it, using all the stuff I learned with GT.
Dark Roast- A basic RPG workflow library, for building flags/setting flags/saving games/etc. Basically a data editor combined with plugins for Greentea and basic sprite systems (treasure chest, village NPC's, save spots, etc) for Chamomile. This will also have a controller/keyboard layout that will mimic NES/SNES emulators.
Here they are, in order of "going to do them":
Chamomile- A paper doll sprite editor/player, for making paper doll style sprites in a game. This would make it easy to create NPC's, etc. When this is done a plugin for map objects will also be bundled with it, so you can use it very easily with Greentea (the mapeditor). So, in theory, you'll be able to visually create paperdoll npc's and drop them on the map.
Mint Tea- A return to the SNES Style GUI system I was working on awhile back. Refitting, rebuilding it, using all the stuff I learned with GT.
Dark Roast- A basic RPG workflow library, for building flags/setting flags/saving games/etc. Basically a data editor combined with plugins for Greentea and basic sprite systems (treasure chest, village NPC's, save spots, etc) for Chamomile. This will also have a controller/keyboard layout that will mimic NES/SNES emulators.
Re: Completely Lua/Love2D based map editor and player
This is looking very nice so far! I can't wait until you're finished! I think it's a good under-taking! Good luck and have fun! ![Smile :)](./images/smilies/ms-smile.png)
![Smile :)](./images/smilies/ms-smile.png)
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Completely Lua/Love2D based map editor and player
same here, I'm looking forward to this. really useful (^_^).
Who is online
Users browsing this forum: No registered users and 54 guests