Prototype 1: Sunwalker Omega

Sunwalker Omega

Get the game from tyasdev.com for free!

As the 14th rolls around I come to the end of my time with my first prototype of the year, Sunwalker Omega. Its stars the eponymous Sunwalker, the very same fighter pilot who “starred” in Sunwalker the last game in my prototypes until today. In this prototype she has been shot down and is beginning to explore the allegedly uninhabited planet she has crashed on.

My inspiration here was Metroid Prime, a really quite fantastic first person game that placed a heavy focus on exploration and atmosphere as well as the shooting that first person games remain known for. I wanted to create a similar atmosphere as the player explores a world that is alien to them.

With this prototype I focused on creating a small, interesting 3D area that required the player to retrace their steps a little bit to solve the main puzzle of the prototype. As my first ever first person game (aside from an unreleased prototype which had very limited game play) I learnt a great deal about creating these kinds of games. First and foremost was the basic movement and looking around.

The Code

Unity contains a really quite solid FirstPersonController which I used as a basis for this prototype. It provided sprinting, walking, jumping, collision detection and those fantastic footstep sound effects. I was able to prototype the movement on day one of development and start planning the necessary heights of obstacles to force players to have to make jumps. I ended up forking that controller and adding a couple of features necessary for my game. First I added very rudimentary crouching (simply reduced the y scale of the player object for collision detection and moved the camera down in the scene). I also added a fairly simple under water script based off of the wonderful example provided here.

That was the bulk of the coding work on this project. The rest revolved around the puzzle design. Minor Spoilers for the prototype follow, I recommend you play it first before reading on. The primary puzzle of Sunwalker Omega revolves around opening a gate at the far end of the playable area. This is done so using a switch in front of it. I initially coded two scripts, a Target (placed on the object the switch would activate) and a Switch script. When the key e is pressed the switch checks if the player is looking at it. If they are the switch calls an activate method on the Target.

From here I expanded these basic scripts adding a PoweredSwitch (which requires it’s power to be on for the click event to send activation to the target) and a switch which requires the player to posses an item in order for it to activate. To support these switches I developed a simple Messanger script which displays the big text messages to the player that instruct them on how to proceed. I also added a simple Inventory system that will likely get expanded as the year progresses and I have more complicated needs (you can’t view the inventory, or equip items and each item is defined in code).

Designing and Building

More interestingly for the rest of you I’m sure was the process of building the environment. Initially I laid out the game world with simple rectangular blocks. I built each of the rooms and connected them together as the final level would be according to the following drawing:

Hand Drawn Design for Sunwalker Omega’s Map

With a basic final layout built I was able to code all of the game logic described in the coding section above and get the whole of the game flow working. With that in place I had a basically finished prototype with an entire week left for beautification and refinement. Firstly I replaced all of the basic cube shapes with various sets of rocks. I used two sets of free rocks and was able to build up a good set of cliffs, caves and out door areas. Next I added cables into the game that would lead the player from the first unpowered switch to the one that would provide it power, but was locked behind a force field.

I then spent some time with pre-baked lighting. This involved making each of the pieces of the environment static then waiting around about 3 hours for the lighting to render on my laptop! The results were well worth the wait, although if I had more time I would run another build with dark ambient lighting as the cave mushrooms really popped in the dark.

Mushrooms and Cables Lead the Way

Once that was all in place the prototype was really coming together nicely. I spent an evening with my very good friend Tom adding extra details, glowing mushrooms, plants and lighting then threw in some smoke and snow. The additional details added some good variety, and the mushrooms were useful to give the player some direction underwater.

Learning Outcomes

So what have I learned from prototype one? Well first and foremost I’ve learnt that baking lighting takes a really long time. It took me around two hours to bake the lighting on my 2016 MacBook pro, and nearer five on my pc. That’s something that I should have handled the evening before release.

Second I need to keep track of scale better. It’s very easy to start building a room or corridor without considering how large the player is relative to the new room. On more than one occasion I built a solid room and had to pretty much throw the entire thing out as the scale was wrong. I’ll also be grouping objects by room next time round so that if I need to move or scale up a room it should be much easier.

I also learnt a valuable lesson about keeping floors fairly flat. While the rocky floors look really good in Sunwalker Prime they can be hard to navigate, often requiring jumps to get over small bumps. I spent a moment looking at Doom(2016) and noticed they use uneven floors but place flat colliders on them so that movement is smooth for the player. That’s certainly a lesson worth retaining for prototype two.

Lastly

(Conclusion would have been far two secondary school science) Thank you, thank you, thank you for reading. If you have any feedback drop a comment here or send me a tweet (I’m @ matthewjtyas on Twitter). In a couple of days I’ll put out a shorter post announcing prototype 2’s concept!

Happy trails and I’ll see you down the road!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.