Into the Shadows supersedes the No Hope game project that was worked on previously. More information about that project can be found here: No Hope Text-Based Console Game.
Into the Shadows is a much bigger project. There are more mechanics, larger story, better combat system, enemy variety and more. There are significant improvements made within the codebase. The only thing that this project utilise often, which it should have, is inheritance. Overall, this project has been a huge success, in contrast to the previous project that this supersedes.
This game was inspired by Silent Hill Homecoming, Fallout 4, and Resident Evil 3: Nemesis.
Statistics:
~ 8,882 lines of code written.
~ 17 Unique classes.
~ 13 Battle BGM, 12 Story BGM, and 20 SFX audio files. All implemented within the game.
Implements NAudio & Spectre Console libraries.
Implements a Save & Load system.
Awarded 100% for this assignment.
Source Files takes up to 831 MB.
To view the full resolution image of the map, click on this link: Full-Resolution Map [9415x9450]
Similar to Midnight Storm project, I have suffered a dilemma. A dilemma of determining on how to handle the audio files, since this game will feature a lot of audio to make this game much more unique compared to other student's games. Plus, having audio implemented into a game makes the game world much more immersive and realistic, as it gives the player a sense of immersion.
Console applications are further limited with how sounds could be played. This is because, by default, Console apps do not have direct access to SoundPlayer, unlike WinForms. Initially, SoundPlayer was going to be used, and to use SoundPlayer, I needed to install a package from the NuGet Package Manager. I was planning to compromise the audio, by adding background music on its own, without adding sound effects. Although, this decision made me unhappy.
Upon researching, I have come across NAudio. I was uncomfortable with its method of implementing and handling sounds, yet, I have implemented NAudio within the project.
The problemo with NAudio is that, NAudio is unable to automatically handle an exception when if it is trying to play another audio file, whilst an audio is being played, the console app will end with an exception.
This was the only way to circumvent the thrown exception. By popping this into a public method, I could call this almost anywhere as necessary.
NAudio also lacked audio loop functionality. Stock NAudio comes without a loop function, therefore, this has to be manually implemented. As I was clueless on how to get around this, I eventually find a solution online. Despite understanding some blocks of the code, the rest is completely illegible to me.
During my independent C# researching and practice, I have come across with Threads. I did not realise the usefulness and importance of threads. While I was still new to Threads, I managed to take advantage of Threads by utilising Threads to queue and play multiple sounds at the same time. Alternatively, Threads can be used to play a background music along with a sound effect.
Creating a save and load system sounded easy on paper, although, the mechanic was a bit of a challenge. I knew how to export variables to a text file (.txt), but getting the exported variables to be read into the game was tricky.
To start off, I have added several checks within this game, to see whether the save directory exists or not. If not, ask the player whether if they want the game to create this. If not, then abort the saving process. Variables are saved into a text file using a StreamWriter.
There probably were an easier way of doing this.
Loading the saved data into the game proved to be an appropriate challenge. This is because we need to locate the correct variable within the text file, and update the correct variable in the game.
Using StreamReader, I have removed unnecessary characters from each line, and allocated the proper variable values to the variables in the game.