An Unfinished Game: Orbital Mechanic


TrevorBradley

Active Member
Joined
Nov 6, 2007
Messages
732
I got convinced to release this in an unfinished state. I might be convinced to try to finish it, or I might wait until Fenix is released on the Pandora to finish it off... What I did finish is very cool and it's a bit unfair I've been sitting on this since April.

As posted on the Pandora talk forums:

I *was* working on a homebrew game developed in Fenix but hit some glitches and abandoned it. The game was going to be called "Joey Kepler: Orbital Mechanic" inspired by Martin Schweiger's "Orbiter" (www.orbitersim.com).

The idea was that you were a Satellite Repairman, flying in your spaceship from your space station out to damaged satellites, repairing them, and then coming back home with limited fuel. Sort of like Space Taxi with a circular gravity well.

The game made proper use of orbital mechanics, and I'd actually worked out Kepler's Laws of motion forward (position based on time and orbital elements) and backward (orbital elements based on position and velocity) to calculate and display elliptical orbits. There was even a docking computer that showed time to orbit intersect, deltav, distance etc. You had to time your thrusts carefully to arrive on target with enough fuel.

Unfortunately I was having some real problems with FPS. It turns out that recomputing an orbit during a burn (and showing the corresponding ellipse) with 30fps update is kinda hard on my GP2X. That and I was frustrated with my attempts to show a rotating, scaling earth... A graphic of the earth looks jagged when rotated and scaled.. When I realized the game had to be overclocked to work, I shelved it.

Maybe with a little more oomph from the Pandora I might try to bring this back.

Orbital Mechanic Test 30 (for gp2x)

Warning, it runs at 266Mhz by default and it somehow glitches up Gmenu2x after you quit. (reboot fixes). And if it's not obvious, it's incomplete...

Controls:
up/down: Lock prograde/retrograde
left/right: rotate left/right
L/R: thrust forward/backward
X: Chase View
Y: Orbit View
B: Orbital Sync Computer: Switch between Intersect 1 and 2
Start/Home: Quit

Have to get within 50km and hold to fix satellite... And right now that's all you do.. there's no end game.

Would like to fix up graphics (earth, ellipse drawing), thrust, improve vector computer, add music, sound, voiceovers (Old Lady Voice: "Sonny, I just have to have ma stories... can you fix the television for me?") storyline, instructions, etc. And of course Fenix and I have an animosity towards each other so I need to find any crash bugs and clean them up.
 
I am so sorry I can't try this, it sounds awesome. (no working GP2X)

Maybe this bump will get somebody to try it. It sounds like it would be great for the Pandora.
 
Sounds interesting, Ill check it out. Perhaps you can get more speed on the GP2X if you use the newer Ultimate Fenix runtime? That might also be able to fix some of the bugs. It can be found here : Ultimate Fenix
 
Imerion said:
Sounds interesting, Ill check it out. Perhaps you can get more speed on the GP2X if you use the newer Ultimate Fenix runtime? That might also be able to fix some of the bugs. It can be found here : Ultimate Fenix



I am using ufxi for this, though if there's been a new version since April that might fix the problems.

If I recall correctly the problems go away when ufxi is clocked at 200mhz, but then the game's fps is too low.

EDIT: Yup, that's the version I'm using.

Fenix and I appear to dislike each other. I was having persistent crash bugs developing for my other game, "Factor"
 
Last edited by a moderator:
a post of me from another Thread:

I've tried this "Game", very interesting Concept even if I don't have any clue how this thing works. It took me over a hour to get some results, the movement controlls are very confusing for me and it was more luck to bring the ship in range of the sattelite. :lol: A detailed manual could help maybe.
What do all these numbers on screen? What exactly does B-Button? What is the best way and tactic to controll the ship?
...and why does this game need 266MHz? ;)
 
fusion_power said:
a post of me from another Thread:

I've tried this "Game", very interesting Concept even if I don't have any clue how this thing works. It took me over a hour to get some results, the movement controlls are very confusing for me and it was more luck to bring the ship in range of the sattelite. :lol: A detailed manual could help maybe.
What do all these numbers on screen? What exactly does B-Button? What is the best way and tactic to controll the ship?
...and why does this game need 266MHz? ;)
Sorry, again this isn't a completed game. I decided to share it after interest was expressed.

The controls are up above. I'm almost certain most of the difficulty docking is the complexity of orbital mechanics. You **CANNOT** point towards the satellite, thrust, and hope you get there. Your ship simply doesn't have enough power.

Higher orbits are slower, lower orbits are faster. Thrusting prograde (forward in your orbit) makes the other end of your orbit higher, so you have to plan ahead. Make your orbit slightly slower than the satellite to chase it, slightly higher to slow down and reach it. This is completely backwards from our intuition: Speed up to go slower. Slow down to go faster.

