Level Editor

Hello everyone,

I’m new to corona and I have a few questions about the sdk like any new user. I have already developed a few games using other software and I was wondering how would one go about making levels for a grid based game say a tower defense. How would one go about editing levels? Is there any kind of drag and drop level editor? I’ll try to answer most of my questions myself but I couldn’t find a definite answer to this one.

Thank you, any help would be greatly appreciated.

Welcome @kazetoon.

There are plenty of different ways to structure your code and handle your levels.  First, Corona SDK does have a level design tool called Corona Composer.  It’s only available on Mac OS-X and it’s under the “Window” menu.  But that said, it’s really more for designing levels like for Angry Birds, or where you’re putting a bunch of objects on the screen.  I’m not sure how useful it would be for a tower defense game.

I’m working on a Tower Defense game, in my case, i don’t have maps, I just change backgrounds and have programmed patterns for my creeps to come on the screen from the right and attack the tower on the left (very much like Plants v. Zombies).  In this case I have a single game module that has all the logic.  It handles the behavior of each creep.  Then I have a single level module that is a huge lua table that lists what assets to use (backgrounds, creeps for the level, etc.) and data about when the creeps come on the screen, how fast they move etc.  So in my case I have a composer scene for game.lua and I have a data module: level.lua.  That way I only have to edit the level.lua to change how the level plays by changing speeds, creep types etc.

Now if you wanted more of an overhead type TD game, where the creeps follow a path to the tower and that path changes each level, it might be best to have separate level1.lua, level2.lua etc. files where these are not scenes, but again data files, but due to the more complex setting up of maps, one single level.lua file could get massive and hard to work with.

Rob

Welcome @kazetoon.

There are plenty of different ways to structure your code and handle your levels.  First, Corona SDK does have a level design tool called Corona Composer.  It’s only available on Mac OS-X and it’s under the “Window” menu.  But that said, it’s really more for designing levels like for Angry Birds, or where you’re putting a bunch of objects on the screen.  I’m not sure how useful it would be for a tower defense game.

I’m working on a Tower Defense game, in my case, i don’t have maps, I just change backgrounds and have programmed patterns for my creeps to come on the screen from the right and attack the tower on the left (very much like Plants v. Zombies).  In this case I have a single game module that has all the logic.  It handles the behavior of each creep.  Then I have a single level module that is a huge lua table that lists what assets to use (backgrounds, creeps for the level, etc.) and data about when the creeps come on the screen, how fast they move etc.  So in my case I have a composer scene for game.lua and I have a data module: level.lua.  That way I only have to edit the level.lua to change how the level plays by changing speeds, creep types etc.

Now if you wanted more of an overhead type TD game, where the creeps follow a path to the tower and that path changes each level, it might be best to have separate level1.lua, level2.lua etc. files where these are not scenes, but again data files, but due to the more complex setting up of maps, one single level.lua file could get massive and hard to work with.

Rob