2015 was mostly a failure

Maybe the title is a bit strong. Maybe 2015 wasn’t really a failure, but it was disappointment. I wanted to be done with Eggs vs Humans, but it’s obviously not done (you would have seen a post or two about that!)

I made the decision to switch from Flash to Unity, as it seems Flash has less and less of a future. (Adobe’s recent “Flash killing” is overblown, but they surely see the writing on the wall.) In February, I got started on Unity 4.6, blissfully ignorant that 5.0 was right around the corner. Of course, when 5.0 was released, I made the leap right away…hey, after all, I’m a beginner, right? Not too much to unlearn if needed.

Learning how the engine worked was steady, but slow. A lot of the problem this year has been my job. Of course, it keeps me fed and such, but its taken so much of my energy. Being a co-owner of a small company that has too much on its plate means long hours and a handful of nights without sleep. My overall health has taken a hit…my wincing arms and pounding head have been telling me “YOU NEED LESS TIME IN FRONT OF THE COMPUTER!” and “inb4 carpal tunnel, scrub”.

Yep, this could be my hands after carpal tunnel surgery sometime in 2016.

Yep, this could be my hands after carpal tunnel surgery sometime in 2016.

But when both work and fun are computer-centric, what do you do, right?

Over the past few months, I’ve been forcing myself to make time for Eggs vs. Humans. There was a big gap during the year where I didn’t work on it at all. While I’ve worked many weekends on the game, there have been some agonizing delays. The biggest problem had been animation.

Unity’s Mecanim was painful and had weird side-effects.

In the Flash version of Eggs vs Humans, I used spritesheets to animate the units. It didn’t turn out badly at all, but the lack of smoothness is noticeable. Deciding to take advantage of moving to a new engine, it make sense to see what Unity was capable of.

They introduced this new “Mecanim” system, which seems to be over-engineered for what Eggs vs Humans needed. Hopefully for Unity developers, it is much more suitable for 3D games. I did not run across any 2D developer that wanted to use Mecanim.

It became a bit more convoluted for units requiring 7 or 9 states....

It became a bit more convoluted for units requiring 7 or 9 states….

Until recently, I had no suitable method for importing Spriter to Unity

Spriter is a 2D animation program which I’d used to create the spritesheets. And I figured there was some way to import Spriter animations into Unity.

There’s no “official” method, and some community members made attempts at an importer. Spriter2UnityDX mostly worked well…I’d imported the Cannon Fodder animation and it looked perfect! I only needed to write a bit of custom code. For weeks, I only bothered with using the Cannon Fodder and Rum Guzzler during development, figuring the rest of the animations would work just as well.

By June or so, I was eager to import more units. The Bacon Boxer looked mostly right, but one of the eyes seemed to be “off”. No big deal, I could fix it later. Then the Couch Potato and Roller Blader…oh my, why is the Couch Potato’s head detached from the body?

It turns out, there was a one big issue for me: Spriter2UnityDX doesn’t support sprites with custom pivot points. And a review of the rest of the animations showed I did use custom pivots for most of the units…

It would have been a LOT of work to change all the units. Off-and-on for weeks, I tried to figure out the math and adjust the code. I eventually did get the sprites aligned properly…for the first frame only! The animations would not work. After a couple more weekends of frustration, I gave up and moved on, hoping the original author would add the feature or someone else would write a solution.

loodakrawa is my hero

Luckily, tt turns out this year someone named loodakrawa had been working on his own solution: SpriterDotNet. This worked like a charm. I made a few edits to handle coloring of the units…this guy did an amazing job.

Now I feel much more comfortable with Unity overall and my biggest hurdle is cleared. I’m at a state where I’m able to make relatively rapid advancements and improvements.

What’s next?

Before the year’s out, and hopefully next weekend, I will post the first new build from Unity! Web and Windows will both be available. (I would have posted a build today, but there’s some issue with an object not initializing or storing data as expected)

There are still features from the latest Flash build that won’t be available in the Unity build…only 5 units per side, no scouting missions, and only up to Easy AI. But those will come with time. I plan to restore one unit per side per week. There will be some tweaks to improve gameplay and balance, and I’ll post these thoughts as well!

You'll get to choose the color of your units! Neato!

You’ll get to choose the color of your units! Neato!

Leave a comment

Your email address will not be published. Required fields are marked *