Sunday, April 25, 2010

MTV Cribs

Finally, the weather allows me to type this message from my garden again. Although... after 10 minutes I'm usually sick of the flies and reflecting sun on the screen already. But just to celebrate the temperature and to keep an eye on our daughter who is feeding rocks to the fishes, I'll give it a shot.

Anyway, I was finally able to pick up the flashlight, attach it to a hand-joint, and switch it on/off. Sounds not too difficult, but it also required the editor to get several upgrades such as defining attachments, adding spotlights and flares inside a model definition, and so on. It's always that damn editor that slow down progress. Then again, once it works, you don't need cheap programming tricks or workarounds to get things done. Like it or not, editors are part of the job.

I'm still busy with animating the player model to properly hold that flashlight though, so I don't have nice pics of a robot walking around with a MAG-lite yet. But, since pictures were pretty scarce last weeks, I decided to create a few new pieces of scenery:


It took quite a while to get it this way. Nice visuals isn't just a matter of fancy shaders and a few good looking textures. It's the complete setup. Having the right combinations of materials, good light placement, deciding where to put litter or not, respecting some theme, and so on. One glitch is enough to spoil the whole thing.

To create interesting scenes, you need to have some architectural skills. Which I clearly don't have. An architect probably first imagines a scene until it's printed into detail into the mind. Then he finds the materials and tools to create it. I'm not coming further than creating a blanco 3D mesh in Lightwave, and then start throwing textures, lights and objects into my little world until it finally looks ok. I'm also limited to my textures and objects as I simply don't have the skills and time to create perfect high-res textures or objects to fill the scene.

However, if I ever want to get some help from 3D modellers or texture artists, I'll first need to create some attractive screens to prove the engine before they take me serious I guess. So, I'll do my best. One thing I like about this scene is the medieval "Angels versus Demons" painting. If you're not into gaming than at least the maps could give you a museum tour. Those old (religic) paintings always give me the creeps. Not just the content, but also the mindset. Guys like me create horror just for the fun and thrills. But people like Dante probably actually believed and feared the demons and hell they depicted. In times they didn't had internet Devian art, movies, or Clive Barker books for inspiration... A bunch of sick dudes we had those days, really. Whish I could hire a guy from the past and put 'm behind Photoshop...

Sunday, April 18, 2010

Doctor, my balls

Not much to show this week, except this MAG-lite maybe...

Not the most difficult 3D model, but I like the cubemap reflection. The engine updates a cubemap nearby the camera every cycle so the reflections are realtime. In fact, you can even see yourself in that flashlight reflection. Now the flashlight still needs to get picked up, added to an inventory, be selected, show up in the
player hands, switched on and off, ....


Other than that, no screenies this week. Not that I didn't do anything, but hey, sometimes it takes more than just a week to get your things done. Most programming work is background stuff that no one will ever notice, except that the product as a whole works (or not). No, if you want to take credits, you'd better do the art or sound. The dirty programming work is for geeks anyway.

I continued my listing that the punch animation produced last week. Making material/impact matrices for example. What happens if a bullet hits cardboard? Or when a fist hits metal? Sound, decals, debris and sprites will differ.


More interesting might be the damage system. Of course we want our enemies to drop dead after a while. Or finally start to make some competition by giving your player health as well. So far I can run/fly as an immortal God through the worlds. There are no annoying game rules, puzzles or healthbars that can stop you. Which is why this game doesn't feel like a... game. So far.

Now managing health can be as simple as "player.health = player.health - damage;". You don't need to be a programmer to understand that line. But why not making it ourselves ridiculously difficult? So that is not what we're going to do. Models can have multiple physical volumes for collision detection. A humanoid would have a head, chest, upper arm, lower arm, and so on. When a entity gets hit by a bullet, fist, collision or other type of damage, the "hitzone" will be extracted from that collision model. Then each hitzone has its own properties such as health, damage amplifier, armor, python script callbacks and "ouch" animation. This way you can introduce headshots, weak points for boss characters and do Bob Sagett homevideo's after a brickstone was thrown at someone's balls.

Now that is not completely new. Goldeneye and Perfect Dark badguys also made a funny jump after firing a bullet into someone's butt. And every gamer knows that you should aim for the head. Who said games aren't educating? However, I hate the fact that enemies in most games still do not seem to have much pain. You just sneaked behind someone and shot his skull with your Charles Bronson Wildey .475 Magnum. Instead of dropping dead or at least inspecting if his brains are still there, he immediately turns around and kills you. What the hell?

