
In combat, spaces your characters are capable of reaching this turn are highlighted when those characters are selected.
Post with 1 note
So, I’ve had a few days off from working on Bloodroot, but last night I got back to it and I noticed an odd thing: in some very specific situations, my A* method wasn’t giving me the shortest path. I immediately suspected a problem with my heuristic being non-admissible. Here’s how I went about finding and fixing the problem:
Bloodroot uses 8 way movement (you can move in the four cardinal directions and the four diagonal directions) with each space costing one movement point. That means that moving diagonal costs the same as moving orthogonally, so depending on how the function deals with equally costed options, the path may end up with some janky, zig-zaggy movements if it picks a diagonal move when an orthogonal move would have made more sense and looked nicer but remained the same cost. To deal with this, I added a check to add an additional amount to the H value (the heuristic estimate of that space’s distance to the target space) for spaces which would be entered diagonally.
But as I tried to locate my bug, I noticed that if I changed the additional amount to anything less than the full cost to enter a space (essentially doubling the movement cost for the space) it would still revert to zig-zagging in some situations. So I added a bunch of debug code and went through a case which I thought should work perfectly but didn’t. I went through it step by step and found the problem code.
The issue turned out to be in how I was determining if a space was diagonal or not. When I had the space on the closed list I was working from, I would look at each of its neighbors and if they were diagonal to that space, I would add my additional value. But what I needed to do was check to see if they were diagonal to their parent space, which might not be the space I was currently working from. This meant that some spaces which needed to be thought of as diagonal were sometimes finding themselves to be orthogonal! I was pretty pleased to locate this error and it actually helped me get my brain right back into programming after a few days off.
Post with 4 notes

We now switch back and forth between Exploration Mode, in which characters can move any distance at any time to Turn Based Combat Mode when enemies appear or are eliminated. I spent some time consolidating things I had done earlier in various places into a central game manager script to keep everything nice and tidy. Next up, I’m integrating the actual combat mechanics.
Post with 3 notes


UI working using the NGUI plug-in. It is soooo much better than the built-in Unity3D GUI system. It is faster, easier to use, and has lots of stuff already created so a lot of it is drag and drop. I had the basics figured out after one two hour sitting with it. (PS, that’s good I think, since I don’t really consider myself to be a programmer.)
Photo with 1 note
Working on deco stuff like gravel and hanging moss. I think I’m finally satisfied with the torch flames as well.
Photoset with 1 note
First image: So, the bricks popping out or not filling in around doors was finally starting to bug me enough for me to do something about it. Now, when a door needs to be spawned, the script:
And, of course, it does it all procedurally.
Second image: Particle embers! :D (They are more visible in game, when moving.)
Photo with 2 notes
Columns textured, and a new rim-lit shader for heroes and enemies to help make them pop from the environment. I also spent some time with the Decal System from the asset store - really good for a free plug-in, but not so awesome for me as there is no transparent decal shader that works with real time shadows. :(
Photo with 4 notes
Back to Unity! I integrated my previous character and enemy scripts into my dungeon generator level, cleaned up a few bugs, and here we are: everything I’ve already done, working together like a big happy family. I’ve still got more hammering away to do on my combat design on paper before I start programming it in, but don’t worry, there’s still PLENTY to do in Unity in the meantime. Maybe I’ll start working the UI next? Or I’ll hit some of the million little things I need to tweak and fix. :D
Page 1 of 5