Friday, February 10, 2017

TOE week 24: Hmmmmmm needs more dinosaur



I did something amazing this week. I finally figured out what was causing my inconsistency and it has nothing to do with how bad I probably am at coding. Or might have everything to do with how bad I am at coding. 

I have a laptop tray. Don’t worry I didn’t waste any money on buying one. This tray originally was for my son’s old baby chair that he has grown out of. It is wide enough that I can use a mouse on. Yeah I’m an old man I need a mouse to use a computer. If you can enter values in Unity or model in Blender better than me with a track pad great on you. I’m still a dinosaur. Last night I was trying to squeeze one final animation onto the player. As I started I noticed that my mouse wasn’t working. Whoops forgot to plug that in, did so. Worked on the last animation, ran the game walked into one of my push boxes with an up vector and the player remained on the ground. “DAMN IT! Why does this happen on a weekly basis?”

 I looked at my laptop battery. My computer wasn’t plugged in must have forgot that too. The game was still running. I thought about how laptops run slower when not plugged in to conserve power. I looked at the player standing in the push box that should be pushing them upward. ‘I wonder what would happen if I plugged this thing in…’ Did so and damn that push box did toss my player up into the air. My secondary weapons started working normal again. The background no longer jittered. It was liked suddenly everything that I hated about my game that I couldn’t fix just needed more power. Like the kind that comes out of the wall from dead dinosaurs.  

SWEAT! It is not my fault. It is a processing thing. Or maybe it is entirely my fault… If I ever manage to finish this here thing would it run differently on different machines? Should I cap the frame rate? Wait I have no clue how to do that. This is probably the smallest part of my accomplishments this week. I basically found out the WHY of this problem 15 minutes before I went to bed yesterday.

 The rest of the week was spent attaching animations to the player. Now it looks even MORE like a game. I had to build a player state monitor in C#. If the player’s Y vector is positive display the jump up arc animation if it is negative display the jump down up arc animation. Isolating all of the various things my player can do and figuring out of to actually use that confusing Unity graph was a chunk of work.

On Monday I started a new fresh project dedicated to only animation. I set up a detailed tutorial online about how to animate in Unity. I got Megaman X running with a sprite sheet.  When I pressed the right arrow he ran and he went to idle when I hit the left arrow. STUPID SIMPLE. Breaking it down into its most simple components allowed me to understand how I could integrate it with my must more complicated project. I managed to get 14 of 15 different animations set up and MOSTLY working. There are some tiny problems. Like the player’s actual attack spawns before the animation plays. BUT hey the animation still plays! Also the attack animations end abruptly and I can’t seem to convince the graph to let me hold an animation’s last frame. So the functionality is not fully there but it is almost correct. 

And I almost forgot to mention that I managed to put down some art on the edge of the player’s portal to give it a more rounded and energy portal look as opposed to a window. This art also color cycles, it kind of pulses between colors. Overall this last week super productive I got a lot done and found answers to something that had been plaguing my work. 

I know that last week I promised a video showing off just how all of this is working BUT I think I have to wait another week. Maybe after I get that last animation working. Next week a video and I will have to finally make some textures so I can really show it off!




No comments:

Post a Comment