• entries
    42
  • comments
    139
  • views
    50836

Floating Combat Text and Hardwood Floors

Sign in to follow this  
Eck

1323 views

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. angry.png 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. smile.png

Floors1.jpgFloors2.jpgFloors3.jpg

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. smile.png

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.

  1. 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.
  2. 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.
  3. 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.
Sign in to follow this  


2 Comments


Recommended Comments

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

 

Y.E.S.

and it sucks balls :(

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now