• Advertisement
  • entries
    232
  • comments
    1463
  • views
    959929

More on the solar system simulator

Sign in to follow this  

371 views

Screenshot time.. but you're warned.. i've been concentrating on the simulation, not the graphics.. yet.



This is an ugly view of Jupiter, with its biggest moon, Ganymede. The dark gray grid in the background is the sun plane. The light gray lines are vectors pointing to the other Jupiter moons.

I've optimized a bit the bandwidth usage of the server; it's now consuming from 150 bytes/second for a few planets in view (ex.: in the Earth neighborhood), up to 500 bytes/second in complex places (Saturn, Jupiter), due to the amount of moons to refresh.

I've fixed some major bugs in the packet positions interpolation (the planets were not moving smoothly. At first i thought it was due to packets loss, but no.. simply some bugs in the code :)). Another major fix was that i forgot to convert some vectors from 32-bits floats to 64-bits floats in some parts of the code, which didn't help either..

It is now pretty much perfect. Real dimensions and scales are used, and i can fly to any planet, and no longer have precision problems, making the planets or the camera randomly jump on short distances.

Since our graphics cards only support 32-bits precision, i use a trick to be able to render planets many A.U.s away from the origin: translations are calculated in 64 bits and relative to the camera (ie. i do "as if" the camera was always at (0, 0, 0)). I have to tweak the transformation matrixes for each object and each frame, but it's well worth it.

I must say, it's kind of magic to think that i've got the full solar system simulation (with code for other procedural systems already in), and working in network, with extremely low bandwidth usage.

I have a game project in mind since many months, but nothing official yet. I'm waiting to have the engine completed before starting it.
Sign in to follow this  


2 Comments


Recommended Comments

That all sounds awesome! Keep up the good work and I'll be looking forward to playing that game! [smile]

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement