2nd Law [ Dev Log 2 | Development ]
_This is part of a 5 part Dev Log where I will be talking about the process I took through implementing 2nd Law, a short, adventure-style game about cause and effect._ https://ldjam.com/events/ludum-dare/49/2nd-law
0 - Lessons | 1 - Design | 2 - Development | 3 - Music | 4 - Artwork

First thing's First
When I started off, I had good concepts for the aesthetics, mechanic, and storyline. After drafting out a bit of the story (in the previous post), I ended Night 1 getting a prototype of the interaction mechanic. While I really felt this game would shine as a point-and-click, I was worried about tricky stuff like auto-pathing and Unity canvas pitfalls .. so I took the safe route.

This prototype included a fairly simple state system implemented as linked Scriptable Objects. While the fields grew over time to handle different entry and exit effects, the initial design remained: an Element class containing a series of State SOs, each of which could trigger others in chain-reactions.

Scene Changes
Most of the remaining development was tuning or extending the Element class to handle new objects or characters that would appear in the final game (such as the rabbit and the fox or the boulder). I ended up creating bespoke child classes for each of these, which was probably the right decision for the limited time I had ... but having to do so meant it wasn't as easy as I'd hoped to add new things, which the game really needed.
The other crucial aspect was switching between environments, which were just two canvases side by side. This was accomplished with trigger colliders passing control to a static manager that would reset the camera position and other environment settings.

Every menu that needed to stay with the camera was placed under a single game object--this is a structure I've built over a few jams, so it's easy enough to add menus to new projects.

One detail I really liked was the option to assign different footstep SFX and music tracks to each environment. I had the concept of each environment "advancing" into higher states of chaos, and the background changing to reflect that ... alas, that was too much scope for a jam.

If you are interested in any of the source code for this game, you can find it on gitlab! In the next two devlogs, I'll talk about the thought that went into the music design and scene design!
What’s next?
I’m excited to talk about more aspects of my experience. If you’d like, please follow along!
_- Hawkin_
Source: ldjam.com archive
Next post2nd Law [Dev Log 3 | Music & SFX]