I’ve been working a lot, lately, trying to get everything ready to go for Game Wars. We’ve fixed many of the UI bugs. I added my own class to take handle the balls friction in the game, because Unity’s friction wasn’t satisfactory. Either the ball would slip and slide everywhere, or there would be no conservation of momentum around a turn at all. I tried a number of different solutions, some more accurate than others. What I settled on was completely separating friction from torque. Normally, you would apply friction at the point of contact, but here, I applied it on the center of the object, based on the “best” contact, then applied torque to make the ball roll based off the relative velocity. So now, regardless of how slippery it is, it actually can never slide.
I changed the level intro system quite a bit. It used to be, the camera just spun around the ball and zoomed in to it’s final position, which took about a second and a half. Some people at the Utah Indie Game Night last month suggested that I use the intro to somehow hint at where the player was supposed to go. What I tried first was setting up a series of markers, then interpolating between their positions and rotations. That didn’t work. It wasn’t at all smooth, and Quaternions are weird. Despite the fact that I was interpolating between two correct rotations, it would still sometimes do a weird flip to get there. Second thing I tried was setting up animation curves with those same values. That solved the smoothness issue, but not the flipping one, also it felt really arbitrary, slow, and really stupid. So what I ended up doing is placing the camera’s handle (I always have the camera parented to an empty object, essentially giving me a manipulable pivot I can rotate around and do stuff with) at the center of the level, placing the camera well outside the level, and just slowly spinning the camera around it, until the user presses a button. This allows the player to study the level for as long as he/she would like, it doesn’t feel slow or dumb, and the player can cancel it at any time, so it’s not annoying, and as an added bonus, it doesn’t take any per-level set up time.
I also tried adding rumble. A little while ago, I was showing one of the old builds to a friend, because it had the prototype levels in it, which were way too bloody hard, and that build had rumble in it, and I had forgotten how much I liked having it in the game. However, I had to update Unity a while back in order to get rid of some random crash, and apparently sometime between that update and the one I was running previously, plugins became a Unity pro-only feature. To get rumble into unity, you have to use a plugin, found at http://speps.fr/xinputdotnet. But apparently, you can’t do that with unity free now. Hopefully they totally re-vamp unity’s input class, then. I guess that gets put in the “maybe this is something we can do eventually” bucket.
Lastly, I’ve been working on a new background for the first world. It’s a city. I’ve found a backdrop that I can use, It took me a good while to actually make it a 360 degree panorama, but it should work. I’ve been having some trouble, however, doing the foreground… of the background. Cities are hard to make. It doesn’t look like I’ll be able to finish it before the 25th though. But, I do have an idea for something I can replace it with in the meantime that shouldn’t look too bad, and should address the disorientation issue.