Pre Beta Build: March Progress Log


CLICK TO ENLARGE

CLICK TO ENLARGE

CLICK TO ENLARGE

CLICK TO ENLARGE

CLICK TO ENLARGE

CLICK TO ENLARGE

CLICK TO ENLARGE

CLICK TO ENLARGE

Made quite a lot of developments this month. First of all I started to work on some basic artificial intelligence using simple distance and direction calculations between the NPC and the player, I wrapped this into a basic state machine in order to allow other behaviours to be easily added. After this I added a state for fighting and a state for randomly wandering about when the player is not within range. In order to stop the NPC’s falling off the edge of the platform it was necessary for me to add some detection of the platform edge and link this into the AI’s wandering behaviour, forcing them to change direction until they are no longer in danger of falling off. When they are seeking or attacking the player this is not important as zombies are notoriously stupid and would most likely follow a person off the edge of a platform. A problem which still exists in this is that I haven’t added wall detection to the zombies so if they get stuck walking into a wall they may continue to walk into it until they randomly change direction, but this isn’t too hard of a fix.

For each of the npc’s I have attached collision meshes to the limbs used in contact when fighting (head, arms and leg) in order to accurately detect what kind of attack is being carried out and for how long they have been in contact (for harder / varied attacks) in order to apply damage and health. Due to a limitation in the number of different animations I have available I decided in order to make the combat a bit more varied and not so predictable I made it so while the player / npc is in the attacking state and its limb collision objects are colliding with the enemy it reduces health from them, meaning that if you hit a zombie with the ninjas hard attack and you catch them at a good angle the full force of the swing is applied. Also depending on what attack type they have received the AI when attacked receive a force in the opposite direction to what they are facing, and a different attack animation is played based on the attack. A small improvement on this would be to apply the force in the direction of the collision normal as opposed to their direction normal.

The turret I decided to create as I helped someone fix some buggy picking code which inspired me to implement a form of ray traced shooting. It was fairly easy to set up, although I did have some problems with the way newton works and the way I wanted this to work. In order to keep an rigid body still the best way to do this is setting its mass to 0 so that it has an infinite mass, but as I want to rotate the turret smoothly using forces (manually rotating creates serious collision issues) this wasn’t an option. So first of all I tried attaching the turrets dynamic body to a static body of 0 mass via 3 ball socket joints, and then manually rotating the static object, which worked more or less flawlessly, although I did begin to notice some glaring bugs which caused the dynamic body to sink into the ground, so I opted to use the same method I use for moving and stopping my character (applying an equal and opposite force to stop), so if the desired velocity of my turret was to always be 0,0,0 to calculate the force required to keep it still is the 0,0,0 – the current velocity multiplied by mass and time, this worked better than I imagined it to and is much less hacky than attaching to a static rigid body. Attached a cross-hair entity to the end of the turret, basically a specified distance in the turrets local space Z co-ordinate which is then multiplied by its rotational quaternion in order to give the direction, this is essentially how i cast the ray in order to shoot. upon the ray colliding first with a zombie i then apply an attack to it in the same way it is applied when in combat. in addition to this i added a simple particle effect in the same way as the cross-hair in order to simulate muzzle flash, i may add some kind of chaser bullet as well just so you can visualise where it is going.

After I got the layout of the first level pretty much how I decided It was going to be I figured it was time to start making it look a bit nicer with lighting and shadows. I decided to apply modulative stencil shadows, as they where easy to implement, fairly general purpose and still don’t look too jagged on the edges. After much deliberation and stress testing with large amounts of NPC’s I decided to only have one light in the first level (directional light representing the sun) but make it spread across the whole level (I may add some flaming oil barrels later but using omni lights with a very small range). Then using Ogres compositor material frame work I have applied using high level shaders a HDR effect (need to go through and optimise / modify this a lot to get the right look still) to give the level a bit more life and stop it looking dull.

So next up, finish the second and 3rd levels off, this is really a simple case of adjusting what is already there, and adding some more npc’s, turrets and lights. Sound effects which need to be linked into the appropriate physics material systems, the support for audio playback using Fmod is already written and functional so this is more of a design issue than anything else. Sort the sky out so that it is a sphere and not a dome, beginning to get annoyed by the empty spaces under the level. After this it should just be a case of playing around with the artwork (I have no artistic flare but I can still try) and optimise both the code and the shaders (also rewrite / refactor a few and implement my normal mapping shader). Then it will be simply a case of bug fixing, tweaking game play. And overall polishing the front end and usability.

Posted by on 03/28 at 05:00 PM

I really enjoyed your article and found it to be very informative, keep up the good work,
I’ll be coming back to read any of your future articles.

Posted by china cell phones  on  10/23  at  01:05 PM

Fever Flava and Hot Action cop

Posted by Lipodrene  on  03/07  at  02:35 PM
Page 1 of 1 pages

Name:

Email:

Location:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?

Submit the word you see below:


Next entry: Portfolio: Michael Stowell

Previous entry: CV

<< Back to main