I'll be using this Tumblr as a devlog to track my progress on Bloodroot, my current video game project.

14th August 2013

Post

Update 040 - Square

In combat, spaces your characters are capable of reaching this turn are highlighted when those characters are selected.

Tagged: BloodrootUnity3Dprogramminggame developmentindie games

14th August 2013

Post with 1 note

Update 039 - Putting the “H” in A*

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.

Tagged: Bloodrootgame programmingprogrammingdebugging

6th August 2013

Post with 3 notes

Update 038 - UI APs

Got the APs to display on the UI. Woot!

Tagged: BloodrootUnity3Dgame programmingprogrammingngui

5th August 2013

Post with 4 notes

Update 037 - Fun With Game States

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.

Tagged: Bloodrootindie gamesgame developmentgame programmingprogramming

1st August 2013

Post with 3 notes

Update 036 - Gooey

image

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.)

Tagged: BloodrootUnity3DNGUIgame programminggame development

29th July 2013

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.

Working on deco stuff like gravel and hanging moss. I think I’m finally satisfied with the torch flames as well.

Tagged: BloodrootUnity3Dgame developmentindie gamesGame Art

27th July 2013

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:

  • Figures out where it should go and spawns it.
  • Finds the two walls next to it.
  • Spawns new walls with flat edges on the correct side(s) to replace them.
  • Reparents anything parented to the walls with the non flat sides to the newly spawned walls.
  • Destroys the old, now unnecessary walls.

And, of course, it does it all procedurally.

Second image: Particle embers!  :D  (They are more visible in game, when moving.)

Tagged: BloodrootUnity3Dgame programminggame developmentindie gamesprogrammingrh2logAsk and ye shall receive!

27th July 2013

Photo with 2 notes

Torches!

Torches!

Tagged: BloodrootUnity3Dgame developmentindie games3d modeling

25th July 2013

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.  :(

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.  :(

Tagged: BloodrootUnity3DGame Artgame developmentindie games

22nd July 2013

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

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

Tagged: BloodrootUnity3Dgame programminggame developmentindie games