Archive for May, 2009

Time to remove that grin from my face

Thursday, May 28th, 2009

I’m basically looking for a new job. If you want to know the details, if you have a nice position to offer, or if you just want to say hello, please use the previously created email.

New email

Thursday, May 28th, 2009

Please use this new email from now on. Hopefully that one will remain active each time I have issues with this website.

Immature game development

Thursday, May 28th, 2009

I just noticed this post here, that I somehow missed before. I suppose it means game development was immature at Grin before February 2009? This might explain that.

Character slicing demo

Thursday, May 28th, 2009

Here is a small “character slicing” demo that I was working on recently. It started as an innocent discussion at work. Somebody asked if it would be technically possible to cut a character at runtime with an arbitrary plane, and have the cut pieces continue using the character’s animation file for some frames, before going ragdoll. Some people said “forget it” because of the huge amount of work involved. I said “yes you can”, and then went ahead and proved it:

The demo was made at home in the evenings, using an old Unreal character. Here is a video featuring a more modern character:

There is a ridiculous amount of steps in this algorithm, although all of them are relatively simple. On top of my head:

  • do software skinning for one frame, to get access to the character’s geometry
  • cut the graphical mesh with a plane. This creates new vertices and triangles.
  • compute new vertex data for the new vertices. You can lerp your way out of troubles for position / UVs / normal(s) / colors, but you can not interpolate the skinning data, so you need something else to figure out bone IDs and weights.
  • triangulate the hole(s) you just created in the character’s surface. Replicate boundary vertices, compute new vertex data for those.
  • optional: update vertex colors so that the vertices nearby the cut plane get a red tint.
  • re-split the character for HW rendering (e.g. see “Skin Splitting for Optimal Rendering” in GPG6). When using HW skinning the character has already been cut to several batches, each batch using a limited number of bones depending on HW constraints. The nasty thing is that you can not cut each batch individually, as it creates troubles later on when triangulating the holes. So you need to put the skin back in a single batch, cut it, then re-split it according to HW limits.
  • slice the bones’ bounding volumes. This may only work with boxes and convexes, as a sliced sphere or capsule gives you a non-trivial shape that your physics API might not support. Recreate physics shapes for cut volumes.
  • duplicate physics bodies across the cut line. One issue here is that a vertex on one side of the cut plane might still reference bones located on the other side. So you need to choose between either fixing all the (now) invalid bone references in the vertex buffer, or let the bones exist as ghosts on the other side of the plane. Both approaches have pros and cons.
  • disable joints across the cut line. Some subtleties here.
  • create two new skins with the newly created graphics data, skinning data and physics data…
  • optional: add extra effects like particles or blood spats, and sounds

I’m glossing over a fair amount of minor details and potential refinements, but that’s the rough road map.

Konoko Payne demo mode

Thursday, May 21st, 2009

I quickly captured a video of Konoko Payne’s demo mode. This is a fight between Konoko and a Tanker. Enjoy!

NB: you need a DivX codec to play this.

Stop The Lamers

Thursday, May 21st, 2009

Sometimes I forget why ICE is the coolest engine ever. I was working with another engine and this happened:

Object3D* some_object;

delete some_object;

and then of course it immediately crashes somewhere because of some stupid container still containing the pointer:

std::vector<Object3D*> mSomeContainer;

Fair enough, vanilla stuff. Still, it’s been years since I last saw such a primitive crash in ICE. Because my non-STL, non-standard-compliant, “ugly” containers are still smart enough to remove the dead pointers from themselves, automatically! Hell, I even forgot I had that feature. It’s been the backbone of the whole engine, for about 9 years now… I can savagely delete any “managed” object anywhere anytime, and the underlying kernel just fixes up whatever needs fixing.

STL, meh! The industry couldn’t even standardize matrix conventions between D3D and GL, everybody has to re-learn the company’s custom, in-house matrices / points / quaternions / whatever anyway. Maybe they should standardize this instead of somewhat trivial containers.

Konoko Payne, may 2009 update

Thursday, May 21st, 2009

Here’s a new rushed out KP release:

Brief changelist:

- fixed wrong kick move when leaving initial dialog.
- improved sniper behaviour
- fixed: fallen striker doesn’t react to CrouchKickFW3 attack
- fixed: “hit foot” animation starts again and again if we “hit foot” a guy already doing the “hit foot” anim…
- fixed: enable hit foot anim on left foot only
- added hit foot anim for some NPC attacks as well, not just the player’s
- fixed: double “crouch + punch” motion for all NPCs
- reworked sharing of state machines between different NPCs. They can now have different “skins” but the same state machine.
- added stagger anims
- fixed max number of reticles for Mercury Bow in “compound redux”
- fixed missing arc when shooting at the skybox with a Mercury Bow
- added “random” button for costume selection
- added missing transitions for kick/punch/jump on runstart & runstop
- added missing kick/punch/jump transitions in land anims
- fixed black “cinematic” margins, size was resolution-independent
- fixed rendering issue for console text on health UI
- fixed: “nuclear tackle” sound not interrupted when hit
- tweaked land hard parameters
- AI now uses crouch attacks in combat
- updated/fixed some AI attacks
- fixed some bad transitions for NPCs
- added correct sniper character in “compound redux”
- added “AI groups” for easier management
- reworked “Nightshade kick” mechanism
- added “access denied” sound for locked consoles
- fixed crazy bug where NPCs run in circle behind eachother in demo mode
- added more varied punch/kick sounds
- fixed a whole lot of misc bugs/crashes/issues cialis