LevelEditor2

Designing levels in the shadows

In My Shadow is a casual puzzler at its core so naturally it would seem that the project should be a relatively short one that would not require a lot of time to be developed.


Well, that’s far from the truth and not to forget that I am not an expert developer by any means. So what happens when a mediocre developer tries to make a unique and technically challenging game – a lot of unknowns and hence a lot of delays!

In this post, I want to highlight the importance of custom tools that either fasten or automate some parts of the development process. I can’t stress enough how helpful these can be, especially if your project has a lot of cumbersome and repetitive tasks.  These are a few major benefits of having such tools/scripts –

  • Saves a LOT of time with small and repetitive tasks
    These can build up with time and in the end you will find yourself spending a lot of time on these
  • Makes these tasks error free
    You won’t assign a wrong variable to the field of your important scripts
  • Can be used by anyone, including artists and designers
 
 
I have used multiple custom editor scripts in this project. Some are used for small tasks like ensuring correct values in the fields and some take care of the entire cross platform build pipeline.

Today I am sharing the biggest of them all –

                        The Shadow Level Editor

 Making levels in this game has been the biggest challenge – both design wise and convenience wise. Since this is a very unique concept, there is no formula or pattern that we can use to make the levels. Hence most of the level design is done by hit and trial and getting a ‘feel’ for what can be fun to play with. This hit and trial method was very cumbersome and haphazard. Also, I couldn’t use help from anyone else with the level design, especially not if they’re not used to the project. And that’s when I felt that I desperately need a Level Editor!
 
So the basic process of designing a level in the game is like this –
  1.  Place the shadow casters from a list of available casters for that room.
  2.  Configure those placed casters (their axis of movement, rotation and other specific attributes)
  3. Place the shadow objectives
  4. Place the shadow obstacles and set their config (movements, if any)
  5. Save all the above information somehow?
 
You see how it can get very tiring and frustrating to drag and drop these level object and then somehow save their information in a scene or a json file? So I decided to make a Level Editor that will automate the process of loading and saving these objects in and out from a json file along with provide a convenient UI to use all the level design objects and configure them. The technical flow of making this editor is as follows –
 
  1.  Make all the level design objects (casters, objectives and obstacles) inherit from a Serializable LevelDesignObject class.
  2.  Have all the child classes for the different types of objects, each having its own set of custom variables to be serialized.
  3.  Have the Level editor script load these objects from either a saved json or a list of available objects to choose from.
  4.  Adjust all the objects needed in the scene and when done, save the level via the LevelEditor script which will serialize all the required data from the loaded objects into the json file.
These were the major steps in the level design process but of course the Level Editor script does a lot more of cleaning and verifying the level data. The object scripts also do a lot of error prevention and ensure that nothing breaks the game.
 
This Level Editor made designing levels a breeze (atleast the loading and saving part of it, the designing process still required a lot of playing around). It also allowed me to hire a level designer to assist me with making new levels for the game. Not only that, I am now sure that the levels can never have any errors or anything weird happening in them as everything is automated and verified by the editor script.
 
In the end, I would like to urge you guys again to identify the parts of your game that can be automated or just made quicker by using custom editor scripts that can do various tasks.

I will be doing a full technical tutorial sort of post after the game launch on how to make a custom Level Editor for your game. Hope you guys enjoyed the post and learnt a few new things.

If you don’t know about In My Shadow yet, it is a unique puzzle platformer in a world of shadows that are formed by emotions and memories. Learn more about it here on its site page or wishlist it on Steam  

I had to disable the comments because of all the spam that comes in. But feel free to share your thoughts, questions and feedback via mail or social media (bottom of the website)

Comments are closed.