Thursday, September 22, 2011

Development will probably grind to a halt for a while as I get through dota2, grad school, interviews etc. Check back periodically but probably not till 2012!

Wednesday, September 21, 2011

Added "fire" as a craftable item that repels wolves, but due to how pathfinding is specific to an exact coordinate, if that coordinate isn't movable to (e.g. a wall) the wolf just gets stuck.

Added "degrades" tag to items, so they expire over time.
"fire" has this tag, so you can craft it, repel wolves for a few seconds, then get eaten alive as the 10 wolves that are stuck around you get unstuck.

Also ran two stress tests:
200 deer all pathfinding at the same time: very choppy, but still runs.
Running for as long as it can: 30 minutes before the closedList of a pathfinding wolf threw an outofmemory exception, so I fiddled with that. Running it again as I post this (at 10 minutes right now).

Things I'm working on before it becomes a proper game: getting flee to work correctly for wolves, field-of-view to work correctly, tags for buildings/remaking the whole buildings thing, and then altars and gods.
Kludged NPCs together again.

Wolves are in, and are killing everything in sight pretty quickly.
Added day/night cycle.

Working on getting wolves working, but I'm having problems deciding how NPCs should work.

Monday, September 19, 2011

Changed options for spritebatch draw to make zooming not blurry and added oryx's lofi font (thanks to poemdexter for showing me how to do the first and for the reordered bitmap font!)

Added messages (you killed a goblin, chopped a tree, etc.) box at the bottom.

NPCs/Players drop corpses on death, and are added to a "dead list" (again, thanks to poem for this idea. For his roguelike he was thinking about necromancy/zombies etc.)
Added fog-of-war to the game.

From a design standpoint, I wasn't really sure what I wanted from a roguelike or DFlike in general. After playing a little minecraft and DCSS today I came to the conclusion that exploration is interesting, and having the whole map revealed though convenient, is pretty boring. This is probably intuitive to anyone reading this, but it's not really something I thought about until now. Anyways, have a screenshot:

Also, added saving of turns (will be used for weather, tides, day/night cycles, and seasons.)
Still need to add saving of HP, inventories, and now the fow map.
Also need to add a more functional fow (walls should block vision).

Saturday, September 17, 2011

NPCs and players can now drop things on death.
Saving and loading almost fully implemented (just need to add saving turns, HP values, and inventories).
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