Sunday, September 15, 2013

Status report

Made a little quick change to the Blog. The original dark lay-out was suddenly changed by Blogger into a clean white lay-out. Not that bad really, but certain functions randomly worked or didn't work. Anyhow, the textual content (and moreover the screenies) is what matters here, right? Well, I still can't show you anything new, at least not something nice-and-new. But let's cover the progress and explain what is holding things up.

As explained in another post, the lack of progress is partially due a busy summer. Lots of programming work for new prototype machines at work, besides the usual trouble-fixing when the harvesting season starts, swallowed many night and weekend hours. Remaining hours in the weekend were used to help friends with their "new" houses (read having to rebuild the whole joint), birthdays(+hangovers wasting the Sundays), and later on fixing our own garden. Got a metal chain + ball around my ankle, and had to dig sand the past month. Oh, and even though the new pavement tiles are finally placed, we still have to move a whole Himalaya of sand again, to its final container-destination this time. That's the problem of having a relative small garden boxed in by a bunch of other houses; no space, can't easily reach it, and you'll be moving the same pile of junk hundreds of times.


Yo Rigger
But you probably aren't interested in my summer struggles. To the games then. Actually there has been some interesting progress, but it's secret. I could show you some cool shots, but it would spoil things... But let me lift my burqa just a little bit then; a few monsters have been modeled, a player model is being sculpted, and one of the monsters has reached the "rigging & animation" stage.
And this is where the shoe pinches. I can assist quite well with environments, modeling and textures. Not that I'm very good at it, but I know how it works, and what I want. Animating on the other hand is a foggy terrain for me. Did some Parkinson animations in Milkshape, but I barely knew what the word "Rigging" means. You neither? Well, rigging is preparing a model to be animated. The process of making a skeleton and binding the model to those bones and joints. When you rotate a joint, limbs and parts of your skin will rotate/stretch with it. If you are anatomically correct at least. So, a Rigger first constructs a skeleton, eventually defining joint restrictions and Inverse/Forward Kinematic properties (how a chain of bones affects each other when 1 moves) to help the animator later on. Then he connects each model vertex to one or more bones.


Gunfire/smoke FX. Got to add "soft-particles" to mask the particles intersecting the (gun) geometry though.

Once the rig is done, an Animator can start playing with the bones to create sequences such as walking, breathing, jumping, weight-lifting, abusing wife, whatever. The idea is pretty simple, for each bone you define some key-frames. That means for example that your left knee is placed at position XYZ at 0.5 seconds, then pitched 20 degrees at 0.7 seconds, and so on. The computer will interpolate the movement and rotation between those key-frames as the clock ticks. Making a fluent animation is extremely difficult though. No wonder that the 3D animations in many (cheaper) TV productions or kids series look as if the character shat its pants. T-Rex walking with the legs of a retired Scout Walker, humans expressing either stiff or very overdone, and also the speed and timing is often far from realistic. The pro's make use of Motion Capturing studio's, but we mortals still have to do an old fashioned handjob. Moving the bones by hand on a computer I mean. Besides, some of the T22 monsters don't exactly look like the average human anyway, so how to Motion Capture that sir? I hope stuff like this cool action doll gets affordable one day though.


Well, luckily we have a Rigger(Stephen, and he’s white) and an Animator(Antonio). Yet the process, flow and tools are kinda new so it takes some time to acclimatize. One of the major issues (for me), is providing a good importer. Damn, I wasted quite some hours with that. You can talk crap about Milkshape, but at least their MS3D file format was well documented and very easy to integrate in your game. But leaving that boat, we had to find another file-format. One that provides everything we need, but also being supported on a wide range of platforms. Joe uses Maya for animations, Timmy uses Blender, Muhammad digs Max, and so on --> We need an interchangeable format.

My first bet was on Collada, which has been invented for exactly doing that. But as often with "standards", it ain't so standard after all as packages deliver different exports, have faulty importers, and the Collada format itself is so goddamn bloated you can export elephants with it. It tries to be everything, and so it became (too) difficult to quickly write a wrapper for it. Just loading meshes was fairly easy, but the animation part completely sucked in my opinion. Animations and their whole hierarchy are complicated enough already, and Collada makes it even worse for making a whole forest of data-nodes, where I couldn't figure out all the meanings and relations. Maybe I'm impatient, but I just don't want to spend more than half a day on writing a stupid file loader. I'm not interested in file formats, I'm interested in end results!

The (Autodesk) FBX format then. Seems to be supported by quite a lot 3D packages as well, but I ran into the same problems. At a first glimpse, the textual file format seems pretty easy, and again loading a mesh was childsplay. But the animation part was ruined by utterly weird matrix transformations and other additional math. Why?! I noticed Adobe offers a FBX SDK though. So I tried that one. Just finding my way around their 700(!) MB maze of files, examples and other poohaa was frustrating. 700 Megabytes of "stuff" for a freaking file format? Well the SDK is more than just a file-loader, but the sheer size isn't exactly helping to quickly figure out what you should be doing. I managed to make a FBX file importer, but it's one of those programming tasks you want to get rid of and don't look back. Unfortunately, this is also typically the kind of tool that works for 10 files, and then crashes on the 11th because of some differences you didn't take into account. I hate file-readers. Boring work, and too much research.

Too make a long story short, we're kind of experimenting with the animations, rigs, and putting it all into the engine. And you're not quite done yet when its loaded. GPU skinning is the common path, so you also have to write (compute) shaders to perform all the bone-matrix math, and eventually store the transformed vertices back into a secondary buffer so you can reuse it for multiple rendering passes. Hopefully it all works, but practice will tell. We sure didn't pick the easiest model to animate for a start! You'll hopefully see it soon in a demo movie!



There you go, soft particles.

ParticleEd, the Speaking Horse
Another development from the past weeks, is our new ParticleEd ("Particle-Editor"). Particles have been in the engine for a while, but they always made me nervous. Sometimes you just code things that feel like they can fall apart like a dusty mummy any moment. Fragile porcelain, starving Panda, Soviet quality, bone disease code. Several things were wrong or outdated about the code. Though the particles were already handled on the GPU, I never liked the OpenGL “Transform Feedback” way of storing results back into a buffer. Also the memory management wasn’t 100% robust (which is important for effects like particles that come and go all the time).

But even more important was the lack of a proper editor, and the way how particles(motion) were defined. Virtual Effects such as particles are complicated, because the way how they behave can vary a lot. Just think about the way how water-drops in a fountain would move compared to cigarette smoke or Dragon Ball Z Destructo-Discs. Though particles often just drop down due the laws of gravity, the way how they move, fade in, colorize, grow, shrink, collide or get their initial velocity can differ a lot. Puke particles would fall straight into the toilet. A bird feather on the other hand falls down with a gentle “wave”, eventually affected by a breeze, and certainly doesn’t splatter on impact. Just that you know!

It’s up to a (vfx) artist to define such things. Making particles is not only about drawing some (animated) sprite textures, it’s also about playing with physics, timing, speed, blending, and so on. A lot of parameters that can completely differ per effect… and GPU’s don’t like that. GPU’s shine when they can batch, and do the same stuff en masse. You earn more money letting machinery print 1$ bills non-stop for 10 minutes, instead of having it print 10$ but requiring changing components halfway. You could write a special shader for each possible particle, but it will lead to tons of different shaders, long loading times, more switching, and more sweat to code & maintain them. We’d like to make “universal” shaders that are capable of everything… Or no, actually that isn’t the preferred way either, as that kind of code gets a lot of overhead, doing stuff you don’t actually need. If only one out of 100 particle effects require a tornado-spin motion, it would be a waste to implement code + parameters for this in every shader by default. It’s all about finding a good balance somewhere.

One of the next improvements is lighting the particles somehow again. Right now they are too bright or dark compared to the environment, as they don't catch light at all.

So, the mission briefing:
- Upgrade code
- Make a more flexible system that can deal with any kind of particle, BUT without adding additional overhead
- Make an editor the artist can actually use

An editor the artist can use… hehe. As a one man army doing most of the T22 stuff, including importing many of the assets the artists made, the editors are usually only used by myself. Which isn’t exactly great for the robustness and user-friendliness. I know how they (won’t) work, so the priority on making good tools is low. But of course, on the longer term the artist really has to be able to use such tools himself to get a good understanding of the capabilities, and also getting direct feedback from the tool, instead of a mail from mister with a screenshot filled with red arrows, pointing bugs.

I began with replacing the Transform Feedback shaders with OpenCL Compute Shaders. These shaders will spawn & evaluate all the particles (and eventually sort them on depth later on). So basically they initialize (recycling dead) particles, giving them all kinds of randomized attributes such as a start position, color or velocity. Then each particle moves, grows, colorizes, collides and eventually dies, calculated by the same shader. I chose Compute Shaders here because they are more flexible, and better readable. You can grab a particle-struct from an array, modify it, and store it back in the same buffer. Even cooler, you can look fetch other particles in the same way, and let particles follow, attract or rebound each other. Not often needed, but if you want magnets, smoke trails, or planetary systems…

