Archive for the 'Oni / Konoko Payne' Category

“Konoko Payne” update

Saturday, February 23rd, 2008

Uploaded a new Konoko Payne version. Nothing really new here, just bug-fixes, “new” characters (Elite Striker, Ninja…), fixed motion scripts, an automatic camera for the demo-mode, etc. The previously mentioned “blood puddles” are in there, but it’s otherwise basically the same as last time, slightly improved. I just don’t have any time to work on a real “game” with a proper scenario, cutscenes, different levels, nice level design, etc. Or voice acting. Some guy once sent me an email complaining about the MGS2-like dialogs in KP, saying that “it would be better with recorded voices”. Yeah, right. What about this: I hire Amanda Winn-Lee and you pay the bill. Deal?

I’m considering dropping all the commercial libraries used out there (mainly Novodex & Pathengine) to make a proper open source project, but even this takes forever. I don’t know any good open source pathfinding library to replace Pathengine, so I’m kind of stuck here. I could re-implement it myself using John Ratcliff’s AI Wisdom 4 article, but I admit I’m not very motivated for this. It’s always painful to re-do something that already works, it doesn’t feel like making progress. On the other hand, the whole KP project doesn’t evolve very quickly anyway, and an open source version could boost this. Or ruin it completely.

I think I’m reaching a point where I can’t make that project a lot better just by myself. The code is pretty much “done”. Sure the AI could be improved, things could be more polished and more optimized, but the hand-to-hand combat, gun fights, character control, etc, everything’s working well and feels good. Despite this, I have an insanely long “TODO” list for Konoko Payne. Let me check… 93 Kbytes! It’s a vanilla ASCII text file with something like one task per line, and ~2000 lines. So that’s ~2000 things to do. If I do one thing per day, I’d need 2000/365 = 5.47 years to complete the project. This is so depressing. In comparison, I have another “DONE” file listing the things already implemented. I move the tasks from the TODO file to the the DONE file when they’re done. Today the DONE file is 62 KBytes and a little bit more than 1000 lines. Not bad for a hobby project.

Anyway. Better, later.

Blood puddle

Thursday, February 21st, 2008

Added a “blood puddle” effect to Konoko Payne. It’s a lot of technology just for a small effect:

  • the puddle is a dynamic mesh computed using marching squares. The shape is random and different each time the effect is called.
  • the mesh is then rendered to a texture
  • texture color is a base blood color modulated by Perlin noise. Transparency also uses Perlin.
  • the texture is then rendered to the ground below the character, using projective texturing
  • plus all the usual culling management to avoid doing that all the time

The effect is only played when you finish opponents with the pistol (Black Adder). It doesn’t appear when you finish them with hand-to-hand combat, that way the effect is not over-used.

In the end, it looks quite effective - especially in motion when the puddle grows and grows below the character.

Blood puddle

Talk is cheap

Saturday, February 16th, 2008

Don’t claim your engine is “next gen” if you don’t even have those.

Ghost shells

Wednesday, February 13th, 2008

There’s a certain hypocrisy in next-gen games. On one hand, some people tell me that next-gen games are all about polishing the details - and then they go work on their parallax mapping. On the other hand, when I point out some of the details they blatantly ignore, I’m told that “nobody cares” about them. Jeez, get your story straight!

Fact: seven-years old PC games (and a number of PS2 games) handle a few things better than current “next-gen” games.

Proof: check out the shells coming out of the gun in Oni. And then in Gears of War.

In Oni, the shells collide with the environment, slide down the slopes, you can hear their sound when they touch the ground, and they fade out smoothly after a while.

In Gears of War, they don’t collide with anything, they don’t make any sound, and I can’t tell if they fade out since they just royally go through the ground.

I guess that’s one of those “next-gen” details that nobody cares about. Still, it’s slightly disappointing.

Now, is there any reason why Oni (or Ghost In The Shell - Standalone Complex on PS2, etc) would handle this better than top of the line Xbox360 games?

Technically the answer is easy: Oni (and, I suspect, quite a few PS2 games) solves this with particles. Each shell is a single particle with a rotating texture - or better, rotating UVs. Collisions with the environment only involve simple raycasts, a collision callback is used to play the sound of shells touching the ground, and fading the shells out is easy since alpha-blending is a built-in feature of any particle system. A single particle is enough to fool the eyes since those shells are usually quite small on the screen. To be honest I never realized that the shells in Oni were simple particles, until I tried to re-program them in Konoko Payne.

Now, the problem with Gears of War is that they probably tried to make it “next-gen”. That is, I suspect they tried to handle shells as “real” meshes, controlled by a full-featured physics engine. Unfortunately this is an extraordinarily bad idea.

On the rendering side it’s not too bad. A real mesh obviously consumes more resources than a single particle, and it would be very slow to render a hundred bullets one at a time (set-world-matrix, render mesh, do that again), but nowadays there are instancing facilities in your favorite rendering API to make this possible. It’s still a lot more expensive than rendering a few hundred particles, and fading the shells out is more difficult (opaque meshes and transparent meshes are usually not even rendered by the same pipeline), but overall it’s not too painful.

On the physics side however, things are not so great. By nature the shells are very small, so if your physics engine doesn’t support continuous collision detection (CCD), it’s likely they’ll go straight through the ground. And if it does support CCD, well, you just added a hundred CCD-enabled rigid bodies to your simulation: not a good move. Your bullets may kill your enemies, but they just killed your framerate as well.

So, how do “next gen” games solve this problem? Well. Apparently they just ignore it, and are happy to live with ghost shells going through the ground. Somehow, I preferred the old-gen solution.

shopfr.org cialis