Tuesday, May 3, 2011

Animation:Every silver lining has a cloud.

I wanted to spend today writing the missions code. But I wasn't happy with XNAnimation's shader. It's concept of point lights (with no attenuation) and lack of directional light, made it look like crud. Apparently, once upon a time, XNAnimation did have attenuated point lights but because some crappy ATI cards couldn't handle the shader, the number of instructions had to be reduced. So, point light attenuation was taken out. I can think of a ton of stuff that should have been taken out before that! Maybe less lights? Unloop the light code?

Anyway....I spent today writing a new technique for my shader to replace the XNAnimation fail-fest. Which was frustratingly simple, in the end. But, of course, I had to go through a long process of debugging to figure out things like: animation not working on skin but worked on normals, and why DEMII's legs were on top of her head :D.

Thursday, April 28, 2011

Success with animation

  • I have had major success in getting an animated mesh that I made working in DEMII ! This is huge as it is the last major milestone/hurdle for the game engine to overcome. It opens up a world of possibilities for enemies, etc, etc. All it took was fixing the Milkshape exporter in DeleD and implementing the XNAnimation library.
  • I am also finally happy with the camera control. After playing  researching other games (GTA4, RF:G, JC2) and trying to work out what they are doing different (GTA4's camera works well indoors for a third person game)...and copying. Now the camera orbits the player in 2 dimensions and sticks to walls. So much better than pushing it up the wall (sea sickness, anyone)?
  • I have added a few new levels. The most interesting of which is a massive pyramid that DEMII must climb, only the steps are broken in places. So, she has to walk around the edges and find a path up. It kind of reduces the game to a platformer, which is a great bit of variety, me thinks. Think the old C64 classic Nebulus. There will be alternate paths, traps and hidden things, also....and a push puzzle on top!
  • My recent GTA4 "research" has also given me a lot of insight into how to do missions without an inventory. Basically, when you have to "get item X", you are really telling the player "go to location X, where I will display item X". Location X can therefore be a trigger tile.
    The other major type of mission, in GTA4, is the good old bloodlock ie kill a particular enemy or all enemies in a location.
    Using combinations of these, with dialog triggers throughout, can be quite entertaining story telling. A real eye opener!

Tuesday, April 19, 2011

Animation Woes/Rant

A new version of Blender has been released 2.57. Improvements include not having an interface that looks like it was designed by an epileptic chicken, and having a plug-in interface that can actually run plug-ins, and not just say "Script Error" or "I can't find Python despite every other program using it just fine". Major downside: Old plugins don't run, and (of course) the useful ones haven't been ported over. In other words: different shit, same smell.

Which brings me back to DeleD. This free editor may not be as powerful as Blender, but it is far easier to use, and, you know what, it gets the job done. Its major flaw is that you can't get the animations you make out into the world. The only way to save the animations is in its own DXS format. The only exporter that exports animation was to Milkshape...and even then animation export was broken. I say "was", as I invested yesterday downloading the source, tracking down a copy of Delphi7, building an XP virtual machine, and fixing the exporter....then I realised it was 3AM. LOL

I can now export to Milkshape, which will allow me to export to animated .X or .FBX. Which is a stupid workflow. Why should I use an excellent, alive and free 3D tool (DeleD) then export to a so-so, not so alive, and not free 3D tool (Milkshape) just to export to a free game framework (XNA). I think a new entry on my to do list will be to get the DeleD .X exporter exporting animations. Then I can pants off Milkshape.

Anyway, I'm off to look into getting this animation into the game.

Wednesday, March 30, 2011

Arrrgh! Robozombies!!!!



  • Put a lot more work into the conversation system. Now wraps text and has a conversation tree.
  • Added height offsets for each tile. So now the ground doesn't have to be flat. This will prove useful for the outside areas.
  • Added a new grunt-level bad guy - The RoboZombie! You see, our mad doctor is far too mad to have just regular zombies on his island. As a result of his first attempts at making a cyborg, he has these monstrosities...that got loose! They will be found all over the island in numbers.


Friday, March 18, 2011

Liquid Bug Fixed!

This has been driving me nuts. It was a bug that would cause the liquid hazards to stop animating. Turns out to be a bug in XNA.

I was using ElapsedRealTime.TotalMilliseconds to tell me the time between frames. Should be around 16.6 for 60fps. This was all over the place when I had a steady framerate. Then it would go to 0.0, so no animating. I switched to ElapsedGameTime.TotalMilliseconds and it works great. They should be equal, but by outputing them, I can see that ElapsedRealTime is all over the place.

The difference is ElapsedRealTime is the clock time and ElapsedGameTime is from the startup of the code. The games should be the same. I think this may have something to do with throttling in a multicore CPU. I have an i7, which is a quad-core (comes up as octo-core in Task Manager).

Thursday, March 17, 2011

Sound Manager


  • Added a sound manager. Now all sound effects reside in this class. This means that I don't have 100s of actors each loading sound effects. Much quicker and lighter on memory.
  • Added sound effects for push, pull, objects sliding and doors opening/closing.
  • Added particle effects for push and pull. Basically just a stream of smoke puffs. But at random spread and speeds. Surprisingly effective.
  • Added a translation to the starting point of the attack particles. So now they start at DEMII's gun barrel and not at her origin. No more shooting fire from her bully button. LOL!

Monday, March 14, 2011

Camera angles revisited II

  • Added point lighting to actors


This screenshot shows the Tomb Raider style camera in effect ie. you can now orbit around DEMII and see her face. Model is not finalised , yet, but very close to it.