To prevent overhead, the Compute Shader is a collection of chunks. In the editor, the artist chooses which options he wants to use. Does it use gravity? If so, add a chunk of code that pulls the particle down over time. Most of the options are pretty common though. For the real advanced effects, you can add your own custom chunks. Yes it requires the artist to know a bit OpenCL, but since he can always look in the code, there are plenty of examples. This isn’t the most user-friendly way ever, but at least we got rid of restrictions, and the code-base remained pretty small and powerful. In practice most effects can do without custom code, and for the exceptions I’m happy to give a helping hand.


ParticleEd. The (OpenCL) code gets automatically changed when picking other options. If that doesn't suit your needs, feel free to add code in the empty boxes below.


So, now you know again what we're (supposed to be) doing. Animating badguys and smoking particles. If those tasks are done, expect a new Demo soon!

Wednesday, August 28, 2013

Its automatic Its systematic Its hydromatic!

How is that psychological condition called again, people being office-housefathers one moment, a smoking cowboy sheriff another moment? Cheerleaders thinking they are Elvis Presley sometimes, people behaving like wrestlers during the morning, murderers during lunch, and badgers during night. Split souls... Oh yes, it's called schizophrenia.

I might have a very mild (innocent) version. No, I'm not Abraham Lincoln, neither an airplane. I'm a conservative grandpa with little knowledge of the modern world, trapped in a boys (well, man, almost damn 30 now) body that happens to be pretty good at programming modern things. It's a contradiction because I'm not really good in math. Hence, I wasn't a star in any Beta study. Math, chemistry, science, making gold with leprechauns, whatever. Though the somewhat poor results may have to do with the fact that drinking beer and smoking stuff with friends caught more of my attention those days. Nah, I was more about eerhh... using my fantasy and such. Drawing a bit, writing stories, thinking how games could be even cooler.

Yet programming grabbed me, and somehow I did understand it. Probably not really because I enjoyed the technical aspects so much, but the ability to "create things" felt good. Always been drawing, claying, lego-ing or in some other way creating my own worlds. Often together with a friend, which certainly wasn't a Beta either. No, unlike my little brother or other friends who can write down technical specifications, explain how a Wankel engine works, why farts explode in flames when being heated with a lighter, or calculate the kinetic energy when falling down drunk, my mind is much more fuzzy. Not that I dislike National Geographic documentaries about space or seeing harvesters at work doing muscular things. But I just forget all mechanics, precise numbers and statistics within four seconds. Apes just can't hang on a slimy rock.

Yep, I'll just recycle shots. The current progress is on a new particle-editor & characters/animations that are not meant for your eyes... yet.


Back in my time!
With other technical aspects or interests, I notice I'm "behind" a lot of people as well. New mobile phone? Pfff, just let me look outside the bus window instead of breaking my clumsy fingers on touch-things during the ride. Mac / iStuff? Never tried it, nor interested. Widescreen TV? 99% on TV sucks, and otherwise I fall asleep during the commercial breaks. I can do with a monochrome 8" TV. Playstation 4? Sounds like fun, but the hours I spend on the PS3 is equal to the amount of Polar bears in the Sahara (though GTA V is coming…). Switch the house lights/heaters with your telephone? For God sake why? Facebook? Don't need virtual friends, the few real ones I'll see occasionally in the weekend is good enough for me. Can't imagine what another person would like to know about my personal life anyway, get lost. Apps? I can wipe my ass without an App. LED lights? What's wrong with my petroleum lamp? Twitter? I can't even read those listings of short messages, cropped with cracktags or whatever they are called. Like!? That is the fucking laziest way in the world to show appreciation.

If you expect super hi-tec gadgets on my computer, or Androids walking in the house, you're wrong. Though I enjoy making microchips for making your own thermostat for example. Not because I need it, but because it’s fun to create it. But regarding technical tools, I basically only have what is really needed for work, or for T22. That's it. My Polish girl grew up without internet on sort of an old farm, so she isn’t the brightest star in the techno galaxy either. Too bad or house is too small, but otherwise a cow would be standing in the living room, listening to the pickup-player, with a hot cup of potato soup.



The Haunted office
Of course I exaggerate a bit (really?), but I wonder what drives people to spend so much money on being “online” all day, being “the first”, buying each shiny hi-tec gadget even if it doesn’t add anything. In my opinion, the virtualization, digitalization, and automation just doesn't always make things better. And I'm saying that as a programmer who earns money with automating factories, making vehicles that drive by themselves, and creating user interfaces that require as little knowledge as possible.

Let's take my new office at work as a first example. To begin with, I don't like modern architecture. Not that my office is that boring, but I'm misusing this to point out that I find the sci-fi, sleek style, cool colored, glassy, super-functional houses or buildings boring and cold. Yeah sure it sucks to live in an old house where the toilet doesn't flush and the ceiling falls down, but at least it has some character. I'd rather live in an old castle together with the ghost of Sir Spencer mcSausager, than in one of those new "blocks". It’s nice to be surrounded with noisy machinery, pipes, cooling units and other metal stuff at work. But at home I want small illogical stairs, dark corners, wallpaper, old wood, and cases filled with books that no one reads.


But to the point about that new office. That building is fully automated - and not by me this time , otherwise it would have worked better. Don't go looking for a light switch, because you won't find any. The lights go on automatically when something moves (there are sensors in the ceiling everywhere)... so if you fall asleep the lights will nicely go out after a while, telling co-workers to be quiet. Hmm, pretty smart actually. But wait, there is more. The heaters work automatically. And don't ask me how to change the temperature. Because you can't see any radiators or good old rotary dials. Luckily I’m a guy, but women that are obsessed with turning the knob all day would go nuts. Yes we have some sort of digital remove control, but as pointed out earlier, too difficult / too lazy to learn it.

When the sun shines, blinds will lower automatically. Or the curtains close. This is where the automation gets really annoying. After a long dark winter, I'm happy to see the sun, and hey, we can leave the lights off = good for the environment. But no, the building decides the blinds must go down. And the lights must go on of course, otherwise you won't see shit. Three minutes later a cloud appears, and the blinds will go up again. Five minutes later the sun shines again, but not strong enough to lower the blinds. However, someone parked his shiny car so the sun reflects as a laser in my eyes. Got! to! Close! Curtains! I grab and pull, but the building slaps me on the hands and moves the curtains back in position. Really? I can’t even move the curtains?!

Blast. I'll grab a coffee then. The good old push-button device that turns frozen coffee blocks into liquid has been replaced by a state of the art, coffee "terminal". With a touch-screen. That sometimes badly calibrates itself, so when pressing "stronger" it adds "more sugar" instead. Anyway, we ran out of white plastic cups, so I placed a transparent cup instead. Now that bewitched thing refuses to give me coffee, because its sensor shines through the plastic, and keeps telling me to place a cup first. Do I look like an idiot?! Maybe it works if I put my hand below the sensor and... arh burning hot coffee! No more coffee for today. Driving home sad, with the car warning and beeping all the time because my backpack on the passenger seat is not wearing a seatbelt.



Printf( “Unable to comply. Asshole.” );
Another example. At work, through the years, I learned “try not to outsmart the user (even if they are stupid)”. Fully automatic –“smart”- applications can become a real pain in the groin if they override the user, or refuse tasks for unclear reasons. Didn't learn that in the office behind the computer. No, on paper my ideas would kick ass. Just the idea of having green 3D wireframes driving around, communicating in the field with XBee, informing the driver with Crysis Nanosuit robot voices, machine making coffee for you while plowing the ground, shooting lasers, ...

A sturdy wake-up call comes when meeting people that work with your products. Preferably people that are - like me - old, clumsy, or just too lazy to dive into new technologies. If a system halts for no apparent reason, its considered uncontrollable. If a system refuses while the operator sees no danger, its considered over-sensitive. If a (sub)system contains more than a few adjustable parameters, its considered complex, and a non-technical guy doesn’t even dare to change a number. If a system crashes once –even if it’s a pilot-, its considered unreliable => trash.

In general, software systems aren't very well understood, nor are repairable if something fails. Just look at your own car. Didn't get any easier with all those chips, right? And sometimes, automatic intervention is just plain annoying. Got called by a client. Asking me why his machine suddenly stopped driving. "Are you sitting on the driver’s seat?" "No, eh... why?". "Because a machine shouldn't drive without a driver in the cabin sir.". Well, maybe that isn't such a bad piece of automation, but do you really think it will stop farmers from jumping out of their machinery to inspect things? Then suddenly they are technical enough to rewire things. Or just to put a heavy bag of potatoes on the driver’s seat.

Machines telling people what (not) to do, who the hell do they think they are?! Automation is needed, certainly when it comes to safety related issues. But don't make it any more difficult than really needed. Your awesome programming skills won't be appreciated by people that have to dig through thick manuals when something has to be adjusted. If you can just as well use a sticker and a simple button or valve to control things, you shouldn't directly replace it with software unless it really adds something. Americans have a nice development term for this by the way: KISS - Keep It Simple Stupid!

Ok ok. This might be a more interesting screenshot then. The work-in-progress torso of the T22 protagonist. Work cloth and a beer belly? I'm sorry, no Hentai chicks in this horror game!

