Tuesday, May 21, 2019

Animation

So you might have noticed that v0.0.8a's animations weren't exactly well timed, and that wasn't coincidence. In my rush to get something out in time for May 17, 2019, I had to scrap something together for animations that didn't betray the internal engine I made for Spacemind. In doing that, animations could not be...well...smooth.

I really struggled over how I could have 100% smooth animations and still get the timings of all the internal workings to fit in. The problem in a nutshell is that the game's internal timings can't run too fast because the internet has lag (and we want billions of people to be able to play together on other sides of the planet). On the flip side, we can't have the timings too slow, or players will start to notice input lag, which could be frustrating in player vs player situations.

Between smooth animations, no input lag, and making Spacemind global MMO-friendly, I felt overly constrained and didn't see a solution. Fortunately, I know an engineer that I've worked with in the past who's helped me out of many a bind in many different industries and situations, and she did not disappoint, even though on paper, this should've been greek to her. After about 10-15 minutes of laying out the entire technical problem, she was quickly able to tell me why I was an idiot and how I had to do things in order to get smooth animations 100% of the time with no jumping at all while also having no input lag and still being global internet-friendly. Granted, her solution strains the client's computer a bit more than I'd planned on doing, but I had to admit it was doable.

And so that's why I decided to scrap nearly all of Spacemind's architecture up to this point and start over. Most of the guts of my code will survive this change, but it made it clear that I have to always start from the global MMO perspective when I design and code this thing, or getting this delicate balance between so many competing factors will fall apart later on as the codebase grows, and we can't let that happen.

And so from there, I resolved to completely figure out the networking side of things before any more single-playerish features could be added to the game.

No comments:

Post a Comment