Saturday, September 17, 2011

Refined pathfinding again (originally counted the initial square in movement)
Refined attacking for player (player will continously findpath to target, whether to add this for enemies is yet to be seen)
Added workshop functionality, terraria style (need to be close to workshop to build certain items)
Added command allowing player to attack NPCs, added drop and get commands, and cleaned up building commands.

Now pretty much ready to start to make functional buildings.

Friday, September 16, 2011

Added:

  • Everyone now has a damage rating.
  • Default enemies (goblins for now) now attack the player.
  • Significantly cleaned up player movement and digging. Integrated everything for transition to many dwarves. (commands all off of player and totalBehavior rather than separate and on game end)
  • Turn count is now shown, and apparently I'm running at about 60 FPS, so I think things are in good shape.

Thursday, September 15, 2011

Added a* pathfinding to NPCs, cleaned it up for NPCs, rewrote some of the flee behavior for deer, and added a generic enemy type NPC.

Enemy chases the player around!

Tuesday, September 13, 2011

A little cleaning of pathfinding just to make sure everything is fine and dandy.

Added zooming in/out.

Monday, September 12, 2011

Ok, I am the worst. Looking through pathfinding again and trying to see where I had spots I could optimize, I noticed that the closedList looked mighty big. Digging through it deeper, I saw that it had repeats, even though it's not supposed to. Turns out I forgot to exclude the closedList coordinates from my pathfinding. The pathfinding is now ridiculously faster than it was before, and doesn't even hiccup when moving across the whole 200x200 map. The good news is that after a month, I've finally gotten through the hard stuff and now can move to combat without worry; bad news is obviously that it took a month for me to figure it out (well, a few days if we count actual days thinking about it).

Sunday, September 11, 2011

Crawled through my pathfinding again to see if there anywhere I can optimize, but it seems like this is about it. If anyone has any ideas (I'm using a* with a binaryheap for the openlist) please let me know. It takes about 2 seconds to pathfind a decently complicated 50x100 space.

Reminder: I need to implement flood-fill passable check for different areas.

Anyways, I've gotten as far as I can for now with pathfinding and am dangerously close to getting bored. Even though I thought/think that speedy pathfinding will be the limitation for the game I'd rather move on to more interesting stuff.

Added:

NPCs dying when hitting 0 hp