Social zombies
Maybe the worst of all digitalization side-effects, is this Virtual Society. When I travel with a train or bus, I can enjoy the view. Just do nothing for a change. No computers, no talks, just sit down and capture bits of the environment. But this certainly doesn’t count for the majority of (younger) people. If the bus would be driving in a volcano, they wouldn’t notice because the focus is 101% on their Smartphones.

Nothing wrong with playing Snake or checking email to kill the time. But the usage is beyond that; people are obsessed. Two friends sitting in that bus, non-stop chatting with friends, but saying nothing to each other… I wouldn’t call that social. A couple sitting in a restaurant, both with their heads down staring at the phone, it’s just sad. Girls screaming on the news that they can’t miss internet for more than a day. C’mon. Cool boys immediately grabbing their newest phone to fact-check whenever we have a question during a discussion. Just drop that thing and enjoy your beer man, I really don’t care in what exact year Darwin took his first crap in Micronesia.

It’s called “Social media”, but people are actually getting anti-social. I may sound like old vinegar, but there is some truth in it. I’m shy as well, but at work I see many (young) people have become afraid to confront another person. People mail instead of calling or asking face-to-face. As you all know, being funny, sharp, or aggressive is much easier on the internet, as we stay safe & anonymous behind a virtual wall. But once they find their selves in a real meeting or confrontation, they don’t know how to behave, are distracted by the phone all the time, or turn out to be less heroic than their forum alter-ego’s would imply.


I think a lot of other grandpa's, or at least grandpa's trapped in boys bodies, agree with me that automation isn't always a step forward. Many people use it just for the sake of using it. As a status symbol or something, while a virtual status still isn't worth much compared to some real-life status. People with 600 virtual friends feeling lonely, what is a "hit" worth really? I would lie when saying I'd never check the blog reader statistics, or how many people have seen the T22 movies on Youtube so far. But in the end, it doesn't make you feel richer, happier or better. In fact it might do the opposite when noticing your reader or "like" counts start dropping, signaling you that your youtube movie or Facebook account is getting old, people losing interest. And on the internet, things age very fast. We all want to be liked, but listen to 'ol Pops for one minute: The love of your girl, family, or some good friends is an infinite more worth than a thousand likes.

Sunday, August 18, 2013

Click and Play

Just wanted to share a hint if you are looking for a click&play adventure. Normally I'm not really into Indie or Casual games. A: because I grew up with large/long/hard games, and B: as the Duke would say, I don't have time to play with myself. Even not if the games are small. Oh and C: because I'm just not familiar with the "scene". Hundred years ago I used to read games magazines or the internet scouting for new hot stuff, but these days I only know about the super-announcements, such as a GTA V.

Anyway, about a year ago, one of the guys at T22 gave me a "HumbleBundle" link (a download of some games) as a gift for my daughter. The two main games on the bundle were "Botanicula", and "Machinarium". Both click&play puzzle games from Amanita Design. Quite a while ago we finished Botanicula, and during the last vacation we finally finished Machinarium as well. Well, we... I did the thinking, and Julia sat on my lap instructing me. The puzzles are way too hard for a little kid, but that is not the point. What really charmed both of us -Julia young & open minded, me old & boring- was it's design. Despite the ultra budgets and teams behind games these days, you don't see them coming like this anymore. It was like watching a classic Disney movie over the shoulder of your kid, weeping a tear, remembering how you once sat their with an open mouth staring at the television.



Those who played Monkey Island or something similar, know that the click&play adventure has died a long time ago. Well, pretty much any game that involves thinking died. Maybe not totally in the Indie game scene, but as said, I have no idea what's on the market there. For those who don't imagine a hint-label when hovering the cursor above the word "Click & Play", this style of adventure game usually gave you control over a character, using the mouse only. You would walk from one to another, usually hand drawn, (static) scene, solving puzzles by clicking the right area's on the screen. Clicking would let you pick up an item, have a look, use an item from your inventory on the environment, or start a conversation with one of the characters on the screen. Often in a cartoonish, humorous context. Though the horror genre produced games like Phantasmagoria, Myst or 7th Guest. But most famous is probably the Lucas Arts line up, including Monkey Island and Grim Fendango. The puzzles in these games varied from extreme hard to extreme ridiculous (use "bubblegum" on "dog" to get the jail door open). And including that with the lack dodging bullets or other fast paced gameplay, maybe that's one of the reasons why the genre died a bit. Nevertheless, I bet quite a lot (older) gamers have fond memories.

