So, I’ve got a sketch of the basic dwarf mechanics. They are very greedy. And, in fact, that part works perfectly! Those dwarves will run towards gold they can’t even see! That’s not really supposed to happen. It’s made worse by the fact that they might be able to see another dwarf through the walls, and explode.
Currently, what I have looks as follows. The red square is a dwarf, black squares cannot be mined, the dark gray squares are already mined. The brightest two squares to the left are unmined shinies. The sight of a dwarf is shown as the highlighted mined squares.
Well, seeing through the hardest material in game which can’t ever be mined is probably not a good thing. It sort of seems like it’s only taking the sight radius into account. The game mechanic just… doesn’t work without the sight algorithm working.
Other than that (which, thanks to the fact that my code is… “neat” is easily replaced. I just don’t have a replacement), things are going pretty well. I’ve got a pathfinding algorithm that works (it’s just A*), and I’ve got the dwarf movement code working (well… as long as the sight algorithm works).
What’s left for today:
- Fix the sight algorithm. It’s really important.
- Allow the player to place stuff.
- Make the stuff players place do bad things to the dwarves.
- Implement a money & score system.
- Make a help screen!