When designing a game, there are many factors to take into account before you should even set out to write your first line of code or draw your first image, but one of the most important factors when it comes down to it is understanding how to do its controls. As for those following the Daily Reaction crew of Seb and Dan’s building a game feature, you will know that we have been stuck on the most conceptually simplistic ideas of control and this week we might finally have found our answer.
Dan: Last week was really an eye opener for both of us, starting out, we developed a decent concept for the game fairly easily, something that was feasible (given our lack of skill-sets) and interesting all at the same time. The only real issue came down being able to get the main character to control somewhat like we wanted, and that became our first really big hurdle, especially establishing rotation that felt dynamic but realistic for our evolving mechanics.
Seb: Yeah, we simply couldn’t work out how to make a game that rotated a certain amount and then stopped. It would either not rotate or spin round and round and round. We tried Clamps, we tried EulerAngles, we tried turning it off and on again.
Nothing worked, we needed to try a different, uh, angle and change what we were actually doing.
Dan came up with a plan to have 2 other objects in front of the game character (one in front and up, and one in front and down), with the character looking at the top object when it moved up and at the bottom object when it moved down. That way, we got it to rotate as it looked at the objects, and it meant it would never rotate too far.
But it still didn’t look right – the character would jerk suddenly when you moved from up to down (or vice versa) as it would look at the different objects and near-instantly change its focus. Something was still wrong.
Dan: Yeah, and as much as it pains me to say, Seb came up with a genius idea of only using one ball. While it may seem simple in concept, the idea’s simplicity solved a number of other problems, leading to the rotation actually looking smooth and never straying too far from where we wanted it too.
Basically, the concept was to have the focus of our object (character) follow the movements of an invisible ball or object in space that traveled faster but within a specific range. This allowed the rotation of our object to fall only within the parameters we wanted, but to also allow an almost Sin wave motion for the rotation at different points on screen.
Simple, elegant and probably going to bite us in the ass later.
It’s great, after last week’s depressing roadblock we’ve made a significant breakthrough that puts us that one step closer to releasing this to you dear readers. Plus, with all the fiddling and concepts we made, we actually came up with an extra game mechanic that hopefully will make our game all that more enjoyable.
That’s really what we’re hoping to find out in the coming weeks. We want to create a working ultra-basic version of this game that we can use for balancing, tweaking and to simply see if the game is actually fun when it’s not just being played in our head.
Of course, to get there we still need to work out a bunch of things including collision detection and GUI, not to mention all the actual artwork, level design and interesting gameplay mechanics…. but it’s best not to think of that just yet.
What do you think of Dev Diary? Have you ever just followed a ball to answer all of your questions in life? Can you rotate on command? What obstacles in life have you overcome with simple outlooks? Let us know in the comments, email us at [email protected], or by tweeting us images of your favorite ball to Seb and Dan.