Botanicula and Machinarium aren't exactly follow ups on Monkey Island. They play a bit different, and aren't as lengthy (but you don't pay a full wallet for these Indie games either). Nor very humorous. More a bit scary actually, but in a way how some older cartoons could be a bit dark. Botanicula lets you take control of a group of, eh... twigs, nuts, and other kind of tree tiny stuff. Your world (read a tree) is being attacked by giant spider like creatures, so you'll be on your way fixing this situation somehow. I can't really explain the plot because it's well... weird. The game feels, but especially sounds (listen!) like a mushroom trip. You'll be walking around between twigs and leafs, saving your other tiny tree friends. Away from button mashing, concrete buildings, blood, machineguns, sniper rifles, mega jumps, monsters, aliens, humans.

Machinarium focuses more on solving puzzles on devices, but a more obvious difference is, of course, the style. Instead of trippy nature world, you'll be walking in a somewhat depressing robot populated city. The beautiful hand drawn backgrounds and animations will make you love it. And even though the puzzles are a bit hard, your kids will love to watch it too. A very healthy fantasy impulse in days where hyperactive 3D super-nonsense is bombarding our kids on TV.


Of course, both games are a bit short, but they come at fair prices. So if you want to taste something different, or if you look for something you can show to your kids on the widescreen without getting battered by your wife, try this. And no, I'm not paid to promote their game, although I do hope people with such fantasy & drawing skills join Tower22 hehe.



Anything else to report related to the game? Not really, except that I'm working on a new particle editor. T22 already had GPU particles, but I wanted to use a more efficient Compute Shader solution. And more important, a better editor that allows the artists to produce the VFX themselves.

Sunday, July 21, 2013

Picker a number

More than once, I receive questions like "what is the max polycount for this new monster model?", or "what should the texture resolution be?". Not that I'm an art director, but since we lack one, I'll usually take the role to give such advise. And of course, I (should) know the technical specs to answers questions like these.


Artists need reference materials, style guidelines, and also technical boundaries. The ultra-detailed meshes that roll out programs such as ZBrush are usually not useable in a game, because they carry way too many polygons. For the non-technicians; an average (high polygon) ZBrush character can easily contain a few hundred thousand to a few million polygons. An in-game version of the same dude is usually somewhere between thousand to ten thousand polygons. In other words, the detail has to be reduced with a factor 10 to 100.

It's not that a (modern) computer can't render a 100k model, but the games I know usually show a bit more than just one character. Maybe the game has to render a whole army of the same characters, besides drawing the environment, doing some special FX, calculating physics, playing audio and figuring out what is going on in the heads of those characters (AI).

Same thing for textures. When drawing, its common to start on a big canvas. Not only does this allow more detail, it also just works easier. But, a single 4096 x 4096 texture can eat up to 64 MB. Even though hardware increases its memory every generation, you would only be able to pump a few of those into your videocard. Can't make a game that only uses 15 different textures of course.



Luckily we have a "stretch" function in pretty much any painting program, and there are also plenty of tools to reduce a million-poly model to a low(game) poly mesh that still looks close to its original (in combination with a normalMap to compensate the lack of smaller details). Nothing new so far. But, how to answer these "how much polygon?" questions? What are the magical quantities for this concoction?

Well, very hard to say really. First of all, I can't easily look into a GPU chip and see the desired throughput. There is no exact upper limit of polygons that are allowed. In theory, each extra polygon reduces the speed a tiny bit, but in practice the performance is a result of many, many factors. What else is going on? Do you have 1 giga model, or thousands of tiny models? How smart does the engine batch & render things? What are the bottlenecks? What can the hardware do? If you either have super-hardware, or the game doesn't do a whole lot, you can go berserk on the models or textures. If you need a lot of everything on the other hand, you need to balance things carefully.

To make things worse (or actually this is a good thing), the hardware changes all the time. A 2.000 triangle puppet would be heavy shit in the Quake1 days, now the GPU eats it for breakfast. It's like answering how much calories should you eat over the next few years. If we spend our days in the couch watching baseball, we probably don't need that extra pizza slice. If we get a heart attack after too many pizza slices and start playing baseball instead of watching it, the extra calories may eventually be needed to fuel our sports-bodies. A stupid comparison maybe, but the saying “enough is as good as a feast” is true in both cases. Take what you need, but don't overdo it. Or you'll get fat and slow.


Ok... that's some vague useless advice so far, let's see if we can transform it into some more useful guidelines for both artists and programmers. Here ten hints.

Quite some triangles were spend on this badboy. No, we won't show you the whole character, but let's say he might play a little role in a next demo movie...

1>> You can always downscale
First, and maybe most important, don't care about specs to begin with. At least not during the production of your initial model or texture. Downsizing a model or texture afterwards is easy. Upsizing on the other hand leads to quality loss, or is simply impossible.

As an art director, you should worry more about providing structure and space to process all this data. Preferably, the original "master file" should be on a shared location. Use a cloud, Dropbox or something similar to store the files. Everyone (privileged) can make a copy or review it, and if the artist computer crashes (which happens suspiciously often...), you always have a back-up.

Warning though, usually the Master files are insane big, so a free (2-gig) Dropbox account will be full before you know it. As a screwy Dutchman, I didn't pay for an unlimited account either so far, but you'll be needing it sooner or later.


2>> Don't overdo
“Drink with moderation”. As with drinking beer, eating hamburgers, smoking pot, or whatever you do, enjoy but don't take more than needed...(writing this, still recovering from my hang-over…). This is a golden rule for pretty much everything in life, including for making textures and 3D models.

If you are an artist, you want to show awesome stuff, your skills, and surpass yourself each time. That is a good attitude, but know when to stop. First of all, you can either perfect a few pixels/polygons, or make two assets in the same time. Being a perfectionist costs a lot of time, and often you don't have that time when making a game that will consists then-thousands of assets.

Second, you, or your reviewer, will always find small flaws. But will the end-user really notice it? Did you complain about the pixels in the Wolfenstein Nazi's back in 1991? Are the fake reflections in Crysis2 killing the vibe? Did you know that plenty of lights in games don't actually cast shadows? Are the non-perfectly-round shapes in 3D games a pain in the ass? The average gamer doesn't care or notice. Just as long the whole composition of things looks good.

The problem is, when the artist sends a near-finished object, say a chair object, the reviewer will be 100% focused on that single chair. The lack of fart-marks in the seat will make it unrealistic, the pegs aren't nicely rounded, the texture is a bit blurry at the bottom side, its 4 cm taller than a normal chair, and so on. I know this, because I'm a nitpicker as well. But maybe, and this is a lesson to learn for me as well, it's better to first finish a whole room and see how everything works out when being combined together.

If you look at a Rembrandt painting from a distance, you see one whole. A theme, a scene, a mood, a certain color palette. If the theme grabs you and the composition is good, the painting is a success. If you look closer you might notice Rembrandt was too lazy to paint the fucking vase in the background properly, but that doesn't matter. So artist, zoom out, lay back, put your object in an existing scene, and see if it does its job. Eventually downsize the texture, or use less polygons and check again. If you didn't saw a real difference, your asset is still good to go.


>> 3 The illusionist
In addition to 5, sometimes simple tricks can do the job as well. Even though it might feel cheap, dirty, wrong, and old fashioned, simple 2D sprites or decals are still used a lot. An old industrial corridor needs details such as wires, switches, cables, cracks, dirt, broken tiles, oil smear, and so on. Modeling all those things takes more time, costs more performance, and sometimes doesn’t even look better. A flat decal can look more detailed than a low poly object.

When to exactly use decals or sprites then? I usually use them for small stuff, or things you would only watch from a distance, so you can’t really walk around it, breaking the illusion. Faking stuff also goes for a lot of special effects. Realtime G.I., real 3D particle clouds, or volumetric dust sure are cool, but also terribly expensive. Often they can be replaced with a much cheaper variant, and in some cases those even look better as well, as it can be very tricky to implement the realtime counterparts correctly. Pre baked lightMaps versus realtime G.I. is a perfect example.

No matter how advanced your particle engine is, the 2D flame is still unbeatable. Though I have to implement XZ rotation to keep facing the camera, the left flame starts showing its fakeness.


4>> Stress! test!
If you can, just fill a room with heavy models and see what happens. I used to remove triangles with a microscope & tweezers. But in practice, high polycounts aren't the bottleneck usually. At least not in my case. The number of assets, whether those are small or big objects, matters though. Videocards love to batch things, so rather than nitpicking about a few polygons, you'd better ensure the (engine)code to sort, group and batch things as good as possible. Especially when you have to deal with dense stuff, like a jungle. Or garbage mountains.

On lower-end hardware, the polycounts may become a bottleneck much sooner. So yet again, stress-test if possible. Just to see where your limits are (and to test code improvements / changes). It avoids getting stuck with impossible scene concepts, or having false fears for high polycounts on the other hand.


5>> Guess the texture memory usage
If you worry about texture sizes, calculating the memory usage for a single texture is quite easy:
KB = ( pixelsWidth x pixelsHeight x channelCount ) / 1024
MB = KB / 1024
Textures are usually in the RGB8 or RGBA8 format, which means you multiply the width and height with 3 or 4. Thus a 1024 x 1024 x RGBA texture takes 4 megabyte. That doesn't sound like much, assuming a modern card has at least 1 gig video memory. BUT! There are some catches:
* Textures are often mipmapped, increases the size with 33%
* Textures often come as a set (diffuse + normalMap + height + specular + whatever)
This easily doubles or triples the requirements

* Your program loads more than just textures into the video card memory.
Buffers to draw on (FBO's), 3D models (VBO's), shaders, et cetera.

* Windows and other programs want a bit of the honeypot as well.
Let's just say ~15% of the available memory isn't for you
In other words, if you have 1 gig of memory, it doesn't mean you supply your scene with 1 gig of texture data (simultaneously). Last but not least, there is also a thing called "bandwidth". If you render a room that is made of 128 MB data in total - for example some geometry + ~21 1024x1024 RGBA texturesets (diffuse & normalMap) - it means that your videocard has to squish 128 MB of data through its hydraulic hoses each time you render. Difficult to tell what the exact maximum is, as it varies for each card and probably the GPU also caches stuff, but there is a limit somewhere. Just as long you don't hit this ceiling (meaning some other factors are limiting your performance), there is nothing to worry about really. Just don't overdo things to stay away from the critical limits, see 5.


6>> Texture Compression / LODs
Use DDS textures & compression(DXT, ...) to reduce the texture sizes to ~1/4. This allows to load a lot more textures into your memory, and/or to reduce memory requirements/bandwidth. Careful though, compression doesn't always turn out good for every texture. Especially normalMaps can look "crunchy". Check your results.

When rendering very complex models, or just a lot of models in big (outdoor) scenes, you can save bandwidth and triangles as well by switching to lower polygon versions of your models and (background) environments. You can sure render a monster with 20.000 triangles from nearby, but when stepping some meters away you can half the polycount without really noticing it. And forest trees might even do a good job with flat billboard sprites when being rendered from a distance (that’s how Farcry did it for example).


>> 7 Batch & combine
Rendering the same palmtree hundred times might go faster than rendering fifty different palmtrees, even though the polycount could be the same. This is because you’ll have to interrupt the videocard each time, telling to switch tasks. Use grouping, sorting and tricks like instancing to avoid this as much as possible.

As an artist, you can help as well. Make asset sets that can be re-used. Sounds obvious, but sometimes objects are so “showy” that you shouldn’t place too much of them. Another trick is to combine as much as possible in one model, and/or let the subparts share the same texture. Rendering a house as one big object with one texture(set) will go faster than constructing the house of many sub assets. Of course, this might give problems with things like texture quality, different required shaders, or destructibility though. Stay in contact with the technicians or map designers to find out what works best.


8>> Make performance options
T22 has some graphical options that aren't too hard to implement. When using DDS texture files with mipmaps for example, you can easily create a "Texture Quality" setting. When choosing a lower setting, the highest resolution mip-map level(s) aren't loaded, which can save a big amount of memory / bandwidth.

Special effects such as SSAO, shadows, screen-space reflections or realtime GI can be switched on/off, though this is tricky. When tuning the graphics, the lighting matters a lot. When I disable SSAO and use another type of cheaper GI, the scene just looks different. So instead of switching things on/off, I usually give them a quality setting as well. Lower quality usually means that the effect is rendered on smaller buffers, reducing framerate issues.

You could also decrease particle cloud densities, or make IFDEFs in your shader code to skip some parts, or to use less samples for effects such as blurring or raymarching. But as said, don't get lost in too many settings. While developing you should try to render the scene "representative". If it looks completely different on another computer, it gets very difficult for the artists to make a good looking scene.


9>> Bottlenecks & Profilers
If the framerate stinks, then one or more factors have become a bottleneck. If you render very simple scenery but use gigantic textures, bandwidth could be the problem. If you are rendering dozens of layers of transparent particles on top of each other, the fillrate might be killing. Just to name a few examples. Unfortunately, it’s not always so easy to tell why things are slow. In that case you can try using a profiler, that tests shader execution, what is being loaded onto your card, what API (OpenGL / DirectX) calls are done, et cetera. If you are using OpenGL like me, gDEBugger for example might be useful. AMD and nVidia also have tools, though I didn't successfully implement those in combination with OpenGL & good old Delphi.


10>> When will the game release?
Tomorrow? Next year? .... "When it’s done"? Unless your game is small or you have a clear deadline, chances are big that you still have year(s). Ifso, don't panic if the framerate is a bit low on your current computer. In fact, T22 runs like sirup with lard on my 4 year old laptop. But when running it an another modern computer, it goes surprisingly smooth again.

That doesn't mean you can ignore the performance. If the speed suddenly drops seriously after implementing some new effect, make sure you're not doing something wrong. But then again, be careful not to waste many precious hours on increasing the performance with tiny bits. Chances are that the efforts are negligible one year later, and optimization often leads to bug-sensitive, ugly code. Make a solid basis, but spare the tuning for the final stages, when knowing the actual target hardware.

Coming to think of it, I just remember playing leaked Doom3 and Halflife2 versions. And well, they performed terrible even though their maps, shaders & effects weren’t even finished. Just saying.



Well ladies and gentleman, what fun we had again. But it's time to go on a little vacation, so no posts this month anymore. After the vacation the pressure at work will hopefully drop a bit, which also gives more time to work on our next Demo movie. It has been way too long since we showed a new clip or an interesting screenshot, but we're working on it. Ciao!

Thursday, June 27, 2013

Working class zero

What's happening here? Lost your typing-thumb, Rick?

Yes, I know there aren't much updates lately, and that I'm recycling the same room screenshots over and over again (so, no screenshot this time). And if you have followed other "hobby" projects or Mods before, than your doctor instincts may tell that these are the typical symptoms of a slowly dying patient.

Does that mean...? Nah. Nelson Mandela might pass away (peace is with him), but this project isn't dead yet. It's running almost three years now, and I've been programming the engine for at least six years. You don't think I would suddenly stop now, do you? My girl has to ask for two years before I finally fix a plank or paint the shed. And if I say "I'll do that right away honey!", it can be translated into "What were you saying honey?!". I’m lazy. But, when it comes to programming my babies, I’m very determined.


No the reason that you read and see little here lately, is simply due the amount of work. Real work I mean, a job. It's always busy during the summers when the harvesting season starts (one of my jobs is making agricultural machines, for Ploeger), but usually I can find some free hours during the nights or weekends otherwise. Or fantasize a little at the office when it’s not too busy.

This time however, it’s insane. And if I say “insane”, it really is insane. I never complain about doing overwork, but let’s just say the working days don’t stop at six ó clock. Waking up and going to bed with work (and yes, I wake up early and go late to bed). Also in the weekends. Since I’ve been doing that for two months now, my mind is 200% focused on the job. So switching to another complex project such as Tower22 in the few free hours, is simply not doable right now. DJ Bootsy can’t mix Shania Twain with Sepultura either. The few free hours are to drink beer, or demolish a “new” old house a friend just bought. Or to see my daughter. Last time she fabricated full diapers, now she is almost five again, has tattoos, smokes cigarettes and comes home with other (5-year old) boy scum.


Tag-team
On top of the regular summer-work (= programming new features & helping our service guys & visiting (angry) farmers), new prototype machines have to be made. New design, new diesel engine, new cabin, new controls, new electrical lay-outs, new touchscreen, new controller modules, new graphics, new everything. And of course we didn't just plan a single prototype machine. Nope, two other machines are made by our partner companies (Oxbo & PMC) as well, and there is still another one planned a bit later. But besides just programming whatever needs to be programmed, these particular tasks brings a whole new challenge as well: working with other people!

Normally I program everything on solo (same for T22). Which is a lot of work, then again it gives you full control over the project, and you decide the tempo. When working with other people, you have to trust and rely on them. The obvious advantage of having multiple puppets working on the same thing, is that you can spread tasks and work in parallel... If you have a well oiled team at least. Luckily Tower22 gave me some experience when it comes to teamwork, though my partners here are artists instead of technicians... Artists might be more “lazy”, but technicians on the other hand are (far) more stubborn. So quite a lot time is spend on sharing documents, explaining new technologies and trying to convince them. And swallowing your own ego sometimes. Having them living on the other side of the planet, and never met some of them doesn’t help much either. Be patient and keep smiling!


All right, one screenshot then. Otherwise this post looks so boring. Diego has been drawing all kinds of decals lately. Switches, wires, cracks, stains, dirt, rotten leafs, more dirt... Oh and this environment still looks pretty clean for a horror game. Not everything needs to look like puke of course.

Always look at the bright side of work
Oh well, I’m sure things get better when we know each other a bit longer, and when we manage to finish the first machines as a team. It’s always satisfying to see the giant monsters in action as an end result. It’s just that there is a bit (too) much information, work, and new faces are coming on my plate from all directions. So that leaves no time for T22 now. I also have a second job as well, so the head simply is full. The problem with programming is that you can't just start for 30 minutes and leave it behind again. Well, you can, but putting unfinished code back on the shelf is bad mojo. Do it good / finish it, or don't start on it, that is my experience.

Anyway, fortunately, this whole situation is only temporarily. We’ll be back in action when the farm manure settled down. The other good news is that, even though they’re busy as well, some of the T22 team guys are working on an awesome monster as we speak. The mesh (by Julio) is pretty much done, and this time we have a rigger (Stephen Wong) and an animator (Antonio Yanez) to jolt it alive. No more shitty Milkshape animations from my hand! Also the environment for the next demo is almost done. And Robert made another monster we can play further with after the upcoming demo. The planned summer-release of this demo might not be realistic with all the summer-work, but hopefully we can surprise you this autumn.

And when we do that, I’ll push the demo towards a popular Dutch gaming magazine as well. The teamwork on both Tower22 and my job, learned me a valuable lesson: face-to-face. You can email, Twitter and Skype all you want, but in the end people are best instructed and motivated if you just work in the same physical place. Despite all the technology, some things will never change. So hopefully this demo + note in a games magazine can bring me in contact with Dutch artists that can come over here for a beer. No matter how late I go to bed, a better structured team is really necessary to get Tower22 done.


Another little plus of all this working, is that I earned some extras. So, let’s stimulate our lousy economy a bit by buying a Wacom Cintiq ! No, not the huge ones. Just a 12” (used) one to start with. I can’t draw for shit on my Intuos due the lack of practicing, so it would be a bit stupid to buy a professional (expensive!!) tablet and expect everything would suddenly change. If you hardly hit the road, you don’t buy a Ferrari either. Unless you have too much money… ah never mind. You get the point.

Monday, June 3, 2013

#!/Bash Linux

Time for a little brawl. Did the title say "Linux"? Oh, then you know you will get it.

Often when we read about Linux, either the author LOVES it, or HATES it. Nothing new, the majority that just "digs a product", doesn't bother writing an article in the first place. Although Linux is the kind of product that you can only either hate or love. If you fall somewhere in between, then you're not using Linux but Windows or Apple. Simple as that.

So do I. Not that I adore Windows (never tried Apple), but I have no reason to use Linux. And for my goals -programming T22 / work, playing a game, and watching internet porn- Windows just suits fine. Hence, a lot of the programs I would need don't even exists on Linux so I don't really have a choice, do I? And no, it's not the fault of big-bad-MS either that the majority of software developers only target Windows. On their turn, software developers just look at the target audience. And most of their audience uses Windows. Especially when talking about games or office related software. It's a vicious circle. And the reason why 99% of the office is using Windows is not entirely the result of Microsoft's evil Monopoly either. Linux just sucks for the office, and I'll explain why.

Offtopic. Framed one of the drawings Pablo made a while ago.


Unmasking the popular “Why Linux?!” reasons
-----------------------
First, before calling me an ignorant "Hat0r", I'm certainly not telling that X is better, or that Linux is an inferior product that should dissapear or change completely. Although I only half agree with some of the popular "Why Linux?!" spearpoints.

>> It's free!
True, and certainly a valid reason some years ago. But nowadays Windows isn't that expensive anymore. Besides, I work, and I don't mind paying someone if he/she delivers a good service. How about you, cheap bastard ? ;) No but seriously, we all love free stuff, but then again it's not evil to pay for a product. That's just how our world rolls. You don't work for free either, do you? Exactly.

