Closed michalove closed 10 years ago
I'm thinking that it might actually be simpler to just re-build the levels in the new editor... Matching all the background-tiles would otherwise be quite some work.
Also, clicking together levels in the editor is really, really fast. And we'll probably find most bugs/issues in the editor while building the levels. What do you think?
Agreed, the background will take some effort. How about we write some code to place the wall-tiles and then do the background tiles and the objects by hand?
The object-functionality is not yet done in the editor. Let me check, if there is anything missing, of if we can start converting the maps.
Great idea to have the walls be auto-converted, but not the rest. I didn't think of that at all. That way we can make sure the levels will stay the same gameplay-wise. I'll get to converting now.
Edit: All right, walls are being converted automatically now. Pressing F10 in the editor converts and saves all maps to the mylevels folder in the bandana save directory. Careful, it doesn't ask about overwriting - should you want to edit a level make a copy of it somewhere!
Well done!
Thanks! I think we should try to convert the objects as well... at least some of them. Flag and player are always the same tile, so those should work well enough... I might have some time to do it tonight.
While trying to automatically convert objects I noticed that the input buttons (scripts/objects/input.lua) have not been added to the objectclasses file yet. Could you do that for me?
Update: Most objects which are found in the Demo levels are now also converted (player, exit-flag, spawners etc). The properties are currently NOT derived from the images, so they need to be fixed manually. I figured this is so little work that it's not worth the trouble going through them all and making it automated. I also didn't bother adding objects to the converter which aren't in the demo levels. Should we ever need to convert anything else, they can easily be added to the EditorMap:convert function by adding more entries to the objectMatch table.
There is still one issue: Some transitions are not loaded/converted properly. We could just forget about them and fix them manually - since its relatively hard to figure out which ground type should be used at a transition - the old format explicitly defines which transition tile to use, the new format just puts down either of the two wall types and then derives a transition at run-time. And sometimes, while converting, the wrong wall type is placed. I think we should fix this manually and call this done.
P.S. I currently only convert levels of the format l.dat. The n.dat files are untouched, but can easily be converted as well by adding them to the toConvert table in editor/editor.lua Also, pressing F10 only converts single levels at the moment - for debugging purposes. Getting it back to converting all at once is a matter of commenting out one line.
Good job. One question about the conversion workflow: If I want to insert all the correct properties, what do I have to do?
Is that correct?
Oh and can you tell me, which transition/tile is placed incorrectly? On the first sight, I didn't find any incorrect tiles.
Yes, this is correct. Before you can open it in the editor, you need to copy it to
~/.local/share/love/bandana/mylevels/
.
That can be done by actually copying it, or by pressing F10 until you get to the level you want to. I commented out automatic saving, so you'll have to manually use the editor to save the file when you're done.
This makes sure that levels don't always save over already edited levels when pressing F10.
About placing of the tiles: If you press F10 until you get to the first level (right after going through all the small level-end levels) then you'll notice that down the bottom, where the player stands, there's something messed up with the grass. I noticed though: As soon as it's saved and played, it works out fine! So we don't need to worry about this part at all, since the player will never be converting levels and it's just something about the updating after converting that's not working out. Then there's another place in the same level further on, where "stone ground" and "dirt ground" meet. Especially inside the town (there's a "valley" in the town) it's not symmetrical, but I think it was, before. This is because the transition tile was earlier a seperate kind of tile, now it's being displayed as dirt. In level 5, the first spiked wall seems to hover above the ground, because grey spikes are currently not treating other ground tiles (i.e. dirt ground, stone ground, grass) as "similar". It doesn't matter much, just something we might need to fix.
Okay, got it. That means once we finish all the levels (adding backgrounds), we should make some small corrections here and there.
Yes. Before we start, though, I'd like to get the background object placement sorted out. It's horrible right now, clicking together a house would take ages at the moment. So let's fix #142 first and then finish converting the levels.
I went through all the levels and inserted the objects that are needed to finish the level. The backgrounds are still missing. But I guess, I will change the level design anyway, so for now I call this issue closed.
We should wait until the object handling in the editor is finished.