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...

Sunday, March 28, 2010

Groovy sound bytes

Another week wasted. No poop for me this time though, Nah, this weeks turn was for our little daughter. The doctor sais she has an ear infection (again), but so far the antibiotics aren't really working, and she has a serious ugly cough. As if she smoked cigars for 16 years. Problem is that she can't really tell what's going on yet. One hour she is happily destroying the house as usual, 10 minutes later she sits there as a zombie, throwing up on daddy's new shirt.

So, I spend a few days at home. And while she was asleep I still got a chance to research a few things. Maybe one of the reasons many game-programmers are always focusing on the visuals is because they are, well, pressentable. If you want to impress or motivate yourself, create some new shaders or 3D maps and capture a screenshot. However, many game aspects are invisible techniques. Enemy AI, path-finding algorithms, entity structures, editors, scripting, and how about sound?

So, this week I can't really show you something again. But I found quite interesting stuff about sound. So far, sound was just a matter of playing .WAV files or streaming some music. Later on OpenAL added 3D sound to my engine, including some cool reverb ("EAX") effects like firing a shotgun in a sewerpipe or underwater. But there is more than that. Managing the many sound resources in the limited memory is a challenge. And how about 'true' 3D sound? Did you ever notice the noise dims when you close a door?

As you may have noticed, most parts of the game will be indoor. Meaning there will be a lot of occlusion by walls, doors, and thick ceilings. Basic 3D roll-off calculations like OpenAL offer are not enough to get a realistic soundbyte. It matters a whole lot if you shout in the open-air or inside a closed complex. Not only for you as a listener; also enemies who use their ears to detect threats.

I'm pretty sure OpenAL can be tweaked to do this kind of stuff, but I also had a look at FMOD this week, another Sound API used in commercial games, including Crysis. Commercial usage requires a license, but you can still download the full thing, including a handy tool called "Designer". So far I always had to create my own editor for defining sounds, properties, channels and so on. Possibly that was a waste of time, because Designer offers a nice toolset and testing environment to create a sound library.

Besides that, FMOD has functions to setup a 3D world-mesh to do the occlusion I discussed earlier. Too bad it doesn't have functions to test if AI enemies can hear you as well at a certain position, so I still have to figure something out. We don't want the enemies to cheat by hearing your squeezy farts through a 6 meter concrete wall of course. But nevertheless, I'm impressed by FMOD. In fact, I'm creating a wrapper DLL right now. Time to finish, I hear cigar coughs...

Sunday, March 21, 2010

Annoying

Not much productivity again this week. I thought my toilet adventures were over, but the shit still hits the fan, literally! And after almost exploding a few times last week, another parasite infected me: "Vista Security Tool 2010". Spend the whole damn weekend fixing my laptop. I hope the creator of that thing gets a real Ebola virus for wasting my, oops, F#ck!ing time.

I didn't had any viruses last ~9 years (neeeeeever visited any dirty sites, I pizza-promise), but all of a sudden a typical Windows Vista screen was popping up and showing several severe virusses. Thanks for reporting, now fix it will you? "In order to protect your computer, you must purchase Windows Security Tool". Purchase? Fuck you. But the virus warnings kept coming, and that annoying "Security Tool" kept prompting me to buy it. I got suspicious. Microsoft certainly knows how to earn money, but not this way. Of course, my other guards were playing poker and didn't notice anything. Anti-Vir couldn't detect any virus, Ad-Aware didn't even start. Thanks for nothing.

Turned out that the virus warnings are fake, BUT that "Vista Security Tool" itself is a very real threat. CPU was busy 100% all the time, continous (fake) warnings, no internet access, and even a few blue screens. Extremely annoying. I managed to download Spyhunter and Spyware Docter. But of course, these assholes also first detect and then ask money before you can fix anything. Finally a potion of Spybot free), Anti-Malware, and CrapCleaner(what a coincidence) seemed to kill the threat. If you are pulling your hair out for the same symptoms, check this out:
http://www.malwarehelp.org/win-7-security-removal-2010.html



I can't leave you with empty hands again, so I did manage to produce some pretty nice
screenshost this week, if I may see so. I moved to another test apartment with a better view on my Soviet style city. The textures are stolen from Halflife2, but I think it's a pretty good job for someone who is A: not a modeller or architect. B: not a texture artist. C: has diarrhea.

Programming progress is hidden in the small details. The roof antenna's and foliage on the balcony are transparent surfaces with double-sided lighting and can also cast shadows and scatter the lightrays now. Whoopie.

Sunday, March 14, 2010

Blueprints

Hmm, nothing fancy to report this week. I spend most of my precious time on the toilet this week. Too much jalapeenos or something. And fixed a few software bugs that were at least as annoying as my endless sanitary visit. Just one of those weeks where nothing works well.