>> Its Open Source!
So what. That doesn’t make a product automatically “good”. The idea of Open Source is that everyone can contribute free tools, and review & fix each other’s code. Of course, this is required to provide a free OS, and there is nothing wrong with this approach. But the majority of programmers isn’t extraordinary good. Not saying the Linux programmers are bad, in fact, I’m quite amazed that they manage to keep this product consistent, clean and stable so well being somewhat "unorganized". But just the label “Open Source” on itself doesn’t guarantee brilliant tools and the code to be bug-free.

On top, a programmer can write free / Open Source packages for MS, Mac, Google, Android or whatever platform as well. In conclusion, an Open Source OS isn’t worse or better than a non-Open Source OS. It all stands or falls with the qualities of the programmers and designers. And... commercial companies like MS, Apple or Google have the money to generate well documented standards and attract those few extraordinary good programmers.


>> Linux is 100 times safer than MS!
I bet it is. But here is a little statistics exercise. You live in a town with 10.000 people. 95% are Chinese, and have a vertical frontdoors. The other 5% are white and have a horizontal frontdoor. Crime statistics tell that 89% of the burglaries happen in Chinese homes. Now does that mean that Chinese homes with vertical doors are less safe?

Maybe. But since 95% of the homes belong to Chinese, the random chance is much bigger that a Chinese home is chosen for a burglary. As an extra, thieves know how to break these vertical doors, as they're very familiar with them, opposed to those weird horizontal doors. So, of course, in absolute numbers, Chinese homes become victim a lot more often. But when looking at the percentages, the whities homes are actually less safe, since 11% of the crimes happened in white homes while they only make 5% of the community.

