Prism 1 & 2 were one of the first games I've ever made back in High School. They was one of many projects that I used to teach myself how to code in C#. At the time, my high school didn't offer many in-depth coding classes besides AP-CS, which was only an introduction into Java programming. Since I only knew Java at the time, the main problem I had was that I wanted to make Native Windows Games without dealing the compromises that a cross-platform language, like Java, had to make. Java simply had too many nuances for the type of project I was looking to create. So I decided to learn Microsoft's C#, hoping that would bring me closer to what I was looking for.
I first tried to make the game using .NET WinForms, and overriding the OnPaint() method. I then attempted to create the gameplay loop / logic which you can see in the GIF to the right. I quickly realized that without a good collision / physics library, the gameplay I could create by myself was very limited (Mostly 1D motion, with simple 2D jumping).
I eventually realized that doing everything from scratch was not the right way to make a game. I went on to find a framework (NEZ, built on top of MonoGame) that allowed me to create games without needing to implement game engine systems such as collision detection, rendering, and audio. From here, I eventually started work on Prism 2:
Prism 2: Core Gameplay Loop
Created using NEZ and MonoGame.
Armed with more C# experience, and a solid vision of what I wanted this side project to become, I started to implement the core gameplay loop which is depicted above.
There were a number of additional gameplay features I wanted to implement (sloped bars, power ups, difficulty multipliers [scrolling speedups], etc.), but I only got around to one which was the teleport bar:
Teleport Bars Enemy: Solid blue rectangles on either side of the bars are teleports.
This is a special type of "enemy" that the player encounters where the entire bar above them is fully solid, however on one of the ends of the bar below, there is a teleporter that will teleport the player to the linked portal above the solid bar.
Although the gameplay was fun, the game feel was there, and the audio responsiveness was solid, ultimately there was still something missing. I asked myself, why would anyone want to play this game? The answer was they probably wouldn't, so I gave the player a reason: Upgrades!
The objective of the game was to rack up a high score which is akin to surviving as long as possible. Over time, the player receives score passively, however jumping will give the player an instant score bonus. Continuous jumps without hitting the bar above would grant the player a point multiplier (up to x10) for every successful jump. This bonus starts at +25, and up to +250 for each subsequent jump. Once the player dies, the game tallies up the player's score and awards them "Light" which is the currency used to buy upgrades.
Depicted in the screenshot above, the amount of acquired "Light" is displayed in the top right of the shop.
Once the player acrews enough Light, they could then use it to purchase cosmetics in the upgrade shop. The upgrades that a player can purchase are purely cosmetic, but I think they look appealing enough to make the player want to collect all of them. There is a small number of upgrades (around 5 different ball colors, and 3 different background tracks you can listen to while playing the game), but the way I created the upgrade shop allows for more upgrades and upgrade categories to be easily added.
Additionally, the Light the player acquires, as well as any upgrades that the player purchases, are persistently saved through object serialization. The player's data is then written locally to a file called "savedata". I implemented the persistent saving through serialization because this was a new feat for me at the time, so naturally I wanted to challenge myself. Additionally, I also wanted to implement simple anti-cheat measures by obfuscating the save data, instead of just writing out values in plain text where they are easily modifiable.
Overall, this was an extremely fun project to work on, and I learned an absolute ton about C# back in the day. I learned about how to use 2D Arrays, how to design and create Objects, how to load different scenes, how to perform simple linear transformations (lerps) (as shown in the scrolling upgrades in the shop), how to serialize game data + save it locally to the disk, and how to apply post-processing to make the game look much better.
This was just one project I went out of my way to create because at the end of the day, creating new things for other people to enjoy is what I love to do!