
Fun with gravityHaha! Man, it's such a beautiful thing when stuff comes together. I had a lot of issues getting this to work. Again, I'm suffering from my lack of math skills with this. I guess I should quit whining and just buy some videos from the Teaching Company, but thankfully I was able to find the formulas worked out by somebody else. Some copying, pasting, and tweaking, and viola! Gravity balls! I still have a long ways to go, obviously, but I think there's already enough here for you to give this a spin and see if it's something you'd enjoy.
Before getting into the multiplayer stuff, I thought I might make a little detour and have some target satellites, asteroids, or some such orbiting some other planets so that a solo player will have something to do. I need to add in a power selector. I won't make it too easy--my plan is to make every round complex enough that you won't just be able to shoot at the target directly, but will have to sling around the gravity wells to get your shots to hit.
I'm still wondering what to do about the camera. I haven't worked with it before (other than just setting up the initial scene, of course), so I'm not quite sure what would be the best way to go about it. As a player, I think I'd like to be able to click on a planet or a ship and then use the mouse wheel to zoom in and out. By default, the sun should probably be the center. I'll need to do some research on this part, but since it's such a common functionality I don't expect it to be very difficult to implement.
In the finished game, I want the balls to be little missiles that'll boost for awhile until they run out of fuel. In fact, I'm thinking that instead of having an initial velocity like a cannon, the "power selector" would really be the amount of fuel you put into a missile. As long as it has fuel, it will accelerate.
Maybe I could have a type of ammo that DID have an initial blast...like a cannon shot. You fire it once and it doesn't accelerate except by gravity after that. That could be pretty interesting.
Anyway, thoughts and ideas are of course appreciated.
Click here to see the game so far.