Statistics is a bitch. Now I don't know about the actual hacker-virus-Windows/Linux statistics, but obviously a Windows computer is a much easier target. And last but not least, the average Linux user is likely more experienced with computers (thus defending his PC better) than the average Windows user. Because in general, only advanced users chose Linux. Many problems start with users opening their penis-enlargement mails, and that is something neither MS or Linux can prevent.


>>Linux can do X or Y just as well!
Yeah, but often the tools aren’t as user friendly or "complete" as their Mac or MS counterparts (though I often blame those for being bloated and too-much). Plus the number of people that use the Linux equivalents, is a lot lower. That’s not Linux's fault, but it still means that the amount of help, tutorials, teachers, books and other help comes in lower numbers as well. Not very handy if you are a newbie. Commercial companies have the power to promote and organize study materials for their products, where Open Source products have to rely on good will. The Linux community has proven to be very willing, but yet... As said in the first point, this world runs on cash.


It's an Unix system! she says. Thinking now, Linux actually could work in such a weird way.


And now some Real reasons why to use Linux
-----------------------
Enough sceptism. Now some things that make Linux good (as far as I know). First, let me tell a bit about my history with Linux. It’s short. Ten years ago I had to use it for some school assignments, and I hated it.

Ok, some nuance. I didn’t like most things we had to do at school anyway, so Linux wasn’t my favorite waste of time either. Plus the distro we used (forgot which one) was a lot more primitive than nowadays versions probably. But still, the other kids that liked Linux at school, either did a lot of (home)server related things, or just used it because they were nerds. Really. The type of kid that likes making jokes about Windows (starting the laugh-track), and staring at Tux (that penguin) the whole day, making them look intelligent.

Well, I know little about internet(security), routers and servers so I’m not going to argue about Linux strengths here. If it weren’t good, network operators wouldn’t be using it in such a large scale. Now my experience. Half year ago I had to start using Linux (via VM-ware that emulates it on Windows) again. For work. So whether I like it or not, shut up and work. Ubuntu is the name of the distro I’m using. No, don’t tell me Ubuntu sucks and distro X is better – I don’t care. My first impression of Ubuntu? Pretty nice! It was small, compact, looked pretty smooth, contained a file browser, and I could connect with internet without having to read spells from my Lord Voldemort magic book. Not a bad rendez vous.


Last years software design is focusing at easy big symbols again (see smartphones), rather than filling the screen with billions of functions, labels, and little buttons. Linux doesn’t look that way, but has been pretty clean and minimal by itself for all along. Which is a good thing. For newcomers, the less buttons and info, the less that can go wrong.

This minimalism doesn’t only resemble the looks. The Linux package itself can be made minimal too, making it very useful for devices that don’t have a 100 gig harddrive, six processors and an elephant of RAM memory. As you may have guessed, I have to program a machine (touch)screen for work, which runs on Ubuntu. Though Windows has Mobile variants as well, it seems that Linux is easy to strip. There are even tiny microcontrollers that can run it. This makes it ideal for embedded or lower-end devices.

This minimalism also reflects in the stability. Though Linux crashed horribly on me as well (unable to boot after a sudden computer shutdown), in general, it just seems to be less hanging, CPU hogging, memory eating and crashing than Windows. However, it’s not that Windows is crap. Windows simply has to support a wider variety of software, third party drivers and whatsoever. If I make a shit program for Linux, it will just crash as well. Nevertheless, Linux remains a more obvious choice if you need a 24/7 service. You don’t want your Server to crash, neither your machine hardware to hang. If a Boing 747 went down, the creators can’t come up with an excuse like “Sorry, but the Windows terminals also had to support the MineSweeper game and tons of other useless background stuff”. The less going on, the less chance on a crash.


Then why isn't average Joe using Linux?
-----------------------
Now to the point. As explained above, Linux has a set of good reasons to use. Stable, minimalistic, free, et cetera. But why is the majority still using Windows? Linux fans would like to state that MS has a monopoly position, brainwashed the market, and/or that Windows users are just stupid. Though there is some truth in that, Linux also has to look in the mirror and acknowledge its own flaws.

Though I’m a programmer, I have little patience and know-how with a lot of electronic devices. I only use 2% of my telephone functions, can’t program the VCR recorder, confuse the word "booting" with shoes, and generally don’t like spending more than 6 seconds to learn new software. Basically, I’m just as clumsy as most other common PC users. And since I often write software for that same audience, I know how to keep it as simple as possible. Office Betty doesn’t care how software truly works. She just wants a few simple buttons that do exactly what she expects. And Goddamn right she is.



Linux on the other hand forces the user to learn & type commands, and recognize wacky weird terminology. What the hell is a "Grub"? Some sort of evil forest gnome? Linux is stuffed with names like that. Short, ugly names. Grep, /etc, /opt, krt, brt, prt, Fuckt, whatever. The good thing is, if (IF) you are familiar with the environment, you can actually type paths and commands very quickly because of the short naming. But for newbies, Windows slang such as “c:\Program Files\AssholeSoft\“ makes much more sense.

Well, that's a matter of getting used to it maybe. But… I DON'T WANT TO TYPE in the first place!! If I need to install something in Linux, I got to open a terminal and do something like
.......# tar -xs shaggyballs.tar.gz -C /opt/mycrap
Oh, and though folder names are short, installation names are often much longer
.......# tar -xs shaggyballs-linux-core_1.0.4-mozillacheese 53~2.tar.gz -C /opt/mycrap
And to make it worse, Linux is case sensitive. In other words, you'll make a typo very easily. If you are afraid and new (like me) to Linux, you barely dare to hit "ENTER". Maybe I launch a North Korean rocket if accidentally writing the wrong command!

Classic example of someone who made a typo on a Linux station.


Now you can tell me "it’s your own fault, learn to type / follow tutorial-X". But no, no, NO! This is where Linux fails to become lovers with the bigger audience. I'm too dumb and lazy to train myself, and I have the right to be dumb and lazy. And so does any other user. Face it, at least 75% of the computer users doesn't know much about computers, neither wants to know. And this is exactly why a product like an iPhone becomes popular, and Linux not.

I probably belong to the other 25% that actually knows a bit about computers, but that still doesn't mean that I should train myself doing things that can be done 100 times easier. With a mouse, and a GUI you know. Ultra basic elements that transformed DOS computers into more user-friendly devices about twenty years ago. I bet it's cool to know a lot of Unix commands, and I've seen guys unpacking and installing things faster than I could do with a mouse and Install-Wizard. Yet I don't want to solve puzzles each time I need to copy a file or install something. Bottom line:
- I want to use my software - not my OS

That's right. Linux, Windows, Mac, I don't give a crap. Just as long "my stuff" can be done. Whether that is running Delphi, Qt, Paint Shop Pro, browsing internet, reading mail, writing a spreadsheet or doing a game. All the OS has to do, is making me able to start those things ASAP, and run them (stable!). That's why I’m not particularly interested in new Windows packages either. It doesn't really change my experience since 99% of the time, I'm staring at a Delphi screen instead of an awesome new app-based desktop.

BUT! Once we do need the OS to copy files, empty the trashcan, connect a new type of exotic hardware device, unzip stuff, or search a file, it needs to be as fast and easy as possible. Now, Linux can do all of that, and maybe even better and faster than Windows. But those darn terminal commands... it's like using DOS again. I'm not saying Linux should remove its terminal, commands and wacky names. Hey, if you like to work that way, you can grub-grep-sudo-ssh-ls-cd-tar-mount as much as you like. But if Linux wants to reach a wider audience, it should have visual tools as well. If I install something and find out it's a line-command tool, I generally delete it right away.

Their File Browser works nice, so why not using it for a lot more handlings? I’m sure there actually are a lot of (free) tools that can help me with this. But again, I have to find & install those first. You got to understand that most of the average users would have already given up by then. Hence the majority of users doesn’t even understand what a directory is, or how to find a file in Windows Explorer. Linux expects too much knowledge of its users.


If you wonder what the heck we've been doing last period. Well, making the walls uglier.

Conclusion
-----------------------
Well, my conclusion at least. Taste differs, let that be clear. In my opinion Linux has its strengths when it comes to being minimalistic, free, safe and stable compared to some others. It’s great weakness is it’s lacking user-friendliness. Some parts work smooth, other parts brings us back DOS trauma’s. And no, it’s not a matter of learning a bit. Most computer users don’t want to learn and if the Linux community fails to see that, Linux will never even come close to taking over the market. Call us dumb, but not being intuitive is just as dumb (at least if you want to gain popularity).

Then again, I wonder if Linux really should become an easy, widely used platform. Would the Wiz-Kids really like to see the entire office, school and mom working on Linux stations? Linux is like a small group of Gothic kids in class that don’t want to be identified with the rest. If everyone starts wearing black dresses, they’ll start wearing pink knickers. You won’t be a Linux Wiz-Kid anymore if everyone else knows how to use it as well. So maybe Linux should stay a bit difficult. I don’t find it “fun” to search 2 hours on how to create a startup-script, but I bet a lot of hobbyists actually enjoy this, making Linux a satisfying challenge. Linux offers you more control over your computer, but this contradicts what the average user want from an OS.

