Personal Update
So the week before last, the puppies tore up the carpet in the living room and the linoleum in the kitchen. So last week, I spent almost all of my time laying Laminate Wood floors. I also spent time finishing up some "real" work code.
I got the living room floors down, but I still need to put the trim into place to cover the edges, and the kitchen isn't even started yet. I'll be taking a break from floor laying to focus on game dev so next week's personal update should be much smaller.
I think they look nice, but we'll see how they hold up to puppy destruction in the weeks to come.
Dev Update
Last week I said I would try to get some damage indicators up and health bars showing. I thought that was a very small and reasonable goal, but I was only able to put a few hours of time into development. During that time I stumbled across a few Unity gotchas (see below) and spent a little too much time chasing geese. I did manage to get some damage numbers floating up at the end of the weapon effect, but I didn't even get to touch the health bars. One out of two ain't bad for last week.
The video was probably unnecessary since I'm sure you can imagine damage numbers floating and fading out, but I'm wanting to get int he habit of weekly updates and I needed the YouTube practice.
The code is mostly clean, but I need to spend a little time with some simple refactors and more consistent naming. Now that I see all the moving parts, I can organize it a little better. This week I'm going to put in some more time on the Turn Based Combat: Combat Text, Health Bars, Destroying the dead ship, and more if time allows. Hopefully that's not too much to shoot for. I'll get better at estimating goals and delivering on my promises as I get more experience with Unity and more experience with full dev weeks.
Tips from your Uncle Eck
I stumbled across a few Unity (5.1.0f3) gotchas cutting into my limited dev time so I figured I'd share them to save someone else a headache. I might post a journal of Unity Gotchas and try to keep it up to date.
- The Unity Animation component has an issue with Text controls and animating the color (this may be an issue with all Unity GUI controls). I wanted the damage text to be solid red and then fade out over time, and it worked perfectly in the scene view/animation preview. But when running the Scene, the color adjustments never happened and it stayed solid red. I wasted a lot of time trying to find out what I was doing wrong. Eventually my google searches turned this up as an existing bug and suggested that color changes work just fine if you use the Animator component instead.
- Speaking of Animators... When you add an Animator component to a GameObject with the Animation component, you can no longer edit the details or preview the Animation component. I tried getting the Animator solution working for an hour or two, but most of the tutorials were just enough out of date where I was struggling with it. Eventually I got it playing the animation, but it still kept the solid color. Grrr. So, instead I came up with a workaround just exposed a public TextColor property animated THAT. Then in my Update function, set the color of the text to my variable that was changing and it worked just fine.
- And a small thing that I learned was that the GetComponentsInChild functions don't return inactive components/game objects by default. I didn't notice the overload so I wasted some time here. This is less of a Unity gotcha and more of a Learning Unity issue, but there you have it.
"puppies tore up the carpet" Puppies!? Must.... resist upppvoteee.... *click*