It is currently 6:58am. I can hear my roommate moving about and starting her day. The sun is still rising, casting beautiful light on the city that never sleeps. It’s the perfect place for me, clearly, because I never slept either. I was up working on HectiCube making the necessary changes to it to make it work on phones & tablets - it’s surprising just how much you may have to change depending on the game. I thought it would be really simple, but of course, what works in my mind will probably never work exactly the same in reality. For the most part, it was a smooth (but tedious) process of changing variables to suit the new portrait view of the game. I found that the game’s nature lends itself well to using one hand (maybe two with a tablet), and utilizing the portrait view simply just makes sense for two people using one device. Once all that was done, my next task was to change the control scheme for the game. When it was World Cuppong on the PC, it was just simple directional movement using WASD or the arrow keys and I used physics to make the characters move. Seeing as how touch screen devices have no keys, alternate paths had to be taken. I pretty much spent my entire night testing a few different ways to control the characters. I knew for sure that I wanted the player to have direct control over their character by tapping the screen and dragging them where they want to move them, I just wasn’t sure how to accomplish this.
At first, I had taken the code I used before and tweaked it so that if you pressed above the character, it would go up, below it, go down, etc… Well, that was a bust. The character would never stay still and kept overshooting where it was supposed to be going =/. Next I tried to make the character kinematic instead of using physics. This worked pretty well in terms of moving the character, but then I had an even bigger problem. The ball wasn’t responding how it was supposed to to the character. It was barely moving at all. Eventually my friend Audley said that because I essentially disabled the physics on the player, it wasn’t adding any force to the ball thus making it not move at all. Thanks to Google however, I found out how to essentially “Lerp” but with velocity. Problem solved. Another issue I was having was figuring out how to make the device register touches on both sides of the screen without them interfering with one another, but I gave up on that after a while and decided to focus on just the character movement. I guess I’ll go back to that next.
Mobile development is a whole different beast from on the PC, but I accept the challenge, and I will slay it.