Moreover, if Linux would become a number one platform, then sure as hell the amount of viruses, leaks, cracks and open backdoors will increase as well, degrading Linux as a safe and stable system. Simply because hackers and other scum will target these devices much more, and a lot more of half-protected software or poorly written drivers will appear by third parties. Being Open Source doesn’t really help hiding leaks and weaknesses either, though the plus is that anyone can contribute to report or fix them of course. A bigger number of users, drivers and software will increase the number of problems and complaints as well. Certainly if the overall "computer skills" level of the users will degrade as well.


As for the popular sports of Windows / Mac / Linux / WhateverOS bashing each other on the internet fora; go ahead, have fun. But just remember you look silly if you are in blind love with one OS and fail to see the pro’s and con’s in a bigger picture. Like a ninja, one should master his tools. Don’t just use X because someone else sais so. If you can make awesome stuff using the Commodore 64, then the Commodore64 it is for you.

Now boys, this is how Linux (Ubuntu, minimal) really looks like. It doesn't work with snes-FX-chip 3D Jurassic Park cubes, it won't recognize speech or commands like "Computer, re-engage starwarp boosters now! >> Yes sir, boosters working at 98%". It looks like... a normal computer, though I still get a bad taste of the eerie "DOS" Terminal.

Friday, May 10, 2013

don't don't Don't believe the hype !

When I was a little fat boy, Doom(2) pointed out my destiny; I would make games. And become a programmer, otherwise you can’t make games. Doing animations or drawing graphics wasn’t all that important those days, and “3D modeling” was a word yet to be invented. At least in my little world.

It still took some years before I could actually start programming though. No PC, no idea, and not the brains to solve formula’s other than 8 + ? = 12. And without internet or able to read English either, becoming a game programmer was “far future” stuff. Besides, playing games and drawing “levels” together with friends was much more fun than even thinking about reading a book. That’s what they call a boys dream. And usually boys dreams don’t come true.

Well, my boys dream didn’t come true either so far. I became a programmer, but not in a game studio. I finished zero games myself. And honestly, I wouldn’t probably even like to work in some studio, doing game “X”. Because I want to realize my own ideas, not just pooping some code to realize someone else’s dream. How different than 18 years ago.

One of the few, if not the only, Doom4 "leaked" (concept)shots.... Well, after seeing complete cities getting destroyed dozens of times last 10 years, a shot like this doesn't produce much more than a "mehhh". Where are the cool mechanized demons?!


Forgotten glory
I’m not going to describe my whole boring programmer “career”, but I just came across this article (looking if there were some damn Doom4 screenshots already), about difficulties in the Doom 4 development process. 18 years ago I would have eaten blue mold cheese (and boy I hate cheese) to join id Software. But funny enough, I wouldn’t like to stand in their shoes right now! Even though name "Doom" equals gold, it seems to be impossible to make a fun game out of it once again. I'll explain.

Everyone older than 20 has likely played Doom (1 or 2). And younger generations have at least heard about it. Grandpa telling his grandchildren how Doom was the shit back in the nineties. The Nineties, where your mother wore gigantic earrings, where rappers had high-top fades, where the effects of Terminator 2 were mind boggling, and the flying car would come soon. Doom is still notorious, even though the last installment, Doom3 (2004), didn’t quite please everyone.

Maybe id Software just got old. But wait. How about those other old Bastards? Quake4 (2005), a follow up on Quake2 (1997), was cool but considered old and stiff. Games by then had open worlds, dramatic stories, Havoc physics, et cetera. Halflife 3 then? Eh…. Their development takes even longer than Tower22. Halflife2 was released in 2004. Some add-on episodes were released as well, but not a single f*cking screenshot from Halflife3. Hence, even their “Episode 3” didn’t appear (yet). And honestly I’m not even curious about it anymore. Enough City 17, Alix, Robot dog and Combine. They had their chance and didn’t show up anymore. Just give me a brand new bad-ass Halflife 3.

Duke Nukem then? Well, we know how that ended. “Shit happens.”, as the Duke would say. So, except from Halflife2, NONE of our old heroes managed to release a truly successful shooter-title in the last 15 years. It was either “fun but not revolutionary”, mediocre, plain shit, or it just didn’t finish at all.

We older guys have patience, and our warm memories will help forgiving faults, and makes us still looking forward to their next titles. The younger generations however may have seen the hypes, bought Duke Nukem Forever, and had to conclude those legendary super-games just sucked. It’s just as “cool” as your dad telling about how awesome The Beatles were back then… it’s a feeling and vibe you can’t bring over. You had to be there, back then. And time changes.

Back then we had Big Fucking Guns son


Now what?
So, looking at the trend, my guess is that Doom4 won’t be much fun either, and those development problems aren’t a surprise. Maybe Halflife3 will do better, and that’s because its founded on a more modern (accepted) game design. As Halflife 1 was ahead as well back in the nineties, compared to other “dumb” shooters. The newer Quakes, Dooms or Dukes, are grand children of the “dumb shooter” genre though, and that’s exactly where the problem starts; Identity Crisis.


If I were in the shoes of id or 3D Realms, then what would I do? 18 years ago I wanted to make games like Doom, so, here is your chance. Tell us, genius, now what?

In forum user-reactions, I often read that games like Duke Nukem or a new Doom will fail (or failed) because they are based on simple, dumb, linear, mindless, corridor shooting. While modern games involve emotions, more thinking, deeper story characters, RPG elements, and whatsoever. Plus they also come in a different difficulty setting. While old games were a hard challenge testing your button-pressing skills, modern games focus more on pulling the player through an immersive story. It’s like comparing Heavy metal music with complicated stupid out-of-rhythm Dub Step tunes. It’s Arnold Schwarzenegger muscles versus Morgan Freeman storytelling. It’s wrecking cars versus solving Sudoku puzzles. Drinking beer versus drinking expensive wine. Modern games sure aren’t all good, but as you can see in their budgets, they take themselves very serious, and care a lot about immersion. At the same time, these huge budgets prevent designers from trying out new stuff. They copy from each other and play safe.

But I don't think those games fail because they are "old". I think they mixed up with modern (copied) elements in an inconsistent way, rather than trusting on their roots. Doom, Duke, or whatever old shooter, got stuck somewhere between the past and present. You simply can’t tell a dramatic story in a joking Duke Nukem setting, so let’s just limit it to saving chicks, like in the old days. But! Instead of carrying 12 weapons, we can only carry two now. Because hey… carrying 12 weapons isn’t very realistic, is it? The Doom3 guy still kept his mouth shut and mainly mowed down imps with a shotgun, but at the same time we could learn a dramatic story about what happened on Mars 5 billion years ago, and the overall horror setting was rather dark & serious, compared to the “crazy awkward weird hellish” atmosphere in the old Doom games.

A game that is only about shooting and destroying things, sounds old. So these games added some story, friendly NPC's, vehicle sequences and other "surprises". But even though I liked the Quake4 Mech parts (cause of the sound effects), such additions usually feel cheap and forced. You're not fooling us! So please, just focus on your core again!


Let's chew Bubblegum again
And that’s where it really went wrong, though very little forum-people seem to notice that. The “Core” elements weren’t done properly either! Don’t get me wrong, I liked Doom3 and Quake4, but they weren’t as addictive and fun as their ancestors. Multiply that argument with 10 for Duke Nukem Forever. I don’t necessarily believe that old-school-dumb-shooters wouldn’t be fun anymore. Hell, kids are playing ANGRY BIRDS these days! That isn’t exactly a revolutionary, dramatic, diverse, photorealistic, deep experience either. No, they just made a simple game. BUT THEY MADE IT SOLID.

And maybe it’s just me, but I still enjoy playing through old Doom (or Halflife, or Quake2, or Red Alert, or Super Mario, or …) now and then. Maybe it’s nostalgia fooling me, but recently I also played Advance Wars for the Nintendo DS. No complex stories, not very beautiful, annoying Japanese Anime kids as war CEO’s, but very, very enjoyable. And no I never played such a game in the past, so Nostalgia doesn’t count here.

The ingredients to create a so called “next-gen” game, don’t automatically equal a good game. In fact, I only like very few game, next-gen or not. In the end, a well chosen setting + addiction and fun are still the dominant factors. But those are quite often neglected, and masked with a lot of eye candy and other kinds of distraction. Making a game that is fun in the bare bone, just isn’t easy. It wasn’t in the Nineties, and now it still isn’t.



Eureka!
If that is all true, then in theory an old dumb game like Doom2 could still work out anno 2013. But they just have to do it properly! Ok. Then what exactly made Doom or Duke Nukem such good games back then, and what did they forget in their latest releases? Well, I can name a few things. But in one sentence: Realism took over, too much. If you played older games, then think back again for a second… weren’t those old level designs kinda weird? Levels these days are based on real-life structures. Even damaged sci-fi factories are still based on architecture that would make sense more or less. Compare this:


