When the Walls Fell
I finished the walls today. I also made them destructible. There are still some path-finding based lag, but I suspect that will go away once the humans have tools/talents that prevent them from taking certain jobs. I also still need to make the closest guy take the job, not the first to act.
I’ve also made floating items fall and die if they reach enough damage.
I haven’t made a build in a while, so here is a new one. Much more refined from the last build.
Total Time: 61 Hours.
Time Today: 2 Hours.
Smoothing the Rough Edges of Society
I realize I don’t seem as productive as I was when I started this project. I’m not always going to be as free or as energized as I was when I started. However, today I spent time smoothing the map. I used a simple cellular automaton.I did 3 passes where the rule was: If 6 of your neighbors are not at the same height as you or greater, reduce your height by 1.
The result is a very smooth hilly map with some potential for cliffs, however overall it looks more like the Cumberland Valley and less like the Alps.
Additionally, I finished fixing A* so it would take into account ramps. However, there is still no location awareness with what guy get’s what job. I will have to rework some of the system to make this viable.
Total Time: 59 Hours
Time Today: 3 Hours
When the Walls… Were built?
Been a while since I’ve worked on anything. Haven’t been feeling well (allergies) and just have not felt up to working on Mythic Castle. However, I did get some work done today. Not a lot, but some. I laid in the ground work for getting wall building in. I had to rework some of the XML and I may still have some more ground work to do yet. Namely, there needs to be a way to select the type of material to use in construction. Once I have that, it should be generic and used for all other ‘select a thing’ requests to come.
I will also be removing the dropped items from the map. They will instead go into a coffer list. In this way, I’ll be able to do away with the most annoying aspect of Dwarf Fortress: Stockpiles. Instead it will function much more like an TBS/RTS. Think how specific trade goods/resources are handled in Civilization.
Total Time: 56 Hours.
Time Today: 1 Hour.
A-Star Revisited
I’ve spent today trying to get A* to understand ramps. And failing.
Total Time: 55 Hours.
Time Today: 1 Hour.
Mouse Selection
I added mouse selection to the game. This lets you designate things for:
- mining/digging
- foraging
- floor removal
- lumber-jacking
More will, of course, follow soon. The same tool will also be used for construction. This a kind of fast-track for the same interactions you can take on individual entities in the map.
New builds. This time a mac build, just for you, Ron.
Total Time: 54 Hours.
Time Today: 2 Hours.
Been feeling under the weather
I haven’t been feeling well the last couple days. I expect to get back to work sometime this weekend. On the up side the fellow I want to do the art showed back up. :)
It will be some time before that is all ready. Look out for it. :)
Help: Lost Pixel Artist
Too tired to work on the game today. Also, the guy I had hoped to do the pixel art is MIA. He just stopped responding to my emails.
I hope he’s ok.
Pathfinder
I’ve accomplished more today than I set out to. Which is great. It is starting to feel like a game now. Download it and check it out!
- You can designate a Shrub, Dirt or Stone wall or floor for removal
- If it is accessible, a human will pick up the job
- He will then move to the job site
- He will then perform the removal
- Removal of Shrub or Stone may produce useful byproducts: Berry, Leaf, Stone.
However, there are still some bugs
- Pathfinding doesn’t take ramp placement into account, so doods walk up walls
- Sometimes humans will have their tile appear on the wrong z level, which makes no sense at all.
- Sometimes the game get’s very laggy. It might be long pathfinding
- A human is chosen for a job if he can perform that job, not if he is the closest one who can perform that job. This leads to a guy standing right next to a job doing nothing while his friend from across the map comes over to do it.
- Once a path is made, new obstacles are walked-through rather than encountered and re-pathed around.
Total Time: 52 Hours.
Time Today: 4 Hours.
A-Star Fixed
Figures it would only take me 1 hour to fix A* this morning. I added a visualizer to the mix, it drew the path as it computed it. Went straight for the goal, but because of a bug at the end didn’t escape out of the loop. So it proceeded to expand around the goal in a sphere. Once I saw that, I knew what I did wrong and was able to fix it.
So it went from taking 3 minutes to calculate a path to taking tenths of a second. Yay!
This isn’t today’s post. I just felt like celebrating!
A-Star to the WTF
I’ve spent 6 hours today trying to get pathfinding to work in Mythic Castle. I mean. It does work, but it wants to search a big growing sphere to try to find a path. Which if you know anything about how A* should work; is wrong wrong wrong.
It sorts the list of open items by F, which is G + H (total ground covered + The linear distance to the goal * 10), and those values are all correct. But then somehow it ignores the sorting and just runs down the list in an expanding shell around the starting point.
The end result is a path that takes ~3 minutes to compute. Considering that’s about 30 times longer than it should take the guy to walk that path, this is a big problem.
I’m done for the day. I’m sure I’ll figure it out tomorrow. Otherwise I’ll start researching other pathfinding techniques that might be more suited to a map with as big a search-space as Mythic Castle’s.
Total Time: 48 Hours.
Time Today: 6 Hours.
On the plus side, I’m going to see The Adjustment Bureau tonight.