The most critical set of numbers are at the top left. This is the docking computer. It shows the number of seconds until you (the numbers on the left) and the satellite (the numbers on the right) hit the intersect point, the point where the two ellipses intersect. The first number is the first orbit, the second number the second orbit, etc. The number at the top is the difference between the two numbers and you want to get this as close to zero as possible. Once you're generally close thrusting towards or away the planet will allow you to more slowly adjust this number. If you're in a high looping orbit, you might hit the intersect point in one orbits, while the satellite might hit in two or three, which is why different rows of that numberset get highlighted.The ellipses intersect in two points, why you can press B and get a different set of numbers.

The numbers in the middle right are diagnostic. Most of them have to do with scale: How much does the image of the Earth get scaled. There are numbers here for percentage fixed (within 50km of satellite) and number of satellites fixed.

The bottom right is the vector computer. This shows your ship orientation (o), Direction to the satellite (d) and relative velocity vector (v), as well as distance and relative velocity numbers. Once you've gotten close using the docking computer (perhaps within 500km) you can start using this computer to get closer. Align the d and v vectors using perpendicular thrusts, and reduce your relative velocity by thrusting away from the spacecraft.

As for the 266Mhz, I was still trying to figure that out and it was one of the things frustrating me. Recomputation of the orbits was relatively expensive (especially every frame when the spaceship is thrusting), but I got this mostly under control. However when you're really close to the satellite the fps drops through the floor, perhaps 7 fps, and I had no clue what was causing the bug. Well, I had a better clue 3-4 months ago, but I decided to shelve it.

I may still pick this up for Pandora late this year/early next year if people (other than me) like the concept... I'm thinking I should drop Fenix and go straight to SDL though.
 
Last edited by a moderator:
Uh... :blink: ...
Maybe some kind of good ingame Tutorial would be a great way to improve the usability of this game. ^_^
I really like the Idea of this game. NASA Engineers would love it I think. I've managed one complete repair without paying attention to the Numbers. Navigation in "Zoom Mode" is hard because you can't see the entire orbit of the ship, I can navigate better with this, actualy, the only thing that I do is trying to match my orbit with the sattelite Orbit. Accelerating or braking is easy when comparing the entire orbits. if your Orbit (part) is inside the Sattelites Orbit, you are faster, if this Orbit is outside of the other one, you are slower. :D

The earth could look a little bit better, maybe the GP2X could handle a simple Vector-Earth better than zooming Pixelgraphics? But I don't know the Vector Graphic skills of the GP2X that good. ^^"""
 
Now I try it :)

Very interesting concept. Its really hard to get the satellite! I`v try it now for 20min but I don`t get it. I will try it tomorrow again.
 
Tashi said:
Now I try it :)

Very interesting concept. Its really hard to get the satellite! I`v try it now for 20min but I don`t get it. I will try it tomorrow again.
Orbital Mechanics isn't simple... making contact is all about that tracking computer... get that central top left number as close to zero as possible, then watch the highlighted numbers go down to zero. When they do you'll be right on top of each other.
 
Last edited by a moderator:
Trevor Bradley said:
Tashi said:
Now I try it :)

Very interesting concept. Its really hard to get the satellite! I`v try it now for 20min but I don`t get it. I will try it tomorrow again.
Orbital Mechanics isn't simple... making contact is all about that tracking computer... get that central top left number as close to zero as possible, then watch the highlighted numbers go down to zero. When they do you'll be right on top of each other.

"Average Joe" doesn't get realistic Physics most of the time ;)

Anyway, the low speed is probably caused by heavy use of floating point math for a start (I'm assuming you're using this heavily based on the nature of the game).
 
Last edited by a moderator:
Peter R said:
Anyway, the low speed is probably caused by heavy use of floating point math for a start (I'm assuming you're using this heavily based on the nature of the game).
Fenix doesn't have doubles or longs! I remember now this was another point of my frustration. The ship/satellite would jump around if you got within a few kilometers. The numbers used here are all floats.

This was also a problem in my other game Factor. I actually had to write a library in Fenix to allow for multiplication of large numbers as Strings.

Even though I'm computing position based on Kepler's laws of motion:

http://en.wikipedia.org/wiki/Kepler%27s_la...lanetary_motion

this only caused slowdowns during burns where the shaceship's orbital parameters had to be recomputed with each frame (and then it only dropped down to 18 fps or so)

If I recall correctly the slowdown was with the drawing primitives and the earth itself. Little things like computing only half the ellipse, then mirroring it and rotating it instead of computing saved tons of fps. Also, Fenix doesn't have a graphic primitive for ellipses. Now that I think about it, the massive slowdowns could be caused by Fenix starting to choke over drawing lines from far outside the screen position...

As I've said before, Fenix and I have an antagonistic relationship. I consistently ask it to do more that it was designed to do and hit walls, some of which I'm able to hurdle, others I start to compromise for.

I think I may start to brush up on my SDL and move to that platform for my next project.
 
Last edited by a moderator:
I didn't noticed to heavy slowdowns, maybe that's because I use the faster RAM-Timings per GMenu2X. Helps sometimes more, sometimes less, varies from Software to Software. ^_^
 
Peter R said:
It's generally considered bad form to use floats at all on the GP2x as in most cases its terribly slow due to the lack of any hardware floating point support.
How about the Pandora?

All my games are mathy, whether people know it or not.. :)
 
Last edited by a moderator:
Back
Top