Sunday, August 2, 2020

Code & Stuff

It will have to wait...

Some of the email regarding early-access Zombie Guard 2


In the early release of of Zombie Guard 2 there was an NPC at the end of the available content who would ask if the user would like to submit feedback. I still receive these emails, even though this NPC has been removed months ago. This tells me that many are downloading the app through third party sites instead of the app store, or simply not updating the app.

This game has potential, but for non-compete reasons I cannot work on it as this would create conflict of interest with my employer. I was okay with this when I accepted this position.

Even though I work full time and code all day, I still reserve some time for coding just for leisure. Here are three things I have been doing:

Path-Tracer


Path-Tracer converted to C#. 40,000 samples per pixel.

I had written ray-tracers before, but never a path-tracer. To accomplish this faster I used this resource and converted the code to C# and researched the actual algorithms and math separately.

C# has become my primary language both for work and projects if given a choice. Over the years I had used C, C++, UnrealScript, Lua, ActionScript, Haskell, Python, LiveScript for HTML5, etc. But C# combined with Language Integrated Queries (LINQ) and good usage of properties and naming conventions is just so hard to beat; it may remain as my favorite for a long time.

Arduino


I tend to prefer the Arduino over the Raspberry Pi because I'd rather use my laptop to write programs, rather than install an operating system on an SD card to code on the Pi hooked up to a monitor. Plus I have multiple Arduino boards which don't need an SD card, so I can deploy the same program easily over USB.

Arduino with a WS2812B LED strip


I have a few WS2812B LED strips and a bunch of random modules like thermometer, barometer, motion detector, camera, buzzers, buttons, bluetooth, etc. I use the FastLED library to light up these LED strips, so from there I can hook up any modules I want for custom behavior. I could have these light up as I walk down a hallway, or turn on at a certain time, or just have the colors light-up using a custom app over bluetooth/wifi. Or, I may just line these under kitchen cabinets and my desk.

LeetCode.com Exercises


In my opinion, day-to-day game programming involves more effort in code organization, usage of design patterns, and utilizing what already exists. It tends not to be especially heavy with complex and optimal algorithms, so I practice this on the side.

A lot of the fun in these hard LeetCode.com problems is not necessarily getting it to work, but getting it to run optimally. Most of the time this involves a hashset or a large cache in some form or another.

Saturday, July 25, 2020

Fantasy Fighter Arena

Since this is now public information, I am permitted to share the prototype being developed by a small team I joined at KI. The game is called Fantasy Fighter Arena and this video should be self-explanatory:



I joined near the end of the prototype, so I have the advantage of learning from an existing code-base and custom tool set. It has been a marvelous learning experience for me as a game developer and engineer.

Below is a prototype from last year.


Friday, July 3, 2020

KingsIsle Entertainment

I have suspended all operations by joining one of the small mobile game development teams at KingsIsle Entertainment. Based on the first week, I can easily say it has been an ideal choice for me. I am striving to be a valuable engineer on this agile team, and really admire the creative direction and production style.

Members of KingsIsle Entertainment (photo taken before pandemic, I am not in this photo)

I have worked on big-budget console and PC games on a large team, was a sole developer for Web and mobile games, and now I have found an ideal middle of the road.

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 "Proxy" 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.