Sunday, May 24, 2009

Plague pathfinding

I added pathfinding to Plague last night (Eli Bendersky's python algorithm - thanks Eli), so survivors and zombies can be a whole lot smarter. It'll take a little while longer to re-engineer the AI to take advantage of that, and then I'll post a new release.

Sunday, May 10, 2009

Plague 3.32

  • Game mode system is now functional - allows the user to resume games (eg: after going back into the options menu). 
  • Improved survivor graphics from Sean Lange.

Friday, April 24, 2009

Plague 3.31 update

I fixed the mem leak, but I didnt add the cleanup code to the game, just the test environment (Whoops!). This release of 3.31 removes the major mem leaks from the battle scenario as well.

Thursday, April 23, 2009

Plague 3.31

  • Fixed mem leak
  • garbage collection debugging code added by Droid - thanks!

Sunday, April 12, 2009

Plague 3.30

  • Changed shadowing algorithm - removed artifacts, nice clean code
  • bugfix: shrubs now leave behind burnt shrubs when burnt - not sure when I broke this
  • bugfix: AI sims try to pick up guns (again)
  • bugfix: AI sims now switch weapons if they run out of ammo (again)
  • tidied for world.add_sim so that force is used where appropriate, and other checks removed
  • added a key (j) so you can see the new shadow maps - I think they are kinda cool  (and they were good for debugging) .

Saturday, April 11, 2009

Plague 3.29

This is a minor bug fix for the current shadowing algorithm to remove some pretty common artifacts. It would be possible (and easy) to make sure there are no artifacts by blindly recalculating everything from scratch whenever something changes, but thats computationally expensive, so I have tried to do something more selective but this can (and does) lead to artifacts. In doing this and accounting for all the weird and wonderful things that can go wrong I have learnt three things:
  1. The code is becoming ugly due to all the checks
  2. There are an arbitrary number of things that can go wrong, so there will ALWAYS be artifacts
  3. A fundamental re-design is required somewhere
I have decided on the redesign. I can change from using "sets" to "dicts" to store shadow info and this should lead to no artifacts (by adding shadow "depth" to each square instead of just seeing if it is in shadow). I will start coding that up now, but I thought I'd put up a minor fix to the current shadow algorithm.

One of the neat new things that shadow depth can do is differentiate between "completely visible" and "completely occluded", so Plague will be able to have things like smoke/bushes that gradually blocks LOS. Thats going to be pretty sweet. 

It's actually been really good having these artifacts since it never would have occured to me to come up with this new implementation if I hadnt had to tackle them, and Plague likely never would have gotten partial occlusion. I was chatting with Tom Forsyth a few months back and he asked me if Plague could have partial line of sight through shrubs, and I said it would probably lead to spaghetti code (which is what I have now anyway due to artifact removal) or a redesign (which I wasnt keen on since I had no idea how to redesign it better at that time) and so I stored that idea in the "too hard basket". It's funny how things work out. I'm also now wondering if my new "additive" shadow solution is fairly well known to the games industry... anyone know?
  • Changed the way the game checks for the addition and removal of shadows. 

Friday, April 10, 2009