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)

What happens behind the shadows

Nothing better to start off our blog than showing how it all started. That means in this blog, I will be sharing a very brief breakdown of the core logic that goes in our game – In My Shadow.

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  

All the formalities done, now let’s get to the part that you came here for – the BREAKDOWN.

THE ELEMENTS

1. Caster Object
2. Light Source
3. ShadowPlatform Wall
4. ShadowWorld (Player, objectives, obstacles etc).

THE LOGIC

1. The light source casts rays towards the vertices of the caster object to find the hitpoints of those rays on the ShadowPlatform Wall.

2. These collection of points are then used to form the shape of the shadow on the wall (has many complications)

3. The shape of that shadow is used to create 2d colliders in the ShadowWorld that can be used for platforming.

THE UNTOLD

Now there are quite a lot of elements/complications/challenges in these 3 steps that have not been explained because it can get too technical and lengthy to go through all of those. But we wish to share as much as we reasonably can and hence will be having more such posts in the future.

Hope you guys liked our first blog and learnt something new. We will try to share as much as we reasonably can:) 

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).