Monday, March 10, 2008
Frame Rate & Crashes Fixed!
Well, the huge drop of the frame rate seems to be caused by using more than one thread since the frame rate went back to 60 fps once I moved all calculations to the main thread and removed the AI thread. So now the game runs at rather nice again. By removing the AI thread I also removed the remaining bugs as they only occur when the threads where writing and reading certain variables at the same time. There is however another bug I’ve noticed witch causes random projectiles to spawn and move at random locations, this new bug only occur when there is more than one AI agent activated and one or more of them have died, so I guess that they aren’t stopped correctly, but at least this bug doesn’t crash the game. :)
Due to the result of this fix I can now activate all available AI opponents without risking to reach a frame rate below 10. But I’ll need to adjust their behavior so that they’ll actually do what they are supposed to do and to allow them to target each other instead of locking their choice of target to the player (to avoid unfair 3 vs 1 fights).
Here’s a picture of a 3 wizards vs 1 wizard screenshot:
![]()
(Green, Purple & Orange vs Blue(Player))
Once I’ve finished the last two ranger sprites & the 4 knight sprites I’ll be able to take screenshots of more variating battles where the other’s ain’t represented by white squares.
I’ve also changed some timers to avoid unnecessary updates of AI / Player to ensure that the frame rate stays at 60 fps (witch is the highest fps allowed as I’ve caped it there).
As the bugs and frame rate issues are fixed, I can now continue with the game.
I’m closing in on the minimum requirements specified in the design document but as I’ve already added a little more than what I first chose as minimum requirements (more than one class etc) I’ve now set a slightly higher minimum requirement for the game.
Thing’s left for the new minimum requirement:
- AI:
- AI Flee State
- AI version of the Curse effect
- Include Traps, Snares & Players for the AI map (I might skip traps & snares for the AI map though)
Game Play: - Weapon effects for the three last weapons (Force, Throw Object & Trap Object)
Graphics: - Last two basic Ranger character sprites
- The four basic Knight character sprites
- The four basic Knight weapon sprites
I won’t be able to add sound, more advanced AI and other wanted extra features before the MS 3 delivery due to lack of time, but I’ll try to add as much of them as possible after MS 3.