Thursday, April 2, 2015

Popcorn, Movie time!

It took a goddamn millenium, and no, this is NOT an official movie showing in-game content or the hottest new engine features. But nevertheless, I wanted to show you guys something. Just to for the fun (and to make clear we're doing something hehe).

While waiting for assets to finish the official movie -which will actually show in-game content of T22-, I made a little test myself. So expect "programmer-art", not a fully polished demo with extreme awesome horror moments. Also note that this demo was still made with the current/old Engine version, not the code I've announced in the previous post. But anyway, and also thanks to Cesar Alvarez who did the audio for this clip, the end result shouldn't be too shabby. Enjoy!

Any background info, about the applied techniques maybe? Well nothing truly new really, although the particle systems have been remade last year. Including an editor to define effects, and the capability of the particles to catch indirect light via a (partially pre-baked) probe grid. Another ancient but still useful feature that was implemented, are light-flares. Hmm? Didn't we already have those? Yes, no. Sprites have been there, but they did intersect with the surrounding geometry, giving a weird cut-off at some camera angles.

Let's see... Oh yeah, a tiny preview of FBX animations being pumped into the engine and used on a model... Usage of scripted triggers & path motions (moving our toy-train from A to B, with rotating wheels). Lens distortion halo's, some volumetric light with dust here and there, and the ability to (vertex)paint layers into the walls, floors and other surfaces. Check out the variations in the wallpapers for example.

Another invisible, but very useful feature, are "sector-boundaries". Sector what? The world you're seeing isn't just 1 big level, but a whole bunch of rooms and corridor pieces, called "sectors". Sectors and their contents (textures, objects, static geometry, ...) are loaded on the fly, in a background thread when approaching. Oh, and older sectors we left will be dumped sooner or later as well, to keep the memory usage somewhat low. Anyhow, in order to define in which sector we are at any given point in the world, each sector has 1 or more primitive shapes such as cubes, cylinders or spheres, that globally define the boundaries. This allows the engine to quickly determine where we are, as well as helping with the portal-culling mechanism.

Ok. And how about the jumps/crossovers between the "normal" and "altered' worlds in the demo? Recording twice and video-mixing with Blender :p

One last detail. People who paid attention may remember earlier blog-posts about this demo being mixed with an Audio Bullys track; "The Subway". Although I do have this Musical Demo in the vault here, I decided not to release it, and let Cesar play instead. The idea of asking AB for permission to use their track was a bit overwhelming, plus making a video-clip that really complements a music-track (or vice-versa) is fuck'n hard. Personally I found it pretty cool, but others would lift their shoulders and miss the link between the visuals and audio. Then looking back with a critical eye -and ear-, I understand why. Our game engine and editors aren't flashy music-clip editing tools to begin with, so especially the synchronisation and pacing were a bit dull, and the video tempo a bit too low to match with the bouncy beats. Well, who knows. Another day maybe.

Sunday, March 15, 2015

Open Sesame Engine22

As you may have caught here, ideas of sharing the engine (not the T22 game!) code popped up in my upper chamber. Erh… why?

Say eight years ago, I would never consider opening the doors of my little magic game factory. Not that I’m that greedy, but c’mon! Me coding my ass of for hours, days, years, and somebody else walking away with it?! A master chief doesn’t reveal his super recipes either, now does he? My code would be my “intellectual property”.

Eight years older and wiser now, or older at least, I’m not that afraid of kids stealing my code anymore. You know why? Because code is just code. Hence, you can legally grab another existing super-engine as well (UDK, CryEngine, Source, Unity, LibGD, …). But that still doesn’t make you a brilliant programmer, nor does it automatically bring you a game. It’s just a tool you can use to realize that game… if you work extremely hard, have awesome ideas, a team of talented people, and some luck that is. A nuclear bomb is still harmless if you don’t know how to arm it.

So, would it really matter if somebody uses my code to create a game? In many cases, it will probably lead nowhere due the lack of willpower or resources. And in the “worst” case, he or she makes an awesome game with it. Well… I can think of bigger punishment. Honestly, it would be my pleasure to see that happen! Besides, what is my “intellectual knowledge” worth if it’s not used for any good? Tower22 won’t be there anywhere soon.

Using someone’s code is something different than stealing someone’s ideas. I’m not giving away the Tower22 game-code, ideas or game contents here (or well, actually we will give some of it away with the planned “Fuel 22” system). Nor does this engine automatically include super-cool shaders that make everything shiny. You still have to climb that mountain yourself, but hopefully such an engine can teach, help or at least reduce the weight. And since the Delphi/Pascal community isn't exactly bulging of such packages and tutorials, this might come on the right place at the right time.

A provisional overview of modules, (external) DLL's and other programs to Engine22. Should be enough to make a game :)

But again, why would I release my code? Where is the catch? Helping poor programmers out there is very noble, but not the real goal, is it? Indeed, I’m not a generous Delphi Jesus. No, I want something in return: attention for the project & a better engine. Allow me to explain.

Besides that little piece of elder wisdom, maybe work twisted my perspective a bit. I used to write everything myself. No other programmers in a circle of 3 kilometres. or I would raise my tail and moan like a street cat. This gave me freedom and some status at work. But at the same time, it's lonely at my tiny self-created top. Work last years forced me more into collaboration though. Lack of time to finish everything on your own, plus I got a more supporting, advising and teaching role towards other programmers. Hence, we finally hired a second programmer at one of my jobs, and frankly this new role suits me. It's not so bad to share.

Real-life example of a generic code Framework
To illustrate. The majority of my work consists of programming harvesting vehicles. Hydraulic controllers for big monsters. If you thought about hillbillies, chewing tobacco, potatoes, marrying with a pig, mud and manure, well, you are partially right. But don't underestimate the technological finesse behind the layers of dirt on that combine machinery. Farming isn't about rusty forks and bronze-age tools anymore. Self-propelled fully automatic vehicles, GPS, Telematics, drones & geo-mapping, state-of-the-art diagnostic tools, heavy duty big-ass diesel-engines, virtual terminals. Just a grasp.

My job is mainly about making the hydraulic controller computers (a bit like PLC's), (touch)displays, and the (CAN-bus) communication between those computers. Though more and more side-interfaces are entering the area as well. People want to monitor their machine fleets on a laptop, walk between machines and download performance-data or problem-codes on their iPad via WiFi, exchange data between machines and containers that go to food processing plants. My work is also about presenting all this complicated high-tec stuff as simple as possible to both end-users and service technicians that often don't have a computer background at all. Eazy doez it.

Anyhow, plenty to do, and obviously I can't do everything on my own. Certainly not now we teamed up with English, French and American machine builders as well. This group of manufacturers brought new challenges; how to share technology, rather than re-inventing the wheel over and over again? Of course each branch could keep programming their own stuff their own way, but why not trying to team up, share code, make standardized communication protocols, and create a "common feel" so that technicians from companyA will understand the computers from companyB as well?

So, one of my tasks became making a Display Framework for the touchscreens in our cabins. Although the "front" -the workscreens with gauges, buttons and meters-, differ for each machine, the heart and advanced features are the same on all our touchscreens now. I made various generic C++ modules such as math libraries, Linux platform basics, CAN-bus systems including J1939, a HTTP server, graphical libraries, standard screens, diagnostics, databases + editors to define everything, and so on. The Lego bricks for building your on-board vehicle touchscreen.

Sounds like a logical thing to do, but doing this properly was/is one son of a bitch. Because I wasn't alone this time, I had to make sure that everyone (read other programmers in our group) agreed, liked and especially understood this framework. That goes for both experienced and "beginner" programmers. I had to make sure the Framework would help the guys realizing their software by making things easy and logical. Some of the programmers aren't really programmers as they learned this themselves at work, and never saw a line of C++ before (the most harsh language of all, my goodness). This truly forced me to think twice, thrice about the design. Every module, every function name, every trick had to make sense, and should be pulled off with a minimum amount of coding, and in consistent ways to avoid confusion.

Then on the other side of the boxing ring were the more experienced programmers, machine designer veterans. Ask two persons to design a computer program, and you get 2 entirely different systems. Both visuals and technical bits behind the scenes will be done differently. And you know what happens if two experienced programmers want things their way: clash! The Framework had to make sense, gain endorsement, but also had to remain flexible instead of dictating another what to do. If X wants to make flying saucers, discarding pieces of my "standard chunks", tweak the entire lay-out, or add a complete new feature, the framework shouldn't be a restriction.

After a lot of thinking, discussing, coding and trying, I think the end result is pretty impressive. It's not a game-engine, but the same problems regarding flexibility, performance, and clarity arised. An Engine might look good if it works for 1 project, but does it still work for 10 different projects, and is it robust enough to survive future add-ons/changes, such new communication protocols? Needless to say, this whole experience is valuable knowledge when (re)writing a game engine such as the one used for Tower22. If I had to do it all over... I would definitely do a better job. But it's not just the technical challenge. "My stuff" being used by others now, opened a new dimension of teaching people and writing Wiki articles, as well as listening and taking a step back if needed. Brilliant code or not, it's still worthless if others can't / don't want to use it.

Benefits of an open engine
Nice personal story, but what has this to do with Tower22? Well, why not do the same here? If I put my code (read the engine, not the whole game!!) available for you Delphi fanatics, it will force me to do a better job. Game-programmers will probably recognize the “quick & dirty” way of achieving things. Intentions are usually good, but sooner or later we want results. Showing off cool graphics or playing your first level. This is in contradiction with what writing an engine is about, focussing on multi-purpose / generic / universal frameworks and tools or editors. In other C++ words; writing engines != writing games, writing engines == boring.

Quickly trying to get your first level started, usually means a dirty hack or bypass in your engine. Nice for short term results, but making an irreparable mess on the longer term. Technically, many hobby-engines aren’t really multi-purpose engines but merely a bunch of class-libraries written around one specific (game)project. And as for supporting examples, consistent design and solid documentation? Hahaha. Sniff.

But if I promise to share this engine with others –thus for other (maybe non-game) projects- it will force me to keep it on the right track, and to dodge the temptation of getting my own stuff done quick & dirty. And if I want others to use it, I also have to spend some energy on making (basic) examples, documentation, and (video) tutorials. And last but not least, the open character of the code will allow others to track bugs, request useful features, or even help me writing additional modules, editors, examples or articles. Though I’ll have to note this won’t be a pure open-source project. Yes the code is open, but I’ll maintain the code myself because A: I’d like to guard the quality, B: no time (yet) to process code-commitments on a bigger scale, and C: I just like doing it myself. Nevertheless, specific modules or tools might be outsourced to others in case I lack the experience or time to do so. Which is yet another good reason to have your engine well designed and modular. At this point, getting help on Tower22 is somewhat impossible as it's 1 gigantic pile of (messy) code really.

Combined with the "Fuel22" asset store idea, Tower22 will hopefully get a kick in the right direction with active help from the community. Whether you buy (and thus support our artists) our 3D props, report stinky code bugs when using the engine for your own projects, make example progs, write Wiki tutorials, or just spread the word; it will all help the T22 project. Power to the people.

Roadmap to success?

What’s the plan doc? Well, before anything really happens, I have to get the engine in shape first. Read a re-write (to Delphi XE). That sounds like an extremely lengthy job, but the good news is that I already know how to do it (better) with the experience from the past. In general when programming, most time gets spend on research, googling, thinking about designs, (re-re-re)programming, and of course debugging / testing. Research has been done already (for a big part at least), and the design is pretty clear in my upper chamber. Many of the code snippets and tools can be re-used as well. And as said, I’m a plow-horse. Not a brilliant programmer, but I can certainly push the tempo.

The engine doesn’t have to be *finished* before releasing it. Software is never finished anyway, and the modular design allows to release sub-modules as stand-alone packages. For example, a sound module doesn’t need the entire engine to be up and running. The whole point of modular design is that you can make a sub-selection out of the modules you really need, and discard or replace the others. The more abstract modules will be released first likely, and then we climb up the ladder towards the more game-specific and complicated modules. How long it would take? Hard to say, but believe me, I managed to write quite a lot in just a few weeks (with a crying baby on the background, for that matter)!

In the meanwhile, the Fuel22 system and Tower22 game (demo’s) will continue just as well. As usual, the demo’s will be used later on to get attention for the project. The biggest challenge is to migrate the existing code step-by-step towards the new engine. It’s like restyling your house. Furniture gets thrown out and replaced. One-by-one eventually, although at some point all your stuff has to be placed outside when putting a new floor or painting the walls. The target is to keep the Tower22 game “online” as much as possible, so it doesn’t have to wait on the new engine. Remember, we still have an official demo to release as well!

The Fuel22 website will also require some more months at least. The aim is to have it online just before our next official demo movie is finished, so that new artists (that will hopefully join after seeing the movie) can work & get paid via the Fuel22 system. If you missed Fuel22; it’s a webshop to fuel the creation of assets we need for a next playable demo. Instead of throwing a Kickstarter campaign we’ll sell a part of the stuff we make (think about 3D objects, textures, drawings, audio FX, …), and the money goes straight to the artist so they get more reason to join & get motivated to keep producing. Something this project as a whole really, really needs.

The same Fuel22 system will also be used to both download the free engine modules, and later on to buy the "Full package", when it's ready. Selling the engine?! Yes. The idea is to release a “lite” version for free –the stuff we discussed above-, and a “full” version for a low price. This full version would contain some more modules, the graphical pipeline + advanced shaders we’ll be using in Tower22, and editors. Obviously we’re still far away from that, but again the idea is to fuel our project by selling whatever we can. So why not selling the engine as well? You'll be happy with a cheap engine, we'll be happy with a donation that can be spend on rewarding the artists for their 3D/mapping/audio/drawing/whatever work, and me happy as all those years of programming finally gets me something return. Maybe even the girl will be happy after all those lost hours then ;)

Well, more information will certainly follow. That also means this blog may get more engine-programming related articles. Showing examples, engine design, et cetera. Does that sound like a plan, A-Team?!

Saturday, February 7, 2015

Me, myself and Delphi

Let's talk about programming, as it has been a while. A programming love-story that is, Fifty shades of Grey material. Ok then. Right now I'm taking some bold steps; migrating from Delphi7 to Delphi XE. Back to the future, but then the other way around. As much as I like Delphi7 -we go back a log time as you will soon find out- it got surpassed by others. As every aging married man has to admit sooner or later; your wife isn't as pretty as she used to be anymore...

Puppy love
It must have been six- or seventeen years ago when I first met her. So far, my relations didn't go very well. There was that first kiss in kindergarten from QBASIC, where we made a text-based game with its famous PRINT commands. But I cheated on her, by tweaking the "Lingo" game timer from 7 to 70 seconds. That must have been the last time we spoke.

When I got a little bit older, I tried to date C++. That didn't work out too well either. She was the type of girl that comes with a thick manual. Always complaining about her syntax, nagging about linker errors, undeclared kisses. Impatient teenagers as we were. It was fun as long as it lasted. Or actually, it wasn't fun at all. In short, I couldn't read English books, nor did I speak C.

I always wanted to become a "programmer" (couldn't even spell it back then). Which is somewhat strange in itself, as I'm more an Alpha than a Beta. Numbers, Math, physics, chemistry... not really my cup of tea. I wasn't too bad at it, but my chemistry was more with, erh, hmm, "making stuff". And then I mean in a creative way, because my hands aren't even capable of holding a hammer. Drawing things, making up fantasy worlds, that kind of stuff. I didn't become a programmer because I liked brain-crackers or solving problems with logic. I figured in order to make (design) games, you had be able to program them. Well, if it takes writing zeros and ones on a computer, then so be it. Whatever it takes to realize my fantasies.

In that context, the first QBasic or C++ dates were a bummer. Nope. There are no ready-to-go "draw cool game figure" or "play shotgun sound effect" instructions. Browsing through the books I lend from the library, it seemed the highest possible accomplishment was a DOS console application that queried the user whether he was an asshole or not, using ScanF commands. Thanks, but no. As a teenager, I have more important things to do than studying books for just that. Like... drinking beer. Or playing games instead of trying to make them.

Dad received QBasic and a big bunch of programs + other course material... on cassette tape! No idea how the hell he did it (I must have been 11 or so) but somehow he managed to stream the tapes onto our 286 computer.

Going to college
But there she was. In 1998 we went to "Hogeschool Brabant" (now Avans in Breda I believe), just to have a look and get an idea of possible follow-up studies. Fortunately, for my age I was still kind of confident about the (game)"programming" thing, so I took a look at the computer studies section that day (though architecture also seemed fun and almost pulled me out).

She smiled at me, behind the glass computer screen. With the help of a step-by-step paper, we were to make a slide-puzzle program. From what I remembered then, QBasic looked like a blue pig. C++ looked as if she was always on her period; sulky, full of warning messages. But here was Delphi -3, I think, forgot to ask her number. She looked like an angel. Or no, like that Greek mythological bitch... oh yeah, Delphi or something. What made her so pretty, was the lack of a smack-in-your-face code editor, and a kiss-on-your-cheek IDE. A what? Integrated-Development-Environment silly. Instead of reading a fucking book in order to make a "how old are you? Press any number" DOS console program with dozens of lines, I just dragged & dropped buttons on a canvas. I never forgot the term "Property Inspector" since then, as it would allow me to edit colours, sizes, positions, captions, and all kinds of cool things. Without coding a single letter! Exactly what a not-so-Beta guy like me wants.

In the meanwhile, other kids from my class were complaining about how boring it was to follow shit step by step from a paper. But I was in trance. This program would be my portal to making games. Just drag & drop a sprite on the form-canvas! Of course, after some steps we had to double-click a button, and suddenly I was inside her. In her code-editor I mean. But, still being high in the air, I made my decision: I would marry that girl.

Just say yes And so it happened. My father bought her for three goats, and not much later she got pregnant from "project1.exe", a revolutionary image viewer program. About 60 other kids got born. Or well, most were prematurely aborted really. But to name a few of our bastards:
- "Shooting Galleria" - Shooting (clicking) animated TImage guys with gun sounds & blood effects!
- "Tank" - Moving a Tank image in 4 directions, blasting stuff
- "Boutman" - A bomberman based game. With poop and farts instead of bombs. Of course. "Poppe & Peppie racer" - A top view racing game with lots of crashes. And you could fire missiles and explode monkeys on the jungle race-track!
- "Boutman 3D" - Yes, in 3D. Including enemy AI such chasing toilets that bite, and turd-mine-layer-robots
- "Vietnam" - A ambitious RTS game. That was never finished.

It's a shame we never took pictures of our children. And erased hard-drives. Yes, we had rough times, but we loved each other no matter what. Going to that same "Hogeschool Brabant" later on, I was tempted by others. A bit of C/C++ again at collegue. And Java, what a ho. The entire school had her. But I wasn't too charmed by her slutty "console.output.write( string.stringFactory.makerClass('Screw you world.') )" way of saying things. Oh, and there was Clean. A "Functional programming language" like Haskell. What a nerd. Functional my ass, I couldn't even write the "How old are you?" console application with it. No, despite the temptations, Delphi and I trusted each other.

The truly old (2D game) shots are gone mostly, but I did found this. Back then you could get pretty good results with Milkshape models and lack of photo-realistic shaders.

What made her so special, besides her awesome IDE front, was her easy going slang (Turbo Pascal). Not that cryptic and far more forgiving than C/C++. And unlike Java or the likes that come with dozens of rules, methods, and restrictions, Delphi gave me some much needed freedom. Do as you like, she would say to me. I could use pointers if I pleased, and we didn’t rely on virtual-machines or runtime packages. The best of both worlds; flexible and advanced as C++, yet easy and flirty as Java.

Midlife crisis
Later on we started making a living together. Besides making half-finished game babies for fun, we now would make money by developing business software. Database programs, weighing applications, document generators, you name it. My heart was still with games, but face it; chances are small you’ll make a living out of it. Having my responsibilities as an adult man now, I had to earn a buck to support our family. Fortunately, Delphi always stood on my side. Alpha or not, I got pretty good at programming, knowing her thoroughly.

Our most ambitious venture so far must have been a 3D game engine, which resulted in Tower22. Together with a few business program, our real children. Some of them already flew out and left home. Tower22 is a raging ADHD teenager that requires lots of attention though. And frankly, I’m a bit tired of it.

Not of Tower22, don’t get me wrong. But of Delphi 7’s attitude. Often tired, not keeping up, wearing old fashioned grandma clothes. Maybe it’s not fair, but I feel she is just not cooperating anymore. We lost that spark. And I would be lying if I’d say I didn’t flirt with others at the office. Visual Basic .NET for example thought me Kama Sutra with better debugging options, and always up-to-date support for 21th century technology. And Qt convinced me that C++ didn’t have to be dull and impossible.

So I swallowed some pride and sentiments, and started dating a smoking hot new chick; her younger sister! Delphi XE 3. Delphi7 doesn’t know yet, she still washes my socks and cooks supper. But honestly… I already packed some of Tower22’s Teddy bears and Pajama’s, as we secretly move over at Delphi XE’s house during the weekends. “Business trip for work”, I would say to D7. But who am I kidding?

A D7 shot of the T22 Map editor. And with "Classic Style" code editor coloring of course. Didn't completely forget about QBasic! My friends would *always* see this blue screen whenever they entered my room.

A better future?
Finding a better home for our son Tower22 isn’t easy. Obviously he will miss the warmth and security Delphi7 gave all these years. I thought about moving over to C++, but that would be too much of a shell-shock. Having to re-program the whole kid… no. Let’s give the Delphi family another chance.

So I copied the entire Tower22 folder and made new XE project. You can clearly see this little girl caught up with the present. Kids these days… Just take a look at the IDE for example. I’m entering a Space Shuttle cabin with all those new panels and buttons (but less space for the heart; the code editor). Plasma Thrusters engaged Spock. Another exciting feature for me –working a lot with vector math- are record functions and operator overloading.

Yet it’s funny I’m still seeing quirks and characteristics of her older sister. Or well, funny… more like encountering some of the old shortcomings again. Having to include each and every unit again and again (instead of automatically including child-units of a top-level unit like C does). Namespaces were introduced, but now “import all” like Java can do with “import OpenGL.*”? Or how about the somewhat wacky not very helpful auto-code-completion? Qt does a better job. Oh well. It must be in the family DNA. Or maybe I’m just not experienced enough yet.

Unicode tears
Our first big argue was/is about UniCode strings though. Of course, before just dumping my beloved Delphi7, I did some research on the internet. Googling Delphi XE, hacking her Facebook, watching her on Tinder… For the sake of Tower22’s health, I was concerned about how much effort a code migration would be. “No problem!” “Just do it!” was the bottom line. Ok, ok, if you say so…

And, how did it go? Any problems? Let me try to describe… It felt as if eating logs and going to the bathroom. As if fighting with a swarm of penguins barehanded. As if an elephant baby crawled back into me, had to give it rebirth, and it came back without a nose. And three ears.

No, it didn’t go without a struggle, Delphi XE crying, and me yelling at her. And shoot, we’re still not finished! She keeps saying AnsiString is so 2000 and one, I keep saying everything was better with AnsiStrings back then. I’ll admit, hanging around with Delphi7 for so long may have affected my judgement. Don’t forget, I’m an old pervert dating this young cheetah. I know computers have more memory, and AnsiStrings - having 1 byte per character only – have a limited set of characters. But… do I really need Chinese characters for twice the price?

She would defend by saying Delphi still does support ansiStrings, if I really want to. “Just typecast them old nagger”. Just typecast… just typecast, clearly you have no idea what you’re talking about, woman! You never grew up with limited memory, old DLL’s and binary files, spoiled brat!

Baby? Ah no, I’m sorry. I didn’t mean to - please baby, now don’t cry. You’re not ugly. But please, you have to understand that:
• Tower22 uses many different binary files
• Tower22 uses many (self-coded and not self-coded) DLL’s
• Tower22 used –and forgive me if that was a mistake- “String[somelength]” types.
• There is no proper equivalent! “AnsiString[32]” won’t work.
• You can typecast all you want internally, but ping-ponging UniCode strings towards a DLL that expects AnsiStrings or arrays of Ansi chars just doesn’t work! (and vice-versa).
• Struct or type sizes when involving the Delphi standard “strings” will give a different size than it did in Delphi7
• This will give invalid reads or writes when dealing with binary files.
• The compiler does not throw an error when forgetting to (properly) typecast from one to another.
• The whole game + tools and DLL’s is about 400.000 lines of code. Good luck finding the issues.

I ended up with making -as if we were making an old C program without any string library- a bunch of string conversion functions and tried to locate where they would be needed through the entire code. Not saying that I’m inclined to keep using ansiStrings, but the first goal of migration is to make things working again. First a solid basis, then we can chat about replacing old types and methods for newer ones.

All in all, I feel bad for 7, but in the age of 64-bits, more and more non-Windows platforms, and moreover the guarantee of not falling too far behind, I think we made a healthy choice. It sucks that Tower22 crashed during loading now, but give me a few days and it will work again. I hope. On the bright side, it forces me to have a clean-sweep. One plus about having to scan the whole code for those stupid Ansi/UniCode clashes, are the visits to older parts. It’s like cleaning the house; you’ll find all kinds of crazy things, long-lost items and other fond memories.

One major advantage of Delphi XE is the Project Group feature. Modern programming environments usually support multiple projects, so you can swiftly jump between projects, and debug all your way through. Delphi 7 didn’t allow to open multiple projects (though you could jump into a linked DLL while stepping), but XE fortunately does. It may not sound like a very big deal, but to me it actually is. Doing this upgrade isn’t only about just updating for the sake of updating. Not only do I want to clean out old garbage code. I want the re-structure the engine in more logical parts / modules.

And yes, that involves a lot of rewriting, but once I’m on the motherf*cker, I’ll go warp-speed. You see, typing code isn’t the major time consumer. Googling how-to-code, reading papers about graphics, trial & error, and fixing mistakes (in shitty code) is what really sucks up time like a black hole. Remember that many of the T22 code was written while learning. Never did shaders. Never did FMOD or Newton physics. Never really thought about flexible entity systems, or multi-threading. For a “first version”, it’s actually quite amazing that it works pretty well. But if I had to re-do it, I would definitely do it a whole lot better. Smarter. And that’s what I’m about to do.

First of all, I will do it slowly, step by step. At all times, the game must remain “working”. For example, one of the first (and simplest) moves is to separate the whole common types and math portion. I made a separate module that holds all the Vector, Matrix, String and other types, plus all of their functions. Dot products, Matrix multiplications, string help functions, and so on. Once up and running, I’ll remove the old functions and types from the “old code”. The same will happen for drawing (OpenGL) functions, Cg, and so on.

I’m not 100% confident of how to modularize though, but maybe some Delphi readers here can give directions. Initially I thought about making a DLL for each module. Thus for example, a “Utiltities” module for all the basic types and common (math) functions mentioned above. The nice thing about DLL’s is that you can reuse them, in another environment. For example, you could attach them to your Visual Basic or C++ program. But three major disadvantages are:
• Slight overhead for calling another module (note that math or draw calls happen a lot!)
• Not sure if I can export OOP (classes, records with functions, et cetera). AFAIK, DLL’s can only export functions, simple types, or Interfaces. Could be wrong though.
• Harder to debug when dealing with shared memory / released pointers, et cetera

A more logical move would be static libraries. You include a library, and it gets baked into your project as if it was just a part of one and the same project. Now here is where my knowledge gets flaky. I believe C has *.A or *.LIB libraries for that. But what is the Delphi equivalent? I guess it is “BPL Packages”, which can either be “design time” (static), or linked at runtime, like DLL’s.

Currently I experimented by making this “Utilities” library as a separate package project. Then the other host project (“the game”) would simply include its units. It works, but I feel somehow that I’m doing it as it should be. For one thing, can’t I just install that package instead of having to add a search path to all of its units?

Well, details. The most important part is that the code will get a reboot – hopefully without bringing the game “offline” too often- resulting in better, cleaned, more compact, and more logical code. And also, having more & smaller modules, a better ability to let other Delphi people help me on certain modules. Would Delphi XE be a better choice than staying with Delphi 7, or moving over to C++? Impossible to tell, and maybe it doesn’t really matter anyway. What matters is a working product in the end. But so is keeping up with the technology, instead of sticking in your old dusty comfort zone.

Saturday, January 17, 2015

The T22 interior - Back in the USSR!

Tell them Jagger. Having been in an eerie, large, hotel flat-building in Prague, and many more times in Poland where my parents in law live, I developed a fascination for the "Soviet way of living". Not that I would love to swap my comfy home for a grim apartment block situated right next to a smoking factory chimney. No sir! I'm just baffled how people would live there. I’m not really talking about Poland or Prague –which made quite some progress the past twenty years- but about the really remote Russian factory-villages, Soviet repression before the curtain fell, and the spooky remains of that era after the curtain fell.

There is no place like home
When thinking about bad places, some Russian or Eastern Europe flat might not be the first thing that pops up in your mind. Shoot, at least they still had a home! And work, and a kitchen, maybe a car, and Vodka. No, thinking about the poorest places on Earth brings my mind into a south American favela. Or an African village literally made out of junk. Middle east huts drained with bullet holes. Or people who just don't have a home at all.

I can't compare and judge what is worse. But no matter how poor these people are, yet it's somehow different. Not scary in a "horror story" kind of way. Images of sick people (think about HIV or Ebola cases) laying on the streets to die are disturbing. Disturbing because apparently, we as a human race still aren't capable of preventing this to happen. Not even capable to let a human-being spend his last days in dignity. But apart from that, I also associate these places with more happy thoughts. Forgive me if this sounds very ignorant, but when seeing a Favela, I also think about kids playing football, or carnival. A chaotic Indian market on the middle of a railroad track, where babies get dumped between the garbage, also makes me think about spicy foods and a sort of humoristic social interaction. An African slum with sunny weather, beautiful wildlife, and music. A homeless man with freedom.

When I look at images of Pyongyang (North Korea) or Russian communal homes, I get very different feelings. Not necessarily about poverty, war, pain, or hunger. But about extreme depression. The whole picture offers little place for joy. From eating potatoes to general boredom. From being snowed in most of the year, to working in a filthy, stinking factory. From the lack of individual development, to being watched by secret services such as the KGB or Stasi, being afraid to think "wrong". Inhabitants of most communist countries were/are nothing but work-tools for mother-state. And as a "reward", the cherry on the bland communist pie, you could live in a cumbersome claustrophobic apartment.

After a day of hard labour, welcome home!

Pursuit of happiness
We Western people have the luxury of making Life Purposes, and actually getting a chance to realize them. Although most people won't accomplish the villa with a swimming pool, six or let alone one beautiful wife, personal jet, and a job as a game studio CEO - music DJ footballer. But at least we can still look forward to the smaller joys our consumer-society has to offer. Save money for a new-second-hand car, booking our next vacation, decorating the house with a new furniture set, making a living out of your passion. Whether its materials or non-materials, there is always something to look forward to. Something to aspire.

The same can be said more or less for somewhat poorer countries. Replace "new-second-hand car" with "third-hand-used-donkey". Fancy restaurant with "coffee-bar", or aspiring to become a CEO with just finding a job that isn't too hazardous. Being satisfied is a very relative concept, and truly isn't all about the price-tags on your belongings. It's more about the feasibility of it all.

Well, besides getting drunk, there really wasn't much to aspire in the Soviet era. Of course, it would depend a little bit on the location. Playing chess with cigars and rum in communistic Cuba doesn't sound that bad. Then again having to bow for the Great Kim Jung Un 3D every day -a society living on fear-, sounds like a nightmare. If unhealthy factory work, alcohol or the ever present police state won't end your life in an early stage, what has life to offer you? A dream-job? Forget it. The state decides where you are needed. Vacation to an exotic country? Not allowed. Some money to buy nice stuff? No. Not in the first place due the lack of money, but also because there simply is nothing fancy to buy. Joining a Tennis/Yoga/Art/Swimming club to kill time. Unlikely. IF there is anything at all in your remote village, it has to fit in the ideal picture. Think about joining the Stalin-jugend, becoming a hormone injected sports-woman for the Olympic team, or getting drilled to play chess 10 hours a day so the state can show its superior talents. Remember, your function as a tool for the state matters, not your individual needs. Why complain anyway? The state offers you a house, work, and food. Ungrateful dog…

Glory days.

Behind the facades
Before telling more funny “facts", please note I'm not an expert, and my Slavic girl only grew up behind the Iron Curtain for a short period (born in '83, curtain fell in '89) in a not-so-bad out-of-the-city village. Sure they didn't have a Super Nintendo and pizza's back then, but neither did she experience the true horrors of being locked and silenced in a monstrous concrete apartment block, blackened by filthy fumes, decorated with graffiti and horrific paint colours to ”cheer up”. But those buildings are still out there, and the whole Soviet Shellshock is still noticeable. Even in her character.

Whether you were a carpenter or a Rocket scientist. in the end you would come home in the same type of house, with the same type of interior (how stimulating to work harder - not), watching the same TV shows, and eating the same tasteless food in the same dress. Although certainly not everybody lived in a flat, the "Stalinki" (flat block) became "popular" between the thirties and fifties of the previous century.

It's not completely true when saying that everyone in Soviet-county had the very same housing; The Stalinki blocks were meant for the elite -political leaders, high ranked military, secret agents, top scientists, intelligentsia- and came in two versions. "Nomenklatura" for the highest levels, and "Direktorskiye" for the workers within that elite. Main differences with lower-class buildings were, obviously, the square meters per room, more facilities (study rooms, nurseries, dining) and your own toilet to shit on. Also, housing the elite and usually being lined up in city centres, these large structures had to represent superior Soviet strength with stately facades, high ceilings, tall windows, ornaments and decorations.

Don't be fooled though. Elite or not, the building quality and material choices were poor. Certainly the lower worker-class buildings, which were only meant to last 25 years or so. Needless to say, many of them are still "standing"... Notorious are the simpler communal buildings, where about 4 families (say 4x4 = 16 people) had to share the same apartment. You would get your own room, but facilities such as a kitchen or bathroom would be shared. Most Western people can't stand their own mother-in-law, let alone your (drunk) roommates making a mess of the kitchen.

Despite its simplistic looks, poor quality and cramped rooms, a better option were the "Khrushchyovka" buildings, introduced in the late fifties. Stalin's successor Khrushchev ordered to focus more and more on the mass production of apartment blocks. These worker-class buildings didn't even try to use impressive facades to mask its inner ugly. Like stinky mushrooms, not taking the surrounding architecture into account, these apartment blocks sprouted about everywhere. The reason was mainly functional. Most (ex-)Soviet countries are huge, but don't have a dense population. Wherever there was work (read mining, gas, oil, minerals or other industrial benefits to be found), places to live had to be offered, as pending through the stretched (and often extremely cold/snowy) forests or countryside was obviously not an option. These pre-fab buildings were cheap, provided space for many people, and survived the harsh winters thanks to their thick walls. Good enough not to die, but the words "style" and "comfort" were obviously scrapped. But at least you would have your *own* apartment.
Youtube: Khrushchyovka!

Later on improvements came along with the "Brezhnevki" buildings. These high-rise buildings had better construction quality, but possibly made the city skyline even more depressing due their massive size. Doubling the size of a turd doesn't take away the bad smell. The opposite happened in suburbs where one after another concrete monster was lined up, creating that characteristic, depressing “Soviet” look. Hence the number "22" in Tower22. En masse.

Even a nuclear disaster couldn't clean up the skyline-litter.

Home sweet home
Pictures of such living spaces often give a messy, chaotic impression. Not a big surprise. Whether sharing your apartment or not, space was limited in any case. Combined with the lack of financial tools, rooms became super-multi-functional. For example, a bed takes about 2 square meters or even more. Having a sofa that could be unfolded to a bed would give back these lost square meters during daytime. The same room could also contain a kitchen block, so when using in combination with a table, the same sofa could also be used for dining. Livingroom, diningroom, bedroom all in one. And a laundry, and workplace, and storage, and ...

No room to waste space, so people got quite inventive with the simple tools they had. Sofa’s became beds, pieces of rope clothlines, and the central stove would also heat the house, dry socks, burn thrash, and make soup all at once. A cupboard made in the cooler outer-walls could function as a “fridge”. All of this stimulated hoarding behaviour. Since every object could have an useful purpose –if not now, then maybe later-, it became a habit to waste nothing… thus keeping everything in those tiny apartments. No surprise that furniture like a “Yugosla¬vian wall-unit” (closet) were almost necessities of life.

Entering the furniture shop wouldn’t give you a broad collection, varying from IKEA √člmo seats to Corbusier tables. No, same boring assortment all over the place again. We spoiled Westerns buy a new cat if the neighbours have the same breed, but here chances were big you would be looking at the same TV, sitting in the same seat when visiting your friends. Naturally, the urge of having your own place and identity couldn’t get killed by the concept of an unified social super-state. People would find different ways to personalize their 18 square meter living-boxes. Anything divergent, colourful or “funny” would get a place. Pink cups, porcelain figurines (kitsch!), plastic flowers, stickers, puppets, rugs, cans with decorations – just anything so you could say “We may dine on the same kitchen table, but you don’t have this awesome bamboo curtain!”.

Tower Brezhnev 22
Our game doesn’t take place in Russia- or any other place in the world. So we aren’t strictly using Soviet architecture, furniture or equipment. Yet I’ll often google around to find my inspiration here. Making another apartment environment at the moment, it’s not just a matter of making a few box-shaped rooms with randomly cut holes for doors and windows, decorated with another random wallpaper. Sizes of the rooms, height of the ceiling, thickness of walls, lay-out of equipment; it’s all considered carefully. The most difficult part is getting that cheap, messy, sober look – yet at the same time decorated with plastered ornaments and impressive sized structures. Half-life 2 did this well by the way, “City 17” being based on cities such Sofia (maybe not a surprise, as Valve’s art director Viktor Antonov was born there).

What I usually do is gathering a collection of photo’s, and open a third eye for messy kitchens, improvised shelves, and the combinations of wallpapers, fishgrate pattern floors, and bare concrete. But moderation is also needed. Dumping a container of garbage in a single room won’t do the trick, and if you play all your trick-cards in a single apartment, all others (and T22 will have a lot) won’t be interesting anymore. It’s about subtlety. Fortunately, the Soviet era left plenty of “monsters” for my inspiration!

You don't need mushrooms to get dizzy and trip down here.

Soviet architecture
English Russia

Wednesday, December 31, 2014

In the year 2015 - Fuel22

Happy days! I hope so at least. More than once people find a good reason in this December period to get depressed, feel lonely, get sick of Home Alone movies. Or to accuse the family of being spoiled brats not rewarding mom's cooking, house-decorating, and keeping up Christmas-Spirit efforts.

In our case, besides a not-so-merry-Christmas crying baby, I lost my daughter in a Wii-U + Mario World 3D Santa bought (for himself). So it could be worse. She never really played video games, until now... Got to kick her outside to play with other friends in time.

As for the year 2014 in general, we certainly can't complain either. Mainly because of a stark contrast between joy and sadness, that became so visible this year. We celebrated the birth of a new baby, and although it took many, many over-hours at work, we were in the luxurious position of restyling the garden and ground floor with a new kitchen, wooden floor, bar, and an awesome olive tree (that hopefully survived the last snowfall). But at the same time, people lost their jobs and cancelled their dreams. Nearly 300 people got killed in the MH17 crash, either because of a dumb mistake or dirty power-games. An old friend had to bury his 25 year old girlfriend because of that monstrous disease, and groups like IS show deeds that are beyond demonic on a daily basis. I lost an old little friend as well; mom and dad’s dog died in all of a sudden very recently. Small griefs, big horrors, I've been lucky to only see and hear about them on a safe distance. But when will we draw the "right" number in this misery lottery?

It's a cliché, but a good health and some love from those cherished by you, is worth more than anything. Things can change in an eye blink, 2014 showed that once again. So, sincerely, I'll wish you a meant, productive, but especially a healthy and prosperous 2015 as well.

Tower22 - 2014
What did 2014 do for Tower22? Honestly, not that much. But you probably already tasted that in these blog messages. Being occupied with more work than usual, tinkering the house and crying babies, I didn't spend as much time on T22 as I really wanted. And there was little input in 2D/3D terms, so the official T22 demo still isn't finished. There is progress, it will be finished, don't worry. But the progress is way too slow. Improvement plans were made, but time flies, and yet another year passed. There is a difference between making plans, and actually realizing them. If we want to continue this project, more drastic steps have to be taken. And well, here is the good news, we are busy implementing such steps.

It turns out that I can't rely much on voluntary help and hopes that T22 gets "discovered". It might feel unfair, frustrating, and I could blame all kinds of things. But maybe it's a better idea to take some action (and risks). Safely phishing in this blog pool, waiting for fans and voluntary artists to help out, won't bring this project where it deserves to be. So this is what we'll do in 2015:
* Finish the bonus demo movie
* Finish the official demo movie
* Use demo's for another recruitment round
* Start up "Fuel22"
* Announce a (free downloadable) playable demo

As for the demo movies, it’s “just” a matter of finishing some animations and sounds mainly. And the bonus demo is finished more or less already, see this post. Don't expect too much of it though. It's not game footage or next-gen graphics. Think about a little plaything I did myself in the meanwhile. Just for fun, and to fill the long gaps of waiting. More serious is the official demo, which will likely take some more months due the slow input of required assets. But when it is finally finished, it will be used to attract some much needed help. On all fronts. 2D, 3D, level design, animations, maybe even some programming. The harsh truth is, no artists (with time & skills) = no game.

You may have heard “good New Years resolutions” before though... What makes me think things will change this time? First of all, I should learn to get a bit more bold, and shove that damn demo up the bottom of some bigger game-websites. The more people seeing it, the more chance on help, as well as excitement for those who help on T22. I will especially target the Dutch market this time. Skype is nice, but being able to actually meet and work together in the same room is much more effective. There are beers and my girlfriend is a good cook, so...

But much more important, is finding a way to keep those artists motivated, interested and productive. Pretty much anyone who joined Tower22 first promised to be working a thousand hours per week on the game, but then quickly dropped the pace to dribs and drabs. I'm lucky if I can get a couple of textures or objects done in a month. But most months won't bring anything at all. You can't plan a game like that. Even finishing a small demo is a nightmare.

It is annoying, but I can't really blame them though. Would you spend many hours each week on a project, somewhere far away managed by a person you'll never see? A project without super awesome tools like UDK? A project that can't bring any short-term results? A project that gives you nothing except feedback and screenshots of your work? In an ideal world the answer would be YES, but in the real world you'll be occupied with your own work, wife/children, hobbies and troubles. T22 is obviously low on the priority ladder. Besides, the average person is simply lazy as soon as they clock out at work. Playstation 4, Game of Thrones and sleeping are also higher on that priority ladder. Certainly if others do the same. That's just the way it is.

So this is what we're gonna do: make a reward system called Fuel22. A buddy at work is bending his head over the web-coding part now (he'd better be, otherwise I'll fire him ;) ), as I'm an impatient n00b when it comes to building websites. Fuel22 is a mixture between an online planning system such as Asana, and a (3D) web-shop such as Unity. I call it "Fuel", as it is designed to fuel this project. Pretty smart huh?

One valid complaint artists have, is the lack of understanding on what has to be done. There are Excel sheets, Notepad scribbles, and lately an Asana page that shows a whole listing of everything that has to be made. Yet the "old breed" of artists that never grew up with this within the Tower22 project, sort of missed it, and newcomers weren't directly allowed to have a look. Fuel22 is an open catalogue -also for you!- showing all of the assets that have to be made for the currentl pending sub-project (such as a demo). Wallpaper textures, 3D furniture, toilet flushing sounds, player squat animations, concept drawings, and so on.

Although some of the assets will remain hidden for the public, as it would spoil secrets, about 50% will be in the display cabinets. That means you, as a fan, can monitor the progress in detail. This adds some much needed pressure on those who promised to make me a toilet-flush sound or green carpet floor texture. But it also makes the project transparent for those who donate, eventually by a future crowd-funding campaign. Nobody can say again they didn't knew what to do! All (current needed) tasks can be found. It also allows fans to jump in eventually. If there is an old fashioned clock object in the catalogue, and your speciality happens to be crafting 3D clocks, you can offer your services.

A second important aspect of Fuel22, is the reward. Why the hell should I give my precious clock, and get nothing in return? Again, in an ideal world we trade polygons for a nice screenshot and a kiss, in the real world its dollars that makes the table spin. Each asset on Fuel22 gets a price-tag. I'll have to do some research, but in most cases that will be somewhere between 2 and 10 $. Depending on complexity, urge, amount, and rarity. Yeah! or wait... 2 bucks... that doesn't sound like a fair deal...

I wish I could pay more, but since I don't have a Scrooge mcDuck "Money Bin" building, that's all folks. But wait, here is something to compensate! Assets that are open to the public, can also be sold to the public. Either via the Fuel22 website, or (for now) via another website such as Unity as I don't expect thousands of buyers on our website initially. But anyway, if you feel like donating, why not buy a concept-art poster, or that toilet-flush sound so you can use it for your own game? 20% will go to the T22 deposit, the other 80% goes straight to the artist. You happy, artist happy, and I'm happy. Not in the first place with the 20% charge that can be used to fund other assets later on, but as I finally have my desired wooden clock, flower wallpaper, Soviet TV, or toilet flush sound.

Why would you buy your 3D stuff here? Of course, there are other, much bigger web-shops out there. But here are a few advantages:
* Quality check. If I don't want it in my game, it won't be on the web-shop either
* Consistent. With relative few artists and me or a lead artist guiding, all assets have the same, consistent, grim Tower22 nightmarish style.
* Whether you care or not, you are *fueling* Tower22. Merci Beaucoup.

Last but not least, being able to "buy" my stuff, it also makes me able to present some much needed rules. My shiny 3D shoes not finished in time?! Then no reward either, and somebody else shall make it. One of the plagues in amateur hobby team projects like this, are the excuses. Of course, people get busy and sick, and of course hard-drives will crash. But I've heard all the excuses so many times. Statistically, some of the excuses why asset-X is late just aren't true. 4 computers crashed, seventy grandmothers died, six men got pregnant, eleven cases of Leprosy... right. But what can I say? You're lying? What if his grandmother really died of Leprosy after her hard-drive crashed? They are doing me a favour, not the other way around.

Fuel22 will gives me a stick to beat with. But let's focus on the good cases as well. Fuel22 will use a badge system, rewarding those who give proper input. Employee of the month, most reliable chick of the year, superfast worker, that kind of titles. These badges will allow new artists to climb up and assign for more complicated (better paid/more wanted) assets, or get a price bonus. Or just function as moral boosts.

Playable Demo
Again, I don't expect big sales numbers. But at least it damps my costs, and there will be a reward for the artists, plus a chance to sell more units via Fuel22 or another web-shop. This will hopefully also attract other people that make an extra income of making props en masse for such web-shops. In the end all I care about, is getting the assets I'll need.

What assets do we need then? Well, about everything to make a playable demo. We're still finishing some movie clips, but my head is already with the playable demo, writing a PDF that explains the ins, outs and map designs. Having summed up quite a lot of the requirements already, Fuel22 will show us about:
70 surface textures
40 decals / FX
180 3D props
20 maps

and plenty more sounds, animations, rigs, (concept) drawings and music tracks. A lot of work indeed. Thus a new can of artists with skills and motivation is absolutely needed, and therefore also an oiled –no, fuelled- rewarding & organizing system to keep the machine running. While finishing the current movie clips and making plans for the playable demo, a first version of Fuel22 should be made.

This playable demo is more than just another "random" demo. Well, it is playable and downloadable for one thing. But moreover, it should give a clear, concrete goal to anyone who joins the team. It will be a relative short, but pretty accurate representation of what the game is all about; exploring an seemingly abandon gloomy Soviet-alike skyscraper, taking care of the building, being spooked by the sounds and shadows and what else. It will be the reward for those who dare to invest via an eventual future Kickstarter campaign. It will ultimately be the Green or Red light for this project's future. Details will follow.

Sunday, November 30, 2014

Eat, Sleep, Cry, Repeat

Welcome back again, apologies for the little break. Got some good and bad news. The good news is that we bought ourselves a new baby. The bad news is that we don't sleep anymore.

No but seriously, say hello to Jan, who was born two weeks ago. Mom is doing all right, his proud big sister finally has a super realistic baby doll, and as I said, I'm just tired. Or well, I shouldn't exaggerate. Never needed that much zzz-hours anyway. But still... babies can cry until your ears bleed, or let your brain explode like that Akira kid. Fortunately for us, Jan happens to be a crying expert. We tried cuddles, breasts, magic drops, manboobs, meat, whiskey, cigarettes. But it seems he just wants to get cradled by mama all day. Eat, sleep, cry, repeat. That's how babies roll. But before you know, they walk and talk again. Hence, before you know they come home with girlfriends, come home drugged, and eventually don't want to come home anymore because parents are lame.

There are much worse things than crying babies. At the same time we were blessed with a healthy boy, an old pal of me lost his girlfriend of leukaemia. It's unbelievably unfair that such a young person, who gave everything to overcome that horrible disease, still had to give up and leave this world. We're not talking about Amy Winehouse here, but a healthy 25 year old girl. Rest in peace girl.

So yeah, I'm the last person who should complain. 10 toes, 10 fingers, the good looks of his dad of course, and hey, it's a boy! That means legally buying ourselves the Lego Millennium Falcon, watch soccer, do technical son & dad stuff, and hopefully get drunk together in a far future. Not that I don't like my little girl -we played Final Fight together recently- but you can clearly see a shift in interests. She is not really into Barbie and stuff, but you won't make her happy with stories about Space Shuttles or Dinosaurs either. She just wants to become a pink princess-animalpet studio-kindergarten teacher-miss unicorn when she is grown up.

What’s in a name?
Any reason why we called him Jan then? Hmm, yeah, actually there is. First of all, because I couldn't find anything else. Because I'm ultra-critical when it comes to names. Which is also the reason why there is no Tower22 team-name either by the way. In 50% of the cases somebody or something else already has that name. The other 49% is either too difficult, too stupid, or too tough. I mean, you could call your baby Rambo III or Dollar mcCool, but c’mon, it’s a baby. A crying one for God sake.

Second reason is because Jan is a simple, short, old robust Dutch name. Uhm, oh, and they use it in Poland too. Good for grandpops and grandmoms over there. I imagined myself calling him over after he did something naughty: "Jan! Hierkomme Godverdomme!" (= "Jan! Come here Goddammit!") sounds way better than "Jacob-Floris junior! Hierkomme Godverdomme!". I mean, he's a working class man. Not a fairy-tale figure, not a Christiano Ronaldo, not the eight world-wonder.

Talking about men of flesh and blood, maybe the real reason is my grandpa, who carried the same name. Grandpa passed away two years ago, at the respectable age of 91. Not that he wanted to go. No. No. Grandpa was made of reinforced concrete, and survived pretty much everything. It's a shame that I'm not that much of a social family person, and so I wasted all those chances to know my grandpa better. It wasn't until his end, when stomach cancer caught him, that I found out more about his kinda extraordinary life. Which had been hard and bitter on him.

When I was twelve, I played Donkey Kong on the SNES and went to school. When grandpa was twelve, his mother died and he had to carry bricks on ladders to make a small income, far away from home. When I was a young adult, I played Donkey Kong again on a Gamecube, went on with school and learned the joys and hangovers of alcohol. When grandpa was a young adult, World War II broke out, he was captured by the Germans and forced to work in Dresden. Making tank parts, and shortly after that, cleaning rubble and burned bodies after the Allied bombardments. When I became an adult, I found love, and planned our first house together. When grandpa returned from Dresden, people would spit and turn their backs to this "traitor", he didn't find a home, and wandered the streets. I found a comfortable desk-job I enjoy, grandpa joined a circus and travelled through Europe. My girl and I got a wonderful daughter, and a stable life. Grandpa got 8 kids not long after he met grandma. If not driving the car and staying home lazily, I should be sporting 1 or 2 times a week and drive about 80 km on a bike each week. Grandpa made long days, had to bike ~50 km each day, and had difficulties feeding all 8 mouths. My girl helps me a lot with taking care of our two little apes. Grandma got Polio and wasn't very mobile. The burden was mostly on grandpa’s shoulders.

Yet, although grandpa could be strict (8 noisy kids requires discipline!) and a bit surly sometimes, I never experienced him as an bitter old man. He enjoyed playing board games with his family, made jokes, enjoyed a cigarette and a beer (straight from the bottle, always), loved to go fishing on the open sea till his late ages, and still won a few (small) trophies at the age of 89 playing billiards! He peacefully lived with grandma on a camping site during the spring and summer months. And on birthdays, he could look satisfied over his offspring; eight kids, many more grand-children, and even great grand children including my daughter. Like an old proud lion resting on the top of the hill. It fills me with pride to be his grandson, and although my offspring won't be that big, I'm hoping to stand on that hill one day as well. Respect for the old man!

So what better name could I give my son? Although he is crying quite a lot now, that name should guarantee him to become a real man ;) And hey, if you still have grandparents, why not visit them one day? I’m pretty sure they can tell you a thing or two about “real life”, putting things in perspective.

Tower22 news?
Yes, sort of. First and most important, as announced here, I'll try to upload the "music demo" before 2014 ends. With or without music. Of course I'm hoping the guys who made the particular song will give legal permission, but otherwise we'll release it anyway. Keep in mind this is not really an "official" demo. Just a personal play thing. The real T22 demo probably takes some more time.

Second little newsflash; particle-collision testing has been added. Stuff like raindrops would simply check if the Y coordinate would be lower than a given height level, before splatting/bouncing. But now particles can use the scene depthMap to test if it collided with the floor, a wall, pipes, a moving character, or whatsoever. The screen normalMap can also be included, to bounce back in the right direction, or splat properly. It's nothing revolutionary, but still. Doing the small things properly can be more important than you think.

Engine Rebuild?
Last, I'm thinking about re-doing the entire engine. Say what?! Yes I know, that is asking for problems. But building further on code dating from ~2008 is giving me more and more issues. Things have changed so much through the years. Very different lighting systems, 64 bit processors, OpenGL4/5, Compute Shaders, the GPU doing more and more, and so on. And of course, the skills have been improved drastically as well. If had to redo it now, the whole engine would look very different. Much better.

But likely I would say the same thing in another seven years. Restarting every time won't bring us a finished product either. Nevertheless, besides techniques also my tools are aged. Having played with Qt/C++ a lot last years (for work), I must say I produced much cleaner code on a much quicker pace, comparing with old Delphi 7. We Pascal boys don't like to admit it, but... choosing Delphi isn't always helping. Mainly because the majority of tutorials, books, examples and libraries come along in C++ style, or other popular languages. And Delphi isn't popular. I could close my eyes and stick to Delphi7, OpenGL, OpenCL, FMOD and Newton physics. But times change. Maybe choosing C++ and DirectX for example would increase my chances.

I'm not saying I'll be switching though, as I would like to continue with the current T22 developments simultaneously. Finishing a demo, then create a playable demo, eventually with some Kickstarter help. If I had to completely start from scratch all over again, it will simply take way too much energy. No surprise, that's why real companies have a team of programmers, instead of Han Solo doing it all alone in his free hours. I could ask for your help of course, but yet again the current state of the engine(code) will become a problem. It hasn't been built in a very modular way, making it hard to split up in chunks and delegate.

So, here's an idea. Instead of dumping the whole engine, I'll be replacing parts from the "old core code" with newer modules. Programmed in a newer version of Delphi. I could also pick C++, but I still believe Delphi deserves more attention. Asides, the newer (not the newest) XE3 version I previewed, fixed some of the lacking features. Multiple projects in a workspace, 64-bit compiler, operator overloading, et cetera. Too bad the code auto-competition is still ancient compared with Qt though... But anyway, it's a step forward.

The old code should be taken over by newer modules step by step. And at some point, the old code can be fully replaced. Easier said than done, but it's the only somewhat smooth method I can think of. Once te modules (think about DLL's) are there, it should be easier to involve other programmers, specialized in specific matters such as Sound, Physics, Editing tools, or A.I.. Hence I may even decide to make the code open-source. Obviously there are (far) less experienced Delphi game coders than C++ game coders, but opening the doors for the public may help.

These plans are far from final, but I'm trying to think some steps forward. As much as I would like it, you can't do everything at your own. Not at this scale. Well, this is certainly "to-be-continued".

* Edit
Well f* me. Used Delpi7 for ~12 years, and never knew that it always had an auto-complete function: type a word partially -doesn't matter what- then press "CTRL-Space" to get a list of proposals. Still not as smooth as Qt, but useful nevertheless

Sunday, November 2, 2014

Homebrew Brawling

Fading memoires
In the digital ages, all of our work is stored on hard-drives, clouds and floppy- wait- USB mediums. Too bad for the photographic developer branch, but the days of bringing film rolls -no idea if the photos you took wouldn't suck too much- are over. Or well, too bad... since that every telephone contains decent photographing hardware, people tend to capture more nonsense than ever. New shoes, selfie of weird me + GF's, selfie of me standing in front of some uninteresting building, baby doing funny things (hundred times a day), mass murders in the desert, the size of your doodle, et cetera. It's a good thing though. At least our fond memories don't fade away together with a handful of yellowed photos. When asking my girl for photos of her childhood for example, she really only has a few tiny (poor quality) pictures. In contrast, our little ape has been snapped a billion times; selfie of scary me + crying baby, baby walking, baby laughing, baby falling, baby crying again, size of her doodles, et cetera.

So it happened that friends and I were spitting through the photo-vault, looking for youth pictures of two good friends that recently got married together. Not a surprise, besides a few (analogue) photos of them sitting on donkeys, giving very first kisses to another boy/girl, smiling to the camera in Mickey Mouse shirts, and measuring their doodle sizes, 98% of the other photos were digital ones, starting somewhere in the late nineties when -exactly- the digital camera and mobile phones were invented. Being a teenager by then, donkeys were exchanged for scooters and cars, ice-cream for beer, Mickey Mouse shirts for shirts with puke, and as for the doodles... well nothing changed really. Anyhow, we had a good time sorting out the photos of course. If one of your friends will marry one day, do yourself a favour and make a photobook.

Analogue or digital, photos still get lost though. When I started programming, somewhere in the late nineties -yes, when the digital camera became popular-, I made a wild variety of games. 7% finished, buggy games, I must say. Shooting Galleries, Command & Conquer attempts, top-down view racing games, Bomberman clones, R-Type flying arcade games, side-scrollers. You name it. Comparing to Tower22, the cool things about them was that you could actually make a playable (prototype) game within a reasonable amount of time. Read days/weeks/months, not years. Nevertheless, pretty much all of them died sooner or later. A combination of losing interest, lack of experience, and getting in love with another idea. It's a darn shame, but most of these old games just disappeared. Like tearing, burning or throwing away the photographs of your ex-girlfriend, most of my old source code got "erased" after a hard-disk or computer replacement. There were a few CD-ROM backups (no USB yet), but being in love with another project, I usually figured we wouldn't need that old crap anymore anyway.

This is one of the few games that survived, and still works! Level 1 at least... sort of... It was inspired on Contra (Probotector).

A big mistake. Maybe your current girl/wife disapproves, but wouldn't you like to see back all your ex-girlfriends? On photo I mean, just for having a laugh and bringing back good or bad memories? Honestly I can't tell because I don't have any ex-girlfriends (still together with the first one), although I do have some ex-gameproject loves. They say your first true love is the strongest one, and maybe that is true for games as well. Once I knew a bit how to make (flickerless) animated sprites and some sounds, using Delphi4 and "DelphiX", a DirectX component library, I tried to realize my first *serious* game idea. An idea I had for a longer time, as that particular genre died out with the arrival of 3D consoles such as the N64, Saturn and Playstation. I'm talking about the brawl, aka "Beat 'm up" genre.

Fuck'm up!
If you didn't grew up with the (S)NES or Sega, you may not recognize the term. A "Beat 'm Up" game can be best described as a side-scrolling fighting game. You would walk through a street, bar, ninja Dojo, train, bus, Technodrome, whatever, and beat the shit out of every foe on screen. Except for your buddy of course. Beat 'm up games typically had a 2-player mode, which would double the fun. Unlike Street Fighter or Mortal Kombat, you were usually able to walk up and down as well, and had to defeat a whole army of weaker enemies instead of a single foe. A good excuse to smack everyone in the city was usually to safe your daughter or girl. Business as usual for guys like Arnold Schwarzenegger and Jean claude van Damme, in the eighties / early nineties.

Gems in this genre are games such as Double Dragon, Final Fight and TMNT - Turtles in time. My first experience with them was probably in an Arcade somewhere in a German vacation park, where the Arcade version of Final Fight asked me to throw in some coins. Holy shit, after 2 minutes (when the stupid timer ran out) I got stabbed with knifes, pile-drived punkers, threw telephone cells to slutty women. Final Fight was one aggressive piece of game! If it only had a 2 player mode... My all-time favourite beam 'm up game must be Double Dragon for the SNES. How many times did my little brother and I play this game? I used to borrow that game from a guy every once in so often. Whether my little brother liked it or not, had had to help me finish that game for the 8092th time. We got so good in throwing monks from balconies, using nun-chucks against clowns, and enclosing foes to make a 300 hit combo's that we could finish the game without losing any lives. One of the most addictive SNES games in my opinion.

Just an average afternoon in our alley.

The genre faded away though. I'm not sure why, but I think "3D" killed it. The transition from 2D to 3D didn't quite match with the genre's gameplay. Filling the screen with multiple enemies hogged resources, producing fluent 3D animations was hard, and navigating / hitting somebody in 3D felt unnecessary difficult. Of course, many of the issues have been fixed with improved hardware, development skills, and tricks such as auto-aiming and improved shoulder camera's. See PS2 titles such as The Warriors, Mortal Kombat Shaolin monks or God of War. My guess is that companies at the time just didn't have the experience to produce a proper working beat 'm up game in 3D. And honestly, I think 2D still works better. Mainly the (auto)aiming is an issue. Enabling it makes it too easy to strike, disabling it makes it too hard.

Hey, here is an idea... Why not just do it in 2D again?! You are reading my mind. But 2D was not-done end-nineties. Buying an expensive "powerhouse" like the N64, then play simple 2D prehistoric games again?! Blasphemy! As with ex-girlfriend photo's, Nintendo/Sega/Konami/Capcom/.../ burnt and buried their old loves. It remains a mystery why the genre never really revived though. Nowadays 2D is Retro and cool again, but for some reason you will rarely see such a title. Maybe I'm just got stuck in the past.

I felt the same about it in 1998/1999 though. Making 3D was still out of my reach, so what would be the most fun, addictive, awesome type of game to make with good old 2D graphics? Of course, a Beat 'm up. And I would pick our school & village as a theme. Inspiring environments, ahum, beating up our teachers... Actually we had a teacher for English who looked awfully close to "Mike Haggar", the moustached hero (and mayor) in green corduroys, playing in the Final Fight series. I imagined two of them dropping down in a cage, in the labour classroom, fighting with lead pipes... Oh joy.


Make it clay
I was planning to mention this project earlier on this blog, but -surprise- I couldn't find any screenshots anymore. Indeed, the entire thing got flushed in the digital toilet. A bit odd though, as I snapped hundreds of photographs for this particular project. But guess what, searching old photos from my friends for their marriage, I stumbled over a couple of project snapshots as well!

As said, 3D was out of the option, and drawing everything as 2D sprites was just too much. Not that I didn't try though. Fighting games like these, were typically made of a layered background (street, buildings, far background, sky), a simple HUD (health bar, ugly mug shots of the current foe receiving whoopass), some foreground objects to destroy or collect (steak & pizza for health), and of course the puppets themselves. I started drawing backgrounds with either paint or pastel, and then scanned the images. That on itself didn't look too bad, but it turned out to be extremely difficult to mix it with the other sprites consistently.

The problem with sprites is that you'll have to draw frame by frame. The mister Miyagi crane kick for example would need 5 or 6 frames at least. Unless you're a skilled animator/drawer, it's extremely hard to draw the contours and colours consistently, using paper and pastels or paint. Computer programs like Flash would make life easier with vector graphics, but I never really liked the simplistic cartoon look in (Indy) games or cartoons. The animations themselves were hard enough already, but the result didn't blend with the background either. Weird perspectives, different colouring, no shadows. Just not good. If I wanted to make a game without help of pro animators and pixel artists, I had to come up with a different technique... Eureka! Clay!

The size was a bit (too) small to make a detailed environment, but all we had was some clay I got for Christmas.

I always loved clay, as you can create a puppet or object within no time. Ok, it may not look super realistic, but that is exactly not what we want anyway; the clay look itself, with its fingerprints and clumpy chunks, is charming by itself. And a bit scary too. Think about Nina Simone - My baby just cares for me, The Neverhood, Clayfighter, or Jackie Wilson - Reet petite. So, the plan was to model both backgrounds, objects and characters out of clay. Then make digital photographs, and edit them. Easier said than done, the early digital cameras had a low resolution and bad exposure, resulting in blurry/grainy pictures. But fun we had! I would make a piece of scene in clay, and snapshot it from the front (in side-scroller perspective). Only problem was the lighting, which always looked the same more or less. Didn't have coloured spots or mini-electrics to decorate the scene, plus I would need a bright spotlight to get a somewhat usable photo anyway. Editing the lighting was done in Paint Shop Pro afterwards, though my skills were still premature.

More spectacular were the animated guys. First I would make a clay model, 15 cm tall or so, then impale it with a metal-wire skeleton. This skeleton was used to make the model stand on its legs, and keep it in a certain pose. For each move, I would animate the skeleton and capture the model frame by frame. On a white background, to make it a bit easier to remove the background in Paint Shop using the flood-fill tools. It would still take many hours to brush away all background pixels though. And that wasn't the only problem hehe. There were so many moves -stand, walk, punch1/2/3/4/..., get slapped, get kicked, die, fly away, get locked in a wrestle grip, ... that it was impossible to snap all photo's at one time. And due all the movement, the clay joints would eventually tear apart. Knees cracked, hands and heads fell off, bodies got disfigured after squeezing and shaping it too many times. So it would happen that one animation would look a bit different than the other. Different camera distance, different environment light (day and night affected the attic where the shots were taken).

Nevertheless, the results were quite satisfying. The guys walked as drunk idiots, and some of the fighting moves didn't look powerful at all. But the clay-setting is forgiving. Another issue was still the perspective. In traditional beat 'm ups, the streets/floor is just a rectangular shaped area where you can walk up/down/left/right. But the clay worlds were more rounded, and more arbitrary. They had platforms and differences in depth. Via an editor I divided the photo in small tiles that told the game where you could walk, and how high you were. Also the sprites would scale a bit smaller when walking upwards. Yet, the result was a bit weird sometimes. Sprites getting too small compared to the environment, or not very clear where you could or couldn't walk. When ninja-kicking away a foe, it could fall in a pit (read drop below the screen), or get stuck behind an invisible column.

Oh well, recording punch & ouch sounds and seeing it all happen in your (first) game was magic anyways. After half a year or so, I got pretty far with the game actually. There were about 20 backgrounds, an overworld map (in this game you could decide where to go, rather than just finishing levels), an inventory (it was a puzzle-fighting-horror-beat'm up game, of course), several characters "finished", and computer AI that didn't work too bad. Oh, and best of all, one stage had a blue hill-billy pickup truck driving by randomly with "The Fresh Prince of Bell Air" theme song. The trick was to paralyze your enemies in the path of that truck so they would get hit and launch in the air.

Bye my lover
Of course, it also had its share amount of bugs and shit. Nostalgia tends to get blurry by warm memories, but there were reasons I stopped the project at some point. Or, lost interest so to say. When I started this game, "TMC Rumble" (TMC was the name of our school), I only half understood the principles of OOP programming and generic design. Every bit was hard-coded, so the entire thing quickly grew to a gigantic if (level = level1 and enemy = ninja512)...then...else mess. The game rules felt too random. Sometimes you would break your neck when getting smacked of the stairs, other times only a few damage points were given. Enemies would react somewhat randomly to your actions, making it hard to generate an addictive "learning curve" in this game, where the player can discover and exploit weaknesses of enemies. But moreover, I fell in love with glScene, a Delphi component library to make OpenGL applications. Just like the rest of the gaming industry dropped 2D like an old overdue stepmother, I did the same to my 2D toys. And forgot to make at least a proper back-up.

So, all that remains, are a couple of production-photographs (no in-game shots... probably I didn't even knew the PrtScr button back then). Probably for the best, as that amateur code would get me stuck sooner or later anyway. But at least I should have made a back-up. Thinking about all the complexity of making a game like Tower22, where you would almost forget the innocent fun of realizing your silly fantasies with rather simple tools, doing test-plays, and being proud of your quick progress, I'd definitely would like to do a "remake" one day. With clay of course. I would still need some help though, but at least making a beat 'm up is far easier than a full 3D game, plus there still aren't too many good titles around. So, who knows.

Last but not least, an enemy-sheet a friend, my little brother and I did for the "Contra" look-a-like game shown above. The best part of making games is drawing bullshit together. Programming everything on the other hand... sigh.

Sunday, October 19, 2014

Music Television

When you are little, you're excited to get presents. When a little bit older, you're excited to give presents. Ahh, the smile on those little fat faces, as they are unpacking as quick as they can with their greedy little hands. Priceless. I got a few T22 presents on the shelve here as well, but can’t give them yet. That makes me just as nervous as one who would be waiting impatiently on new material. Thinking about it, I wonder how developers behind real big titles -such as a Halflife 3- would feel. It’s freak’n hard to keep your mouth shut about something you’re proud at.

I’d like to show you something that has to do with monsters & animations, but unfortunately we all will have to wait until the whole next official demo movie is done. Some more animation work has to be done first. The good news is that we have another little movie “ready”, to fill the waiting-gap that has become far too wide since last released movie, back in 2012.

Ok, there should be a Youtube click-link right here then… where is it? Well, I could click the “upload” button right now, but there are a few remaining issues. First of all, the term “finished” doesn’t exists in software-dev land. Anyone here who made programs for a living, knows the “when is it done?” question can’t be answered that easily. Technically it’s done, but…. There is always a “but”. Artists probably have the same issues with their canvases, music pieces, or craftwork. There is always a brush-streak to be added, a tone to be tuned, a corner you don’t quite like, and doubts on how the audience would receive your hard work. The combination of software and art, a game, is probably even worse. I find it very difficult to let things go and put a “done” stamp on it.

Don’t know how others do it, but maybe the only way is to make deadlines. Spend X hours on it at maximum, ensure A, B and C are at least achieved. And also, it always helps to take a step back, do something different, and look back later. Is it satisfying? Then you did a good job, didn’t you? Don’t forget that the audience usually doesn’t notice the small flaws you have been stumbling on. The audience looks at the bigger picture. So what if the electro spark particles look super-realistic? The whole sequence has to feel good, otherwise the verdict will still be a F-. The audience can be fooled, but is also unforgivable.

Since I can't show our animated monster yet, let's compensate with a concept doodle I did last week (got the idea while eating bacon for breakfast in England, burp).

In that context, I feel this demo needs a couple more improvements. To give some more details, it is some sort of music-clip. Hurh? Yes, a music clip. Not directly related to Tower22, nor super-scary bloody shit-bricks horror stuff. But of course, it is rendered in the T22 engine, using T22 assets, with some horror sauce. Making a clip is easier said than done though. Different cup of tea than games, mainly because the “visual motion” has to match up with an “audio beat”. Especially if the music has some pace. So far I think the theme and feel matches quite good, though the visuals lack pace and quirky camera sequences or events to tie the ties. The Tower22 editor wasn’t exactly made for making bouncy MTV clips, flashy space galaxy particle effects or cinematic delights.

Why on earth making a music-clip based demo then? Eh, just because. I heard the song, found it cool, and thought “why not use for a little T22 demo movie?”. The idea of using music was there already before the Tower22 idea really. So, why not? It’s sort of an experiment I made to fill the gap towards the official T22 demo (so don’t expect super new graphics either, it’s a programmer-art thing I did myself mainly).

Don’t worry, it looks pretty cool, and it certainly sounds cool (if you like that type of music, that is)… Which brings me to the next problem. Before I can release this “clip”, I should ask permission first. Now I didn’t hear new material from this -British electronic-dance-garage-punk-hiphop-whatever- duo quite long (in fact, it’s not even a duo anymore), and this particular song isn’t officially released as far as I know. Found it in a dark abandon corner on Youtube. This song might have been just as experimental for them, than this demo is for me really. So, I could just take the risk and dump it anyway. But… I was raised with manners. So let’s just ask.

That thought makes me nervous though. The risk of getting rejected (or just don’t get a reply at all) is pretty real of course. Or maybe more realistic, they follow a standard procedure and let me sign a complicated paper and have to pay them XYZ dollars. Now I can miss a few hundred dollars. Or actually, I can’t (made a new kitchen / floor / interior and baby-room last two months). But something tells me we won’t be talking about a few hundred dollars. I really hope they aren’t greedy, appreciate their work being used on a project where love was put into it, and just like the video…. So I’d better do some more last minute improvements first!!

Whatever the reply will be, this demo will be released, with or without music. The latter would suck of course, but just throwing it away would be a waste as well. And maybe our audio guys can have some fun with it. It’s hard to promise anything with a new baby coming somewhere next month, but I really try upload at least something before the end of this year! After all the waiting, you guys deserve that!