Greetings all my super awesome followers of Giggle Horse! This is another blog where I talk about the tools we are using in the development of our point and click adventure game Absolute Zero, as well as many other adventure games to come. If you haven’t been caught up on this, here is the sequence of blogs thus far detailing how Legend and Cortex came to be:
In this blog however, I will be covering how the Legend plugin for Cortex allows for dynamic scaling and animation to be synchronized. Now you ask, “What the hell does that even mean?”. Well in a nutshell, think about this. When a character in an adventure game is close to you, they are larger on the screen. Which also means that when the take a step, they travel further. So when the character on a the screen is further away, their steps are smaller and they travel less distance (on the screen that is) than a character up close, in the same amount of time. Here take a look at this.
So you can see above that as Sammy gets closer to the to you (on a 2D screen) her stride gets longer because she is bigger. So Legend also has to increase her velocity so that she moves a greater distance with each stride as she gets closer. So for the Sammy that is the furthest away, you can see that her stride (and therefore her velocity on screen) is about 1/4 it is for the Sammy that is closest to you. Legend takes care of this with all characters and objects dynamically. Even if the velocity of the character itself increases or decreases; say from a walk to a run, Legend automatically adjusts for screen velocity based on the “perceived” distance to the character.
So if you know something about mathematics, the velocity vector of an object in 2D, or 3D can be calculated using Sine and Cosine. Here is an article I wrote just a little bit ago (literally decades) covering the math involved with moving something on a computer screen. Take this, and add it with scaling, and you have dynamic scaling! 2D Motion by Randell Trulson
The 2D position of something on a computer is an inverted Quadrant of the Cartesian plane as shown above. It can get confusing, but if you drink enough beer it straightens itself right out!
Okay, enough about the boring ass math and back to making Legend make characters move.
So after figuring all that out. I needed to make a test character. However, I didn’t want to spend a lot of time making a character with a full on walk cycle and all that if it wasn’t going to be used for an actual game. So…I took a CAT rig from 3DS Max, chucked a walk cycle on top of it, colored the rig itself blue, and then gave him the name of Blue Berry 😀 So here is the initial stand / walk cycle for the character affectionately known to us as “Blue Berry” So, here is the first walk / stand sequence from Blue Berry which is used to see how the dynamic scaling algorithm worked (or not).
Cool eh? So after making Blue Berry to a fair scale with the animation sequence needed for the test game in 3DS Max. I added some color to “Norman’s Scene”, if you remember from the previous blog, and chucked Berry into that. And…..Poof! Like a super happy dumb fun game fairy, it all worked! Check Berry out! He can actually scale his size, and velocity, and walk around stuff!!!! Super dumb cool. So here Berry is running around Normans seen. Oh, with color! See how perfectly his feet match how fast he is walking, regardless of his scale? No more moon walking characters for us baby 🙂
So stay tuned until next week, where we release “Dave’s Diner”, the first prototype game from Legend Starring “Blue Berry” as Dave!Follow us on your favorite social media sites: