I’ve been working on a game and this is just a quick update on how that is going.
I rigged up a control scheme that let me roll a ball around using Unity physics. That part is pretty simple since all of those systems, the physics and the input handling, are built into the engine. Next I set up a camera that would follow the ball. This is also not too difficult since cameras and their basic controls are also built into unity. It only got tricky when I tried to use my physics based control system along with my following camera.
I set up the controls in the simplest way I possibly could, which I think is the only way any game feature should get implemented. I took the value sent from the left thumbstick on a standard gamepad and translated that into physics forces on the ball along the horizontal plane. Pretty simple right? I could move the ball around, but only if the camera stayed directly behind the ball. As soon as the camera lagged a little left or right the entire axis of motion would be different from what your brain expected. To fix that I needed to make the input relative to the camera and not the world or the ball object. Less simple, but not much of a problem. Computers are really good at solving math problems as long as you input the problem properly.
Now none of this is anything new for games, and it’s not even new for me. I knew this would be an issue that would take some tuning right from the start. That’s why I prioritized the feel of movement and camera. It was always going to be something that was going to take some work, and I will be adjusting and changing it all through this project no matter what I do. As a result, the first few iterations were not great, but the potential was there with only a few tweaked parameters and a few lines of code.
Since then I have tested and adjusted the basic control many many times. It’s getting much closer, but I know that I’m still not quite done.
After basic movement, I needed to create a place to move in. At first that was just a large flat plane with a few boxes sticking out of it. Next it was a sort of hot wheels track snap together set that included curved and straight pieces. After that it was those same track pieces with banked curves and quarter pipe ramps around bowl structures. Now I have surfaces that can curve in any direction and ramps that can kick the ball high up into the air if you hit them with enough speed.
I have just barely started dealing with proper collisions between your player controlled ball and other balls in the world, but that is moving along better than I had expected. I am still having issues with gravity not really feeling right, but I tweak and adjust it all the time.
Like any large project, I keep breaking it into bite sized chunks that I can wrap my head around and I deal with them one at a time. So far that seems to be working, but I do wish I could get the gravity problem solved sooner rather than later, because I would like to have more people test it with some good feeling gravity. I don’t think that is asking too much.
I rigged up a control scheme that let me roll a ball around using Unity physics. That part is pretty simple since all of those systems, the physics and the input handling, are built into the engine. Next I set up a camera that would follow the ball. This is also not too difficult since cameras and their basic controls are also built into unity. It only got tricky when I tried to use my physics based control system along with my following camera.
I set up the controls in the simplest way I possibly could, which I think is the only way any game feature should get implemented. I took the value sent from the left thumbstick on a standard gamepad and translated that into physics forces on the ball along the horizontal plane. Pretty simple right? I could move the ball around, but only if the camera stayed directly behind the ball. As soon as the camera lagged a little left or right the entire axis of motion would be different from what your brain expected. To fix that I needed to make the input relative to the camera and not the world or the ball object. Less simple, but not much of a problem. Computers are really good at solving math problems as long as you input the problem properly.
Now none of this is anything new for games, and it’s not even new for me. I knew this would be an issue that would take some tuning right from the start. That’s why I prioritized the feel of movement and camera. It was always going to be something that was going to take some work, and I will be adjusting and changing it all through this project no matter what I do. As a result, the first few iterations were not great, but the potential was there with only a few tweaked parameters and a few lines of code.
Since then I have tested and adjusted the basic control many many times. It’s getting much closer, but I know that I’m still not quite done.
After basic movement, I needed to create a place to move in. At first that was just a large flat plane with a few boxes sticking out of it. Next it was a sort of hot wheels track snap together set that included curved and straight pieces. After that it was those same track pieces with banked curves and quarter pipe ramps around bowl structures. Now I have surfaces that can curve in any direction and ramps that can kick the ball high up into the air if you hit them with enough speed.
I have just barely started dealing with proper collisions between your player controlled ball and other balls in the world, but that is moving along better than I had expected. I am still having issues with gravity not really feeling right, but I tweak and adjust it all the time.
Like any large project, I keep breaking it into bite sized chunks that I can wrap my head around and I deal with them one at a time. So far that seems to be working, but I do wish I could get the gravity problem solved sooner rather than later, because I would like to have more people test it with some good feeling gravity. I don’t think that is asking too much.