Trial and Epic Fail

Ventures of an indie game developer

Sleepless in Floda

Tossed and turned, woke up early, couldn't go back to sleep. Realized my decision yesterday was wrong. Came up with a new plan:
  1. Release a couple of my games on Debian.
  2. Open source my code, put it on Github. Nobody cares anyway. Compared to Unreal Engine 4, and that's what I and most others compare to, it's crap anyway. Apart from it's very specific 3D physics domain, it's useless. And frankly I think it's useless to everyone else anyway, as the design suffers from organic growth without refactoring. And I'm not going to fix it any time soon.
  3. Release Trabant for Ubuntu, using .deb packaging. Don't know what, how or why.
  4. Co-create some actual games with my kiddies using Trabant. I'll need to make some additions to the API to be able to supply content such as sounds, music and what not. I'll attempt to release the good ones on App Store. If I'm able to reach the fidelity required by Apple, we could mass produce games! As long as the kiddies find it fun this could be a blast!
  5. Create the great game that I've been building up to for so long. My currently best idea is a massive multiplayer online GTA2-tank-style game (minus the walking sprites) where you earn money as you blow up opponents and loose money when you get hurt. The money is used to build bigger+better tanks. I'll prototype the whole thing in Trabant until it rocks. If it doesn't I'll scrap the idea - if it does I might build the whole thing in Trabant.
  6. Sell/educate about Trabant, Python and/or the importance of game prototyping. This would be really fun to do part-time, hopefully yielding some extra dough.

This feels like a much better plan, and even though it's going to take a little bit longer to realize it's definitely going to be worth it. It will to some extent relieve my pain of having wasted so many years building a useless game engine, regardless of the result. If the engine fails me, so be it. At least this way, I'd have put it to the trial-and-epic fail test. That makes all the difference to me.

55+ and still going strong

Today I found to my surprise that my 55+-somewhat female colleague, who normally works with mainframe computers, is a game developer. Didn't see that coming. She and her friend decided to build a game, bought a game engine, learnt PC programming, went to a game developer exhibition for inspiration and spent three years actually building the stuff. That is sooo cool to me - fuck the comfort zone! Ok, so the outcome may not have been the awesomesty in the universe.

But still! It's on par with my design for sure. And both I and my colleague still has a couple of magnitudes to go before we're anywhere near modern graphics. Take this GDC talk at the other side of the spectrum:

I'm glad I've always postponed graphics, I couldn't have kept up with shaders, GLES 1, 2, 3, Vulcan and the rest. Come today where all game engines are free-ish and a fork in the road for me. Should I:
  1. try to build a great game, using my own game engine and ignore everything graphical; or
  2. try to build a game using Unreal Engine 4; or
  3. finally take off my rugged and ugly indie game development hat.
Both #1 and #2 involves huge loss of time and energy, and at a staggering risk of failure. The third option closes one door but opens even more. So, at least for now, I'm going to go with #3. Here's my plan:
  1. Build and release a couple of my sad games for Linux. How hard could it be?
  2. Port Trabant to Linux.
  3. Try to find some angle of sales and/or education around Trabant.
Trabant is really good, possibly the only really good software I've ever written. But the hard part about marketing it is making game developers realize that rapid, interactive prototyping is essential.

As an example, just look at the AppStore. According to PocketGamer there were over half a million currently active games in 2012, and by a five-minute google I'm assuming that number is fairly stable. 20-25% of all AppStore apps are games. How many of those games have more than a handful users ever heard of? 10%? 20%? Considering that by 2015 35 apps in Google Play had 100+M downloads among them, and that by 2012 400k apps on the AppStore had never once been downloaded, a lot of indie game developers have a long way to go.

The same is probably true for smaller studios as well, so I'd say that there is a desperate need for Trabant among those that want to create arcade, racing, simulation, puzzle, dice, strategy or robotics games.

It is really invaluable to be able to start seeing things on screen from the first line of code, to test an idea in hours and to start testing on your iPhone in seconds. I hope I am somehow able to convey that message and make Trabant the go-to product when it comes to simulation prototyping. Before that can happen, there's a lot of work to be done.

Deep Blue (Something)

When IBM's Deep Blue beat Kasparov in chess 20 years ago, they said go would be the next big hurdle. Now Google made that hurdle history by beating a go grand master. What's next? IBM's working on their Watson, and have already made some progress on cancer diagnosis and financial bots working the core of investments (in a broken economic system). But those are really only pattern-matching, same as sound or image recognition. It might be impressive by today's standards but not really new or outside the box.

Some (for instance Google) say the next goal should be beating a Starcraft virtuoso. Sounds both plausible and interesting to me. If they manage that, and I can't see why not, only the written, and then the spoken Turing test remains. And the latter, I'm sure, will never be accomplished.

There are two reasons I think that. The first one is that no amount of pattern-matching will ever get you to human behavior. I think we are more than patterns, more than just the sum of all previous experiences in life. The second reason is related. I believe - for good reasons, I must add - that humans have souls that are not part of this physical world, and not causal. At least not causal in the everyday space-time semantic.

AI will still be able to do fantastic things, and may well take over the world if we ever move across the singularity in the future. My current thinking only sees it as highly improbable.


My graphics card crashed, took it as an excuse for switching over to using Linux. My thinking was that the package management and the maturity of OpenGL implementations should have made Ubuntu with just about any shitty display manager fairly equal to Windows these days.

