Forest Adventure - postmortem


Forest Adventure - postmortem


Coding

Forest Adventure was supposed to be my first game (almost) entirely made with visual scripting. In the first two days I struggled with changing my mindset away from coding, but I made good progress. The first problems emerged when I created a build just to see how the code works outside of the editor. Well, it did not. At least some parts of it. I had no idea what happened, but as time was getting short I decided to carry on with the project using C#. This proved to be a good idea, as it turned out that the enemy behaviour was more complex than I originally thought and I would not have finished in time had I used visual scripting in which I am not as comfortable as in C#.

However, after finishing the enemy behaviour I learned a lot about layers and GameObject hierarchy in Unity and with this knowledge I might try to make something similar to it using visual scripting.

 

Controlling the light

My idea was that the player could control the player character and the light separately. In theory this is great, but in practice I think I did not manage to solve it as well as I wanted to. The light is rotated using the mouse. Basically the light turns towards the position of the mouse cursor. If the cursor is close to the player character, the light’s control becomes clunky and difficult. If the cursor is further away, the controls are fine, but to change direction you must move the cursor to the other side of the screen, which can be time consuming. As a firefighting solution I added a toggle which enables the visibility of the cursor during game to help in the understanding of the movement of the light.

As an experiment this method is good, but if I wanted to make a longer game that uses this type of control, I would definitely try to make some adjustments. Some ideas:

  • light faces towards player movement, and can only be rotated in a 180° range
  • forcing the cursor to move along an arc, hence preventing it to get too close to the player


Depth

My original idea was to limit the player movement in the x-y plane and use a perspective camera to give depth to the scene. However, the light rotation caused another issue. The script I used only worked on orthographic camera mode, and it was too late to change when I realized this (the deadline was looming!).

Depth comes from two factors: the parallax effect (things further away from the camera move at a slower pace) and colours of further-away objects becoming “washed out”. In a perspective camera the parallax effect comes naturally, while the desaturation of colours can be manipulated with the 3D fog. In orthographic mode all objects move at the same speed regardless of their distance. Regarding the fog I found contradicting sources on the issue, but it did not work for me (or maybe I just gave up too early). Solving the parallax effect in a truly 2D game is relatively easy; there are a plethora of parallax scripts on the internet. I could have written a script for in that works in 3D, but again, time was short and I was lazy, so I choose to address only the fog. I created a few planes and added a semi-transparent white material to it. I added 1 such layer between the z plane where the action happens and the z plane of the first group of background objects, and another plane between the first and second group of background objects. This gave the objects further away a more greyish colour palette and it fit my purpose perfectly.

 

Sound design

I always wanted to make my own soundtrack, but up until this point I always ran out of time and needed to add royalty free music. Not to mention that I cannot make complex orchestral scores, I am happy if I come up with something that sounds at least a little bit good.

This time, however, I wanted to spend the last day with composing something for the game (this partly explains why I had so little time for some other things…). I used Cakewalk for recording and clearing up the track and my good old synthetiser as an input device. My piano skill is very rusty, but I managed to write something by the end of the day that I am proud of as a first try.

Most of my sound effects that are in the game are also self-made, however, I usually use sites like freesound.org to get the effects I need. 

Files

ForestAdventure_V01.zip 343 MB
Oct 03, 2020

Get Forest Adventure

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.