For future reference, previous optimization of pathfinding was writing and using a binary heap for the openList. Did a little more optimization by checking if the movement endpoint is actually walkable or not.
"The dwarves have slain the monsters inhabiting the tallest mountain and have embedded deep within it their fortified home. There, after endless refinement, they have recreated a legendary artifact of unfathomed power. The relic drives the dwarves mad with avarice, and news of their wondrous creation attracts trouble. Other races feel the draw of the artifact and lay siege to the fortress. Meanwhile, the gods frown upon such a presumptuous race, and ponder their divine genocide..."
Sunday, July 31, 2011
Thursday, July 28, 2011
Saturday, July 23, 2011
Perfected mapgen a little.
I think I'm going to make a 200 by 200 map as an overworld, and take chunks of it (probably 5x5) and derive 200x200 maps from those as actual working maps to play on. The current mapgen is pretty good for an overworld, and it's easy enough to adjust for the smaller pieces. This is mostly due to too much stuff that needs to be checked and drawn for maps larger than 200x200.
Bad pathing is definite starting to become a problem. Deer can't maneuver through the map very well now.
Still need to learn perlin well.
timber's been added, and similarly trees.
I think pathing needs to be fully resolved before I'll move on to combat, so this may take a while because I need to slog through a*.
About the month-long pause, got bored/busy with real life:
So, got lazy and implemented perlin noise from:
resulting in this decent looking map generation:
Some issues I need to think about:
- my fillermoving (not true A* apparently) pathfinding still isn't robust enough, probably I need to really implement A*
- how large the map needs to be: current 200x200 map with about 10,000 rock walls is a little laggy, but not too bad. I shudder to think what a 1000x1000 map with multiple AI and dwarves would play like though.
- what the map actually represents. Is it 1 dwarf per dwarf tile? If so, this map gen varies a little too hard and needs to be stretched
- actually learning the perlinNoise stuff implemented all the way through: I know enough of the basics but I'd like know it well enough to be able to tune it completely to my preferences/code it from scratch
- adding combat
- adding more items (just rocks and grass right now)
- adding more craftables/buildings (just doors right now)
I feel somewhat satisfied with the mapgen and the fact that I still come back to this and not be lost looking through my code. I'll probably be working on this a lot harder after this weekend.
Subscribe to:
Posts (Atom)