Gnu still lags behind ~10 years in everything graphics. From small things, that I didn't even know I cared about (such as default font rendering), to bigger things like supporting multiple high-resolution displays, installing printer drivers and a totally fragmented community where Gnome2, Gnome3, KDE, Unity, LightDM, Kompiz and more are competing for the n00b's attention and where solutions become broken in a couple of years. Code do rust in Gnu.

There doesn't even seem to be a good IDE around. It takes months and years to configure Emacs into doing what you want. People do roll their own stuff. Dinky toys. IDE-wise JetBrain's CLion is probably the best thing out there, maybe even better than Microsoft's Visual C++, but too expensive.

That got me thinking about writing my own, proper IDE. Possibly in Python. A text editor is really simple. A syntax-highlighted one is not that hard either, but then I probably want to go OpenGL to be portable. (File) searching with regexp replace are more or less one-liners in Python, but then I have to build my first dialog. Doable, but it's not as comfy any more. Then there's completion. Ahmahgawd. Building is fairly easy as long as you stick with auto-detecting llvm, gcc or msvc. But you probably want to have some build exceptions and what not, so you need to support a build format. MSVC is what I have, it's fairly easy but who doesn't hate XML? Then of course there's debugging and some parsing to auto-show some debug variables. Then there'd be git and refactoring support. Noughty idea! Down, boy, down! Down the fucking drain you piece of shit idea.

Clunky, ugly Code::Blocks it izz... They still run SVN internally. Who does that 2016?

Anyway, I figured a platform which has Quake Live can't be all bad, right! Turns out Bethesda (id's Quake Live publisher it seems) pulled the Mac and Linux plug six months ago. Sure, I get them, only 2% of the user base was on those platforms. What the hell have I done to myself? Not even a decent game in sight!

I tried downloading Open Arena, a Quake clone. And oh was it by any chance the ugliest thing I've ever set eyes on? Hell yeah!

I'll try endure this shit a little bit longer, but if there is still more to come, it would be utter madness to try to continue. If so I'll switch back to Windows for desktop and never think twice about it.

The most amazing part of this Gnu experience is that it still has exactly the same problems as when I tried it the last time. To summarize:
  • It's hard to configure. Easy to install will only get you vanilla, it doesn't tell you anything really. I want a 144 Hz display, took me a day to install!
  • Nothing to do with graphics work. I couldn't even run the amazingly shitty Open Arena in fullscreen - 2016!
  • There are no games for the desktop. The Steam Machine is dead, and it did nothing for the Linux desktop. I was wrong, dead wrong in my vain hopes.
  • The Emacs folk are practically on a lower aesthetics level as me! That's like impossible!
Linux/Gnu desktop will remain in this utterly poor state until they get themselves a BDFL á là Guido or Linus. Someone smart with drive, who knows what's important, who cares and who kills all the horribly bad ideas and developers before they do any damage. Trial and epic fail for both the Linux desktop and myself.

Optimization and side scroller

Me and the kids started making a space side scroller á là Gradius in my game prototyping tool Trabant. I soon realized it wasn't possible to generate hundreds of objects and operate on them every frame. After quite a few hours hunkered down with some good old C++ optimization I'm more than a magnitude faster.

The top nine tests were run before optimizing, the bottom nine after. Most of the bottleneck was in the Trabant IDE-to-simulator API, which is string based. And frankly the C++ standard library isn't very fast at string and list operations. The bottleneck still remains in the string parsing of the API, which is sort of hilarious considering the collision detection and all the stuff the game engine is up to. I did find a couple of slow pieces of code here and there, most related to flagging and deleting objects in the physics engine (I'm using ODE for physics).

I used Very Sleepy CS for the performance analysis. It's basic, to the point, no bloat and just works - exactly the way I like it. As I've experienced in the past, it usually takes a couple of hours before you're able to use it efficiently to pinpoint the pain points, but from thereon it's smooth sailing.

I now realize I would be helped by C++11 rvalues and move constructors. So far I've mostly been doing some mix between C99 and C++03, but now the effects of such laziness is showing. Not only is my former expertise becoming extremely dated, but my code is also suffering. I need to take the bull by the horns. Or should I touch my balls to get hornsy?

Long story short, we are now able to produce a bunch of junk on screen.

I almost forgot: speed is still the most important feature. (Slow means epic fail.)

Doom 1 E1M1 (hangar)

My Trabant Doom E1M1 remake came out at 236 were lines of code and 33 comments for a total of 294 lines including vertical spaces. The AI is 24 lines of fairly (hrm) readable code written in half an hour. The prototype itself is full of bugs and quirks but works as a prototype I guess.

Trabant itself has a few bugs which I need to fix. The polygons flying all over is some shadow residue from the light source I create for each explosion. The camera hiccups I'm not sure about, but it happens when a grenade is thrown, and it got a whole lot worse when I added AI shooting.

All in all: a fun experiment - this is the way to prototype!

Level compression

For the Doom level I made a small ASCII compressor to reduce the size of the level data. It's now at 9k, or 50 lines for floors+walls. That should make the overall source fairly readable and I'll probably come in at less than 250 lines of code for the total level once I've added ceiling, doors, elevators and some super-dumb bots. Not to foul for a Doom 1 prototype.

About the author

Min bilder
Gothenburg, Sweden