I knew I wanted to do the intro for a survival type game from the beginning. Traditionally survival games don't have scripted beginnings so this would set the scene on my open world game. Originally I was going to design my game intro to be escaping a boat and have to survive on a large island. The beginning of the level would be on the boat, you find your way out, realise you're stuck on a small island surrounded by ocean. That was until I realised I couldn't make that much water which would be a problem. My initial sketches were all of a boat and an island tunnel underground.
Being a huge fan of games like Minecraft and Skyrim (especially the survival mods). I discovered my story would work as well in a mountainous wilderness region. I went about making sketches and adding them to what became my One Sheet.
I set it in a prison within a mountain so I had a lot of modelling to do. As I wouldn't be able to construct anything that detailed just in Unity I then decided to fully craft my level in Maya first then could put it together in Unity.
I made just one of everything I needed. So I began modelling the start of the game, where the player would begin their journey. I made a prison cell, the chair, the cell door and the corridor for the cells with a ladder which would later be used to climb out of the basement section.
Next came the first floor when you climb up the ladder. I made the floor and I made the 'rubble' which the player would have to crouch under and climb over to make it through the level. I found the polygon deformation tool where you can take a simple polygon shape and almost 'paint' bulges and crevices in. So I did this to simulate the rubble.
I already had a cell door, but I needed different sized cell walls for the ground floor and the top floor. I added more walls and calculated what I would need in each position.
I started thinking about all the set dressing that I would need to add more immersion, rather than having a bunch of empty rooms. I made more chairs, tables, vending machine, autopsy table, office and cell items.
So I went ahead into Unity and started building my level. Importing everything to scale, positioning and duplicating anything when needed. I added either box or mesh colliders depending on which I would need to each specific piece. I added Point Lights on where the lights would be gradually added the main structure to the level. I started with the basement level where the player begins.
I moved onto the next floor up. Every so often having a quick play test to run through areas and changing the mesh in Maya and re-importing the mesh again. For instance, the rubble pile which the player needs to climb up was too high to start with so I had to go back and re-model it.
Then went on to the next floor up...
I then went and started trying to script all the areas which needed it; the hatch, the doors, the ladder, the first person controller crouch, the lock, the key and all the sound triggers. This part took me ages. Severely frustrated I had to go back and spend a couple of full days trying to get my head around C#. I went and watched multiple beginners tutorials for both C# in general and scripting specifically in Unity. Eventually I started to get the hang of it and successfully managed a hack job on the door lerp and also an amalgamation of other peoples ideas of how to get the ladder to work. The lock and the key components we got taught in a lesson just after so that wasn't so tricky.
After having most my level laid out and working as intended I realised I needed an end to the level so I went back to Maya and created an outside space. I used the deformation tool and soft select to create an rough, bumpy outside terrain and then imported it into Unity. I then created a Skybox for the level as well.
Finally I did a lot of testing, fixing up some holes between textures. I created a 'holding box' to simulate the inside of a dark mountain because some areas of blue were visible through the pixel-wide gaps in the textures. I fixed a few scripts which had undesirable properties and tuned all the lights and sound effects. I added a collider at the end with a message that the game has finished (or just begun).
I learned hundreds of things doing this project. Things I didn't know about Maya, things about how Maya and Unity interact, many, many new things about scripting. Overall I'm fairly pleased with it.
There are a couple of known bugs which I don't have the knowledge or programming ability to fix right now. For instance, I managed to get the ladder to work by adding a collider to the front portion. When the player enters that area, 'W' goes up and 'Z' goes down. This also means that it ignores terrain. It ignores all colliders also, so if you're positioned in just the wrong place and hold 'Z' while in that collider, you can phase through the terrain and fall through the game world. I have no idea how to fix this, but luckily a player would most likely have to be trying to do this to find the bug.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.