I did some stuff on paper though; map design. At some point you need to proceed and create some actual game-content, or at least a prototype of it. Making a single good looking, isolated test-map is pretty easy. But how the hell to create a complete world that should cover hours of solid gameplay? Games are for little kids, bla bla, but the design process is at least as complicated as writing a book or moviescript. Not only the technical part. Choosing fascinating scenes (filmset), making up a game idea that is enjoyable (plot/genre), writing a smart story (script), using cool characters (actors), supportive graphics, sound and music, and so on.

That's why most games (and movies) copy proven concepts from each other. For example, it turned out that 2 hands in front of a camera, a shotgun, and a bunch of demons or chattering soldiers is a guarantee for success. But what if you're trying something new? Not that every single piece I had in mind has never been done before, but there is not much reference when it comes to some of the key gameplay elements, and neither for the environment. When making a map, you deal with lots of factors at the same time. Especially when doing an adventure/puzzle game like Zelda, Metroid or Resident Evil (earlier versions). To give you an idea:

- Not too small, not too big
When I buy a game, I'd like to be entertained for ~12 hours, AT LEAST. Games tend to get shorter and easier though. Developers get lazy, and/or games are targetted for the "casual gamer" (bleh) instead of hardcore Japanese who can finish Super Metroid within 20 minutes while doing a sushi contest. But yet another reason, making high quality content has become a lot harder. 30 years ago a hobbyist could draw Pac-Man out of 6 pixels on a sunday evening. These days each model, map, sound effect or texture is a piece of art on its own.

In some cases the player needs to feel attached to the maps as well. To give you that "honey, I'm home" feeling (Zelda villages). Or in case of a horror game, to provide the player with (false) knowledge of the environment. Fear often lies in the knowledge something bad may happen, rather than the graphic scenes them selves. However, the bigger the maps, the less knowledge the player has about the individual locations. Bigger is not always better.

- Let the maps Serve your type of gameplay
When making an action shooter, you need obstacles, objects to take cover, and eventually multiple routes to assault the enemy. When making Super Mario, you need platforms, pits and plumbing pipes. A race game requires a curvy circuit. If you don't, the gameplay will fail, completely.

- Serve the story / set the athmosphere
When the story plays an important role, the maps will need to support that as well of course. Resident Evil cannot do without the scary underground labs. And what would Star Wars be without the wild variation of planets?

- Please the eye
As you may have noticed, this game will take place in a skyscraper. But making 100 levels made of appartments, elevators and corridors is... boring. Make sure there is enough variation and "wows!" to drag the player through the game. Screenshots of dusty corridors alone won't attract anyone.

- Respect the theme
At the same time, stay close enough with the main theme. You don't want Star Destroyers in cowboy games. Silent Hill is scary, Metroid is a lonely sci-fi adventure, Zelda feels like a fairy tail, WO II: "Battle of the Bulge" is about... WO II, Battle of the Bulge. And guess what "Need for Speed is all about". Mixing up just any idea you may have is not going to work. Keep consistent. Sounds logical, but at the design phase you often get biased on ideas that may not really fit in the story.

- Horrific
As for our horror theme, well, it needs to keep you feel unpleasant all the time. Resident Evil 5 is a fun game, but I won't call it horror anymore. Zombies on motorcycles with rocket launchers? Come on. And how many scary movies have there been made the last 10 years anyway? In fact there were 2 or 3 "Scary Movies", but let's forget those quickly. Making someone feel truly scared is maybe even more difficult than making someone cry or laugh his pants off. The game maps needs to build constant tension. But one wrong decision can break this feeling. Just making a bloody stinky map doesn't work for long either. Humans quickly adapt to the situation you know.

- Make it smart
Just like in Metroid or Zelda, this game has puzzle elements and backtracing. Find a grapple beam on one side of the world, use it on the other side. The placement of items, locked doors and hidden sections must be done with great care. In some games the puzzles or secret sections are too obvious, resulting in an easy, not challenging game. At the same time, make sure backtracing doesn't get annoying. Make sure the already visited area's will keep surprising by introducing new stuff or allowing you to use your new abilities / items each time you return.

- Spread the butter
When drawing your first map, be carefull not to put all the cream here already, or you will run out of ammo soon. People don't like movies that start spectacular and then fall back long-winded. Create a couple of climaxes and let the game/maps bring you there smoothly.


Well, imagine to keep all those factors in mind at the same time, then draw a map... Good luck! Allright, another long post finished. I didn't have new graphical content, so here's a screenshot from my earlier engine. The shot is more than 3 years old, but still a nice one.