Thursday, May 14, 2020

Design Patterns

Lately I have been devoting some time to studying design patterns from an academic point of view. These are ways to structure code in a game or application.


Image from Refactoring.Guru

Link1: https://refactoring.guru/design-patterns/csharp
Link2: https://www.habrador.com/tutorials/programming-patterns/

Some ramblings...


The "Prototype" pattern is useful in an engine, for processing and preparing graphics data for the GPU in in a separate thread, so the game works in parallel for the next frame since two threads cannot touch the same objects.

The "Object Pool" has been useful for me here and there, to reuse game objects because creating and destroying them in engines like Unity is very slow.

I have used a lot of the "Observer" pattern over the years as it seems like the most direct way of handling notifications across many game objects, regardless of the engine I am using.

Others like the "Mediator" pattern was first introduced to me while dissecting the source code of the Box2D library, where collision is handled by a mediator for contact manifolds. In other words, two objects colliding use a separate object to compute the proper collision response, rather than have the objects work it out for themselves. This way, all collisions can be handled properly in one go.

The "Type Object" pattern is by far my absolute favorite. I was introduced to this while attempting to decipher the rather esoteric C code in open source games that use the Quake 2 engine. I still use this pattern in pretty much every game I have written. However, I can see that the amount of data can grow and become too difficult to manage in a much larger game.

I was intrigued seeing "Singleton", and "Factory Method". These are patterns I had been using for a long time without learning about them from an academic point of view.

Moving on...


In other words, I was glad to be familiar with many of these design patterns. I am studying some unfamiliar ones such as "Chain of Responsibility" and "Bridge", even if they are not immediately useful to me. I understand these, and now question how to use them for practical purposes.

Following design patterns, I intend to research data structures. Even some unpopular ones that are used sparingly. I have experience with several and even authored some manually in C during my time studying 3D graphics, but now I am curious of ones that are less common and underappreciated.

Meanwhile, I have been spending some evenings studying deeper concepts in the Unity engine. I am broadening my skills by expanding both extremities - both the high-level and low-level programming topics.

Thursday, May 7, 2020

Simulated Gambling

Following updates for Zombie Guard 2, I will be switching to simulated gambling and slot machine apps. Years ago I created a simulated scratch off tickets app (no longer available), and at one point I was tempted to blend an RPG with slot machine gameplay.

Simulated Scratch-Off Tickets App

Slot Machine RPG Concept

This was all before I acquired heavy experience with Unity. Now, I understand how to create a lot of special effects and apply polish for a truly interactive experience.

I have some ideas that I am considering, such as an addictive scratch off tickets app that has a lot of special effects and audio for an epic gaming experience. I have a vision for this, and the skill set to make it a reality.

Wednesday, April 15, 2020

Perks

I went back-and-forth on the mechanics of this perks system. There are still some difficult decisions I have to make in regards to how the skill points can be reset and redistributed, and how skills are unlocked.


I may change the perks by connecting them into columns of three. So, the top perks are always unlocked, and will unlock the similar perk underneath each. Otherwise there may be too many options to choose from.

The art was more of a hassle than it looks. Most of the assets I licensed will be archived for future projects. I ended up with a very plain style which kinda matches the sci-fi screen effect that warps the screen like an older CRT monitor.

Friday, April 10, 2020

Update

The update is about finished. I want to finish the perks system before I distribute the build.

One of the last missions of the first set of new missions, with help of Zoe and Bruce

Defending with Bruce's Landmines

Scooter Mission

I'm satisfied how things are turning out with this game. One piece at a time. I have all the equipment and expertise to continue, and I will.

Out of interest I have been dabbling in other branches of software development. Back end server programming, and AI with machine learning have caught my interest. I also rediscovered an interest in using an Arduino board with interesting hardware components.

...Still, I think all it does is make me appreciate game programming even more.

Tuesday, March 10, 2020

Missions Screen

An early look at the new missions screen.

Missions Screen

The first several missions are triggered without this screen, by going around and chatting with in-game characters. This gets presented later, at the door of the safe house.

I did not want the game to be too linear by offering only one path of missions and story. But, I also did not want some large open world with multiple quests and characters, as that is difficult to balance and test.

So, this is something in the middle of the two extremities.

Friday, March 6, 2020

Safe House

The safe house is underway. This is an area of the game that provides options to upgrade perks, weapons, and choose missions. This seems more appropriate over some UI system with buttons and panels everywhere.

The Safe House

Area to change outfits (plus saved weapon and perk configurations)

The size and depth of objects will be corrected. I need shadows and better texture for the floor an walls.

Saturday, February 29, 2020

Design

I met another remote worker from Germany, and we were discussing what we do. She searched my project by name and to my surprise, there is already a YouTube video posted of Zombie Guard 2.


I would rather the game not get this much attention early on, so I may suspend it until there are more features. I have adequate feedback of the first missions.

Gatling Gun

Quad Blaster (placeholder art)

Flamethrower

Recently I finished some new weapons. But more importantly, I have decided on how to proceed with the game as a whole...

I will permit the player to gain experience and level up, to gain skill points to spend on various perks. Some of these perks will be used to increase the maximum rank of certain types of weapons, upgraded with in-game currency. Plus missions are going to be selected through a new menu system that is currently in development.

It took a lot of effort to contemplate these decisions. I do not want to choose the wrong option, especially when it comes to how multiplayer will fit in through the new missions menu. I think I solved it.