Posts

Showing posts from December, 2019

Programming UI for Critters

Image
I never really thought about how UI is coded for games. For me, mostly working with OS level APIs UI was something that's handled by the OS and I just mostly put my controls on the provided IDE's canvas and code away - mostly. Even for fun, when making mechanical prototypes at home, UI was almost an afterthought. The most I ever made was maybe a start screen with a few buttons to start game or quit game. It worked fine for my needs and even when I started seriously working on ABC-Pop , UI was the last thing I started to work on.  Pretty much all the mechanics for the game was finished at that time. I mean, how hard can it be? Put buttons on the window, and when clicked, change something. Well, as it turns out it can be pretty fucking hard. I soon found myself entangled in 3 separate execution loops all firing different type events toward the main loop all juggling in my head and me trying to keep it all under control. And if you've seen the trailer for ABC-Pop you can a

Of Loot Bombs and Sticky Walls

Image
While you program, you create and form a thought and visualize it through a programming language. It's a beautiful and interesting process that is its own reward. But inevitably, this process will also create nasty little buggers called  bugs.  A flaws in thought, programming logic or simply an error while writing code. In the early Critters development, back in the dawn of time (few weeks ago). I implemented a Toolbar HUD element with a few Critters-Murder tools I wanted to test and play around with, with one of them being a grenade type weapon that player can drop on the little bastards. After timer is complete, the bomb grenade explodes with the satisfying destruction inside its radius. Critters die and spawn gems and ammo. Player collects loot and continues the destruction. All in all, often used but a proven little concept of blowing stuff up. Until loot pickup started spawning their own grenades - that is.  Now, I'm the first one in line for more Critter destruction,

Trouble in Qt Paradise

Image
I've spent more than a decade making professional commercial programs in Windows and MFC. Before that, I was working in now extinct Borland C++ Builder and VCL (I miss you old friend). Way back when, around year 2000, I had Linux as my primary OS installed (Mandrake - I don't miss you) and was testing different APIs to get a feel of programming GUI for Linux. At the time I had access to KDE and Qt. KDE was OK, but when I tested Qt, something clicked. Their entire programming paradigm just resonated with my programming style. And while KDE had more of the Win32 API approach, Qt was entirely different. And while KDE and Win32 at the time made me code message loops, in Qt, all was provided on more or less few lines of code. I think I made Tetris clone in Qt before ditching Mandrake for Windows. Fast forward a few years and I got my first job as a C++ programmer. Me being a self taught programmer I walked to work every morning with an ear to ear wide grin every day. After my tr

Critters is NOT a Tower Defence.

Image
The idea for critters originally came from the old DOS game called Chickens 2, by Brainchild Design. You can find the game here https://www.dosgamesarchive.com/download/chickens-2/. Chickens 2 by Brainchild Design I originally wanted to recreate this game for mobile platforms partly to practice mobile development and partly because it is a simple but addictive game design that is perfectly suited for Mobile platforms. Chickens come from left and right end of the screen and must not reach opposite end. Every time a player shoots, time decreases by a second and there is a chance for a gem to be generated from a dead chicken that increases the time by a few seconds. Simple and addictive. Few days later, and the first prototype was finished. It featured SDL for graphics and Box2D for physics. Critters, Prototype 1 But as these things go, I soon encountered the feature creep. The game was fine as is an was was ready for porting to Android. BUT WHY STOP THERE! And the sc