Even though Doom3 is more modern, its “scare factor” is based on more classical ideas. Darkness, cold lighting, damaged crap, blood stains, you name it. Doom2 on the other hand was a cacophony of purple skyboxes, green flames, walls of pink flesh and poison lakes. Combine that with metal rock music (instead of silent scary ambient mood sound), and the craziness is complete. Not just Doom, a lot of old games were a bizarre mixture of sounds, flying platforms and absolute illogical worlds. Actually Duke Nukem 3D was one of the first games with worlds that would come closer to real life situations. Cinema’s, sexshops, bars, flooded streets, space ships with lava… oh wait, there we go again.

Upcoming photorealistic graphics, has killed creativity and daring level design. Although the worlds look a hundred times better now, they all fall back on real life scenario’s. No matter it’s a sci-fi, medieval, cowboy or jungle shooter game. Looking good, but not very surprising really. Hehe, by the way, one of the user reactions I saw about graphics:
"
IDGAF that your new frostbite engine can render amazing
dust particles in sunlight. As a geek and someone who can't
wait for games to look great, yeah, it's amazing. As a player,
I ain't spending $60 to see digital dust.
I can go up to the attic and see it for free
"

Oops.

And yeah, even though I spend most T22 time on graphics, the quote is painfully true. So coming back to the question “what should I do for a new Doom or Duke Nukem?”… Well, make some bizarre, illogical, colorful, twisted worlds again for start. Think out of the box, and DON’T think about what you see outside in normal-life(tm). Think in 486 computer style, where we needed other tricks to surprise. Make something that you WON’T see when turning on the TV or walking on the streets. For a change, just make levels with random themes, again and don’t care about one big story line that logically connects all the worlds. “Level1: bloody compound”, “level2: Skull library”, “level3: Lava Gaybar”, et cetera. Surprise me.


Second, they should perfect the art of killing hordes again. 18 years ago I enjoyed quickly running and launching a rocket, blasting 6 zombie-dudes at once, and now I still do. Too bad that 99.9% of the games don’t allow that anymore. Except Valve’s “Left 4 Dead” where dozens of zombies run at you. And guess what, it’s one of the few games I regularly play. And I’m not the only one playing it, so they must be doing something good!

In Doom3, you didn’t fight hordes, but hidden dangerous monsters one by one mostly. Quake 4 pumped it up a bit, but was still quiet and slow paced compared to its ancestor. The makers of Duke Nukem Forever didn’t understand its own roots all. Shooting a three-barreled machine gun AND kicking the mighty boot at the same time at a monster shitting on the toilets was awesome. But now shooting at the few enemies, with a stiff old Duke, just felt like paving your backyard with heavy tiles.

Just give me lot’s of monsters in lot’s of surprising variations, high speed avoiding of projectiles, plenty of blood, and excellent sound effects that keep us satisfied each time the trigger is pulled. I know in the Doom3 days, making such hordes wasn’t possible due computing limitations, but that should have been solved by now. And otherwise just remove some triangles and bones from your models. In the end, fun sells, not graphics.


Well, I’ll dream on again.

Saturday, May 4, 2013

Demo progress

How about a nice cup of... progress updates. Last months some people left, some I kicked out myself as they stopped emailing suddenly (is there a medical explanation for that?), and others joined. 99% of them is busy with other stuff, and me myself is kinda occupied with work lately as well. A prototype harvesting machine with complete new touchscreen and controllers has to be finished within the next few months. And at the same time this new system will be deployed on other machines as well, plus there is the usual extra load of work that comes with the spring & summer as the harvesting season, and thus the service, special options & angry farmers, begins. To compensate the extra desk-chair hours, I'm also sporting a bit more last year to prevent dying from a heart-attack. So all in all, less hours available for Tower22, simple as that. No worries though, it won't be summer forever, certainly not in Holland, and when the new software works well, things will get back to normal.


Yet, we slowly march forward to a next Demo release. Not near as fast as it should, but at least something is happening. I won’t tell you all the details as it would spoil things, but at least I can show you a picture of my girlfriend here:


Not too shabby ey mate? At least not if you compare it with the first looks of that same corridor. Until recently, the Demo corridor looked well, like shit. And as I wrote earlier in the whole “Radar Station making off” , I had my doubts if this corridor would ever look good. By now I should know that only with a fair amount of tweaking, using the right textures & colors, placing the light sources smartly, and delivering a *complete* scene, will look satisfying. No matter that kind of super-shaders you have, the environment won’t look good if it fails at any of those points. Yet as a programmer, I might be fooled a bit with the illusion that I’m doing something terribly wrong when each time I load a new environment or object into the game for the first time. After hours of blood, sweat and tears, you’ll get something like this:

That’s not very motivating for the artist. But, cheer up, the other picture above shows that things will start looking good sooner or later. What we did for this particular corridor lately? Well, let’s sum up:


• Textures
Of course stupid. The first time I loaded the corridor mesh, we didn’t have any texture that would fit with the original conceptual drawing. Most textures made so far, were from an industrial type, related to the Radar Station demo. So for starters, we had to make parquet wood, a red runner carpet, wall panels, and the upper walls / ceiling.

That on itself isn’t enough. If you look at the red runner for example, you’ll see it has a painfully sharp edge that makes the carpet look out of place somehow. The lack of proper Anti-Aliasing in T22 makes it even worse, though that’s another story. Anyway, we needed more variation on the textures so we are making Decals (cracks, peeled of walls, rotten leafs under the plant, switches, cables, …). And, we make use of Entropy in most textures nowadays. This basically comes down on mixing texture variants by Vertex Painting. The worn carpet at the edges in the upper shot is the result of mixing in a variant. Same thing for the darker ceiling texture.


• Improved bloom & lensflares
The atmosphere in this corridor has to be “sleepy”, “warm”, and “gloomy”. Earlier shots were too dark at my taste. The original drawing showed a much brighter room though, and I liked that. But as brightness increases, graphical shortcomings, emptiness, and errors will become more visible too (so I actually use darkness to mask things). One of those errors was the crappy bloom. Either it was non-existing, or too much. Now a more subtle blur has been used. And to improve the effect without needing extraordinary blooms, lens-flares have been added lately. They can work on any bright spot on the screen, not necessarily lightsources only.


The original sketch by Pablo. Different corridor actually, but same style.

• Lightsources
Sounds stupid, but yes, you will need to show somehow where the light is coming from. If you place a light in your scene, but without having an actual model of a bulb, sun, projector, chandelier, or whatever that can emit light, it will look fake. So we made the chandelier (no flame sprites yet) and a smaller wall-lamp.

Then an underestimated step comes, placing the lights properly. Where do you want your lights? Usually people put them in logical way so that the entire environments catches light. But for games, this isn’t always optimal. Logical lighting equals boring lighting, as the entire scene receives the same amount of light more or less, leading to low contrasts and a bland taste. Breaking lights to create a darker spot is therefore an often used trick (plus it helps the performance as well, less lights = faster rendering). But looking at the drawing again, I realized that I needed this “blandness” for this particular “sleepy” look. Just putting lights at random points, without symmetry, would look strange.


• Volumetric effects
Another keyword was “gloomy” though. Yes, it is a horror game. So how the heck can you make things look scary with the lights on? Well, with some magical tweaking of the colors. And who says the lights will always stay on? Game engines worked so damn hard to make realtime, dynamic lighting last 10 years, so make use of it!

To add filthy warmth, I made volumetric dust fields. Right now they are too thick at my taste, but otherwise it gets a bit hard to see them in a static screenshot. This is not just some little particles flying under a lamp source. We actually raytrace each pixel on the screen to measure the fog density + received light a ray traveled through. This allows cool volumetric shadows, and yes, it’s a slow GPU eating effect.



• Programming
Busy with AI as described in the earlier posts, and this demo will show you some realtime GI. Or actually not, if you implement GI properly it shouldn’t be really noticeable except when doing some extreme wild things with the lights. But as you can see in the screenshots, the corridor ceilings aren’t black even though no lamp is directly shining on them. That, my friend, is GI doing its magic.

I won’t go in detail about it, and this effect is neither 100% done nor perfect, but it seems to be cool to prove you can handle GI nowadays, so here it is.


• More objects
With a single object you can’t win the war. If you place a pretty girl between pigs, she will get dirty and ugly eventually as well. Same for objects. A single nice looking plant won’t cheer up the environment. In fact, it looks weird if the rest remains empty and undetailed. So we added little junk around the plant, made (fake) doors, a heater, and attached some paintings on the wall. As with real life interior design, the whole composition of objects and colors will make or break the room.

From my personal collection. The small weird panels on the left show the realtime GI + glossy reflection processing btw.



Are we finished now? Of course not. Games are never finished, even not the finished ones on the shop shelves. We need a few more objects, tune the volumetric fog, tweak colors, draw some more decals, try to increase the sharpness (T22 always gets blurry for some reason), remove artifacts, make flaming sprites, compose music, and oh, maybe some other surprises as well…

I’m hoping you can enjoy the new Demo somewhere this summer. And more important for the health of this project, I also hope this demo will attract a fresh bunch of artists with talent, dedication AND time (that seems to be an almost impossible combi). If I’m happy with the result, I’ll pass the demo forward to some popular Dutch games magazine. It turned out that just placing a video on Youtube / Vimeo isn’t enough to make a catch. Got to do some wild crazy fishing, like Rex Hunt.