For a more in-depth look into my own contributions to this prototype, here is a link to my portfolio where I go over in more technical depth how I created this prototype from beginning to end. LINK
Unlike what i’ve done for the previous game and broken down the development through prototypes each week, for this games version due to a time constraint of only 2.5 weeks i didn’t have time to break it down everytime i completed a feature and instead in this post i will break the game through the scripts that i’ve wrote with a final section explaining the video prototypes of the game. This is going to be a simplified breakdown of the games scripts.
The main focus of this prototype was to develop upon our previous game with improved game features. After our 2nd playtest we had alot of feedback and in our group discussion we highlighted a couple core game features we would like to see in the game to make it more interesting and fun:
- Continual Gameplay
- Being able to interact with camps
- Creating a utility for resource
- Be able to build camps
- Continual resource generation
- A complete checklist
- For each task there should be a corresponding storyline with each character
How the scripts are set up:
- Due to the more complicated game system than the previous version I had to begin planning for the future scripts. As such, i set my main scripts up like the gamemanager, campmanager, narrativemanager and task manager in a way that they behave independently but they share their data through two key handlers:
- Save manager: Pretty much as it sounds, its in charge of saving the players session-levels through using Unity’s built in PlayerPrefs and in memory dictionaries
- SceneTransitionData: This was to run alongside the save manager and attempt to keep transient data loaded across scenes.
- An example of how this is used within the gameplay is that it keeps state-sensitive data like the resource totals, week progressions, task completions routed through this system to ensure consistency between the camp scene and narrative scene.
Elaborating on the utility of save & scene data handling:
- SaveManager: This handles two layers of save logic:
- Permanent storage – Uses PlayerPrefs to remember the values for player resources
- Temporary Data – To track in game session transfers between camp scene and narrative scene
- SceneTransitionData: Pretty much this script is a bridge for the runtime scene swaps, what’s included in this is:
- Resource Values
- Day and week counters
- Camp upgrades
- This intalises a DontDestroyOnLoad() and is prioritized during a scene load
- The reason these are so important to have set up is that it creates a seamless transition for each time the narrative scene is called on, especially important when having to constantly playtest the game.
CampManger Script: Handles the camp management, resource generation, and UI handling:
- The camp manager is in charge of how the camps are constructed, upgraded and how the resources are then generated. This means it creates the structure for the camp progression through an upgrade system which decreases production times. In addition, it also tracked the visuals of the camps from scene to scene ensuring the remain “built”.
- As i’ve mentioned there are 4 key features. Here is a brief explanation of each features utility:
- Camp Construction & Upgrades – Simply this added a build cost, resource generation type and base generation time with the upgrade system decreasing the base generation time. This was implemented to offer a strategic choice of resource usage to maximise the resource output.
- Resource Generation Timers – I decided on using timers to control the rate in which camps produce their given resource whilst allowing this timer to be affected by the camps level.
- UI Handling for Camp States – For each camp there are a couple of UI components connected to them, the build and upgrade button. The player can either see these options, or it will be locked due to the player not unlocking the previous required camp. Additionally to the buttons, the camps each have their required resource amount to both build and upgrade. Lastly, they each have the timer and slider to show how quick the camp is producing the resource in real time.
- Resource Management – There are 5 camps with 5 unique resources, scraps, food, bio, tech and security. The camps each have their own upgrade level which the game checks to determine how long the generation time will take. After each countdown the resource total gets updated by the resource management system
TaskManager Script – simplifying the task manager script, it is in charge of game objects and ensures that they have a clear task and reward for the player. The reason this is the longest and most in depth script was for numerous reasons but one of them being that the tasks were designed to be complex, interdependent and encourages the player to complete all tasks within the game.
- Some of the key features include handling the task structure, task UI, resource management integration and task dependencies. Here is a quick look into each feature:
- Task Structure – Each Task is set up in a way that requires the previous task to have been either completed or at least close to being completed to progress. This sets up a structured progression that requires resource gathering, talking to characters and even potentially upgrading camps before they can complete all tasks.
- Task UI – Simply the task UI is set up so that you can click to examine the requirements for each character’s task and then also two buttons, one to speak to the character and one to complete the task. Once spoken to and completed the character profile grayed out indicating the task has been completed.
- Resource Management Integration – another core component of the tasks system is directly connected to the resource system. Each task requires the player to collect a specific amount of resources with each new camp unlocking the next camp’s options to be unlocked. This form of resource management integration keeps the player hooked and conscious about managing their resources.
- Task Dependencies – Although not fully utilised the task dependencies sometimes require previous tasks / objectives to be completed to continue the game. This was implemented in the unlocking of the camp systems to create a logical flow to collect resources.
GameManager script – The gamemanger was in charge of the global game state and time progression.
- Although towards completion the gamemanger started to become outdated it still was in charge of controlling important features such as tracking the overall game progression from days to weeks to resources whilst also being in control of the narrative scene transitions. In the end I utilised it to create a logical flow to each system. Although long the most impactful system it controlled where:
- Scene Transitions and State Persistence – Simplifying this it is responsible for saving and loading the numerous game states, specifically when transitioning between the narrative and camp scene. It made sure to save all game states including the current time, day, week and resources. All this data then got saved to the SceneTransitionData script which made sure that when the player transitioned back to the camp scene their game progress remained the same.
TimeController – Arguably the most important script, this controlled the day & week cycle, speed control, and visual feedback
- The timer controller was essential in managing the in-game timing controls and time based progressions while allowing the player to fast forward time to increase the resource generation timers. This was essential to keep players occupied later on in the game.
- Day and Night cycle – each day equates to 300 seconds and this day progression can be seen with a continually updating digital clock and slider. For future development I implemented a day and night system that would flicker between day and night when the clock hit the evening and morning.
- Speed Controls – This allowed the player to switch between normal mode and fast forward mode where it allowed the player to increase the days clock by 3x the speed. This allowed the player to reduce the wait for resource generation and tasks to be completed. This could be visually seen in all clocks and sliders significantly increasing in speed.
SeneTransistionData – was required for scene data persistence and state management
- Slightly more complicated the SceneTransitionData script serves as a persistent runtime container for all game data that needs to stay persistent between the two game scenes whilst also erasing this saved data at the end of a game session. It manages the temporary states like resource counts, camp states, task progression across scenes to create a smooth gameplay with easily transferable data. As this gets technical very quickly, a more in depth explanation of this script can be found in my portfolio HERE.
This was a challenging task in many ways from time constraints, miss-communications, technical challenges and many more. However, as a group we overcame these challenges and ended up producing a game, although not perfect, we were much more pleased to submit. With the help of my group we were able to come together and fix the major bugs littering the game. For a look into how the UI came together and all the call visual features check out Anna’s portfolio HERE and for my breakdown of how I developed the backend features and set up the foundation here is a link to my portfolio HERE.