I want the enemies (and yourself) to suffer. If your knees are hurt, you can crouch. If your arm hurts, you first need to visit your mama for a kiss before you can use guns and baseball bats again. If you bleed, you'd better treat your wounds first, or you'll die. On the other side, it shouldn't be able to kill an enemy just by shooting his toes 20 times. There will be a difference between vital and non vital parts. And when an entity dies, we want torn off arms, break tables in two, decapitate people, exploding barrels, breaking glass, snapping wood, and so on. Violence!

Sunday, April 11, 2010

Bitchslapping

While making a game you'll have to treat yourself once in a while. That ussually comes down to throwing a machinegun somewhere in the game so I can start shooting lights from the ceiling. This time I decided to introduce some other type of violence: boxing. Most zombies and other monstrous types do not have a weapon license, so I had to teach them some Mike Tyson lessons anyway. What is a game without getting pummeled?

When I did my first 2D fighting game ~8 years ago, I had my sprites killing each other within hours. This time however I spend an entire week on getting that stupid DumpBot performing a punch, and not just because my animating skills suck. How come?

Anyone who programmed a more "universal" (game)engine knows that the abstraction of things can deliver you quite a lot more work. With quick & dirty programming it's easy to quickly add specific jobs such as controls, object behavior, performing a move, firing a gun or enemy AI. However, each new specific "thingy" may require another block of code, resulting in a big mess.

Universal code/modules on the other hand should be reusable for a wider range of tasks. A single punch isn't just a punch anymore. The same mechanics must work for kicks, mauling dogs, vomiting Matroskas, nunchucks, swords, headbutts, giant Japanese battle robots, and Chuck Norris. So prepare yourself for a lot of work. But once you got it, even Steven Seagal must admit it's usefull.

You want some too? Take that communist bastard!

When I decompose that punch into sub effects/techniques, a whole list suddenly appears:
- What exactly happens when I press/click the action button? Depends on what I'm controlling at that point... a soldier, a tank, or maybe BA Baracus...
- Battle pose (raise fists, wanna get some punk?)
- Torso punch animation (while the legs may keep walking)
- Retract animation after hitting something (instead of, oops, fistf#cking a concrete wall)
- Let the torso and fist animation follow your mouse (watch up and down)
- "whoosh" sound
- Collision info. How to check that swinging arm?
- Impact sound. Fist on flesh. Fist on glass. Fist on Guinua pig. Colossus fist on house. Axe on head. Lightsaber on Jar Jar... So many combinations.
- Physics. Launch head with 40 kiloNewton after succesfull baseball strike.
- BIF!, BLAM!!, CRIKEY!!! Batman sprite effects, in case you like them.
- Blood splatters on the wall. Or green soup for the German variant.
- Debris, smoke, sparks or dust on impact.
- Impact decals; cracks in the walls, bumps in your new car, scratches in your face.
- Bonus points for the Sender, enable combo's.
- AI Script callbacks on hit or miss.
- Environment script callbacks for environment (Streetfighter II crowd goes wild, alarm goes off, kill 20 enemies before you can continue, and so on)
- Oh yes, and health reduction of course. Activate ragdoll if it's dead, or trigger an "ouch" animation. And don't forgot to make a difference between kneeshots, headshots or kicks in the balls.

And probably I still forgot a few things. When looking at that list I realize I'm not even halfway. Physics, sounds, collision detection and animations finally work. But I still need that Batman "BONK!" sprite effect.

"Pigboxer"

Saturday, April 10, 2010

Daæ wieczne odpoczywanie

News is so full of horror every day that it barely touches a person anymore. Hunger in Africa, another Earthquake in South America, 20 civilians killed by an American bomb, children hanged by Taliban, mineworkers got trapped, little girls that are missing, and so on. The list is endless and keeps counting every day.

Of course, it is shocking, wrong, bad or just plain sad. Politicians keep telling that we are all deeply shocked and share the sorrow. But please let's be honest… 10 minutes later you are entertaining yourself again with friends, family, a beer, computergames, porn websites or whatever you like. And don't be ashamed for that. If we had to truly mourn for every horrific event, we would spend our entire lives crying, 24 hours each and every day.

Nevertheless, once in a while the news can still grab and leave you with a bad feeling the rest of the day. September 11th, the Tsunami or Haïti for example. Or how about Micheal Jackson? Who cares about those 100 guys that died in a fire somewhere, Micheal is dead! And suddenly everyone loves him again, including myself. As for the “closer to my bed” Dutch events, I can still remember the news bombing me about the murder on Pim Fortuyn, Theo van Gogh (not the painting guy), the newyear fire in a bar in Volendam, or the exploding fireworks factory in Enschede. And recently we had the sad news about Milly Boele. When they reported this 12 year old girl as missing, your guts already know what kind of news will follow. Still, the confirmation of her death one week later, made me angry and sick for that day. Especially when looking at my own daughter.


As for today, 10 April 2010, another black page was written in the already dark history of Poland. The polish president, Lech Kaczynski, died in an airplane crash this morning. But not just Kaczynski, also his wife Maria, several generals, half of the polish parliament, bishops, and other highly placed people. Well, planes do crash sometimes unfortunately, but to make it even more bitter, it happened in the forests of Katyn. Not the first time the Katyn soil tastes Polish blood…

Ironically enough, the souls of ~20.000 polish rest here. Also politicians, officers, professors, lawyers and other highly placed people. Like the people on board of the Tupolev TU 154, these polish didn't die naturally either. They were taken arrested and murdered by the Russians in 1940. As you can guess by now, the plane was on its way to the yearly memorial at Katyn. Seems this doomed place will get a second monument now.

I'm not polish, but my sad, shocked and polish girlfriend is sitting right next to me. Following the news that keeps showing name lists, mourning people, sad music, flags half-mast, youth pictures of the president, children of the victims. Pfff, even the news woman didn't manage to hold her tears. So... I'm feeling with my girlfiend. I just can’t help imagining how the last seconds/minutes of those people would have been (which is generally the reason I hate flying anyway) and how their families will receive the “remains” of their beloved ones.

I just wish the best for the family and children of the fallen ones. And let's hope this political gap will soon be filled by proper people. Poland had enough bad luck last 70 years. Getting squeezed between Germany and Russia, this Europe country has always been forgotten for some reason. They protected us from the Ottoman invasion long ago, and more recently their brave soldiers took part of WOII, helping to free us. Nevertheless Poland never really got excuses from their friendly neighbours, neither credits for their offers in WO II, nor Western help while Solidarność fought back to their Communistic rulers. And now when this nation is finally crawling up again, half their political leaders die. In a Russian airplane for Pete's sake. Like my girl always sais with her Commie accent, "life ies brutal".

Lech in his earlier years as an actor in a Polish movie, together with his twin brother.

Katyn & some more Polish history lessons:
http://en.wikipedia.org/wiki/Katyn_massacre
http://en.wikipedia.org/wiki/History_of_Poland_(1945%E2%80%931989)

Tomorrow there will be gaming news again, as supposed on this game blog. If my hangover isn’t too big that is. Yes, hypocritical as I am, there is booze to drink tonight. Having a party from my work.

Sunday, April 4, 2010

My Milkshape

Happy Eastern! And thanks for the excuses Pope! Not. To the point, this week I spend some time to "full body awareness". In case you don't know what that is, did you never wonder why your FPS characters never have legs? Gordon Freeman for example can climb a ladder with his beard while throwing down hand grenades between his non existing legs. Also the Doom space marine is just a set of hands with a 6 ton plasma cannon that floats through space.

Is it so difficult to add a pair of legs? Don't know, but in 1997 I already played a game with Inca's(?!) or something. I don't remember much of it, so probably it sucked, but at least that inca guy had legs. So don't ask me why still 90% of the FPS game characters are missing limbs. Anyway, "Fully body awareness" adds a 3D model to your character, also visible from first-person perspective. The body gently steps over dead foes, casts shadows like any other normal object, and may even get reflected in the water or glass.

DumpBot on solicitation in his typical "Badger Badger Badger, Mushroom Mushroom" bindpose

I figured I needed that too, so I hired "DumpBot 0.5" that applied for a role in the game. Temporarily that is. The game has nothing to do with robots. To release some slight details, your character will be an average Joe, or should I say average Eastern Europe Dimitri? As for the stinky robot, the only reason for his existance is that making cubes and hoses is a lot more easier than an organic model. Maybe that's one reason why characters misses a full body... Making hands alone is already difficult enough. Even in commercial A+ games some of the characters are still holding their guns as if they had lepra or a worse case of RSI.

Although his foot is penetrating the bathtube, at least he has one! And a chest pocket to keep your pencils & tobacco

Well I needed a player model anyway. Doing stuff such as picking things up, firing guns, hitting switches, getting hurt, crouching, jumping, making collisions or holding a flashlight feels more natural with an actual (animated) 3D model. The engine can attach a lot info to the animations and its frames. Each frame can trigger sound effects or make script callbacks for more complicated events. Check out the shot above to get an idea. Ow... and if you wonder which programs I use, I captured the Windows taskbar as well. I'm doing EVERYTHING in Notepad, inluding drawing bitmaps and plotting 3D coordinates.

The hose between the gastank and DumpBot's bottom creates an infinite loop of energy. Yes the design was thoughfull.

As a last note, I can finally zoom out for a third-person view as well. Not that this robot is a pleasant view compared to Jill Valentine's high-polygon 3D ass, but it's usefull for testing. And who knows, maybe I'll switch to another camera point as well. Most horror-survival games do for some reason...