Posts

C++ Credit Card Validator

Image
 Continuing my (almost) daily C++ practice, I am now making a program to check if a credit number is valid or not. The first step was to use the Luhn algorithm, researching this, I learned it was a simple and effective fraud protection algorithm.  I broke in down into a few simple steps using this formula and got some test credit card numbers online and attempted the math. It took a little while to get used to, but I got used to it quickly enough. Naturally doing the math is tedious, so I took to Visual Studio 2022 and booted up a C++ file. At first, I created some functions to use later. These were for getting the digits and the sum of the odd and even numbers. Then I created some declarations for each of the functions. I then added some functionality to the main code, mainly prompting the user to input their number and allowing them to do so. Then as a result, adding the sum of the odd and even digits together. For the sum of the even digits, I created a for loop and as I wa...

ATM Cash Machine in C++

Image
The best part of being a game dev to me is...well, making games. So much can be done without touching a line of code, which is great. Well, not really. Recently, I have made sure to implement more code (C++ and C#) into my projects but I feel like I'm neglecting my programming. So I decided to boot up some exercises and test myself with creating a cash machine/ATM interaction system in C++. The first step was to set up the functions and then define the variables. I then created the UI and printed out what would be the interface and then allowed the user to input their choice. I wrapped that in a do while loop and created switch cases for each choice presented in the UI. I then initialised the functions for later use.  Then the output presents the user with the choices for input. (Yes every option is 1 in the UI for now, don't worry I catch that error later!) If the user presses 4, they will exit the interaction. To show the balance, I printed out the balance and added a setpre...

Creating a Dynamic Day and Night System in Unreal Engine 5

Image
                           A Brighter Day, A Darker Night                                                            

Nexus Station: Game Design Document

 As part of an Epic Games certification course, I was tasked with creating a pitch deck for a game and then expanding that to a Game Design Document. For the GDD: I broke everything down into manageable sections and began filling it out as I went. As the game in question is envisioned as a horror title with an emphasis on narrative, I began with filling out those sections (at least as a draft). The low end gameplay details are to be determined later, with only basic ideas noted so far. As I begin to flesh these concepts out more, I can update the live document with diagrams and go far more in depth with what I wish to achieve. EDIT: Added more details on the plot and characters. More information to come soon! Here is a link to the draft of the GDD, it is far from complete and a work in progress: https://www.dropbox.com/scl/fi/h3w84nle2aix3li9gyim3/Nexus-Station-GDD.docx?rlkey=hdoxr7fakvzju23pdypsixtof&st=jyb6u55i&dl=0 

Maximum Wipeout: Part 1 (Unreal Engine 5)

Image
 As part of my university assignment, I have to add a mechanic to an existing template in Unreal Engine 5 using Blueprints. As usual, I decided to go a few steps beyond that and create a short demo based on Total Wipeout and Fall Guys. The play traverses obstacles while gaining points at checkpoints and for their total time, with a special treasure and challenge awarding bonus points. The mechanic I chose to focus on (the assignment specifies just one new mechanic) is the points system. The reasoning is that regardless of how fun a game is (especially a platformer), if you are not being rewarded for your skill, why bother? The Set-Up Where to start? Well, if we are doing Total Wipeout we need water. Having bought the incredible Fluid Flux plugin for another project, it was an obvious choice for the water as it looks stunning. Fluid Flux provides stunning water caustics And for the sky sphere, I added Ultra Dynamic Sky for dynamic cloud coverage. Both the stunning water and skybox d...

Creating a simple dialogue system in Unreal Engine 5

Image
 Through my early days as a gamedev, I've learned a plethora of neat techniques but there was one that I always wanted to know how to do. A dialogue system. Here is my first attempt at a rudimentary system. This will be redone very soon with more depth. The very first step was to create a interface for Dialogue. Then a duplicated the Third Person Character blueprint and changed the meshes for both.  I made variables for this NPC, the first being an array variant of the string variable. This was give as many options for dialogue as I wanted. Then I created an index variable as an integer to determine in what order the dialogue was spoken. Then a reference to a widget was made. For the string array, I added three elements and added three simple sentences. The Index integer was initialized at -1. This was because the first element of the array began at 0 and the way the code works, we are incrementing the index. Starting it at -1 means we start blank, then move index 0 (the first...

Remaking Mario in Unreal Engine 5 (Part 4)

Image
 (This post follows on from this page:  https://triplehitcombo.blogspot.com/2024/07/remaking-mario-in-unreal-engine-5-part-3.html ) Last and by no means least, we hit the final page and it's all about the blocks! Okay, a little bit about the Third Person Character as well.  Let's get that bit out of the way first! In the construction script, we set a function for when the player dies. A sound plays, inputs are disabled, an emitter is spawned, character movement is disabled and an animation plays to jump the character up slightly, in Mario fashion.  In the event graph, we have the death function. It plays out as the construction graph would indicate, with the player dying and the transform location updating as I intended.  Once the location is determined, a delay is set and a cast to the player is made to deduct a life from the player, then the player actor is destroyed.  In the Modify Hit Points section a few checks are needed. First off, I needed to check ...