15

Celestia is a gorgeous application for real-time 3D visualization of space, with a detailed model of the solar system, over 100,000 stars, more than 10,000 galaxies, and an extension mechanism for adding more objects.

It can run on windows, mac os, linux, freeBSD, then is there any Android ports of it? or how to build or port it to Android?

Blorgbeard
  • 101,031
  • 48
  • 228
  • 272
ghost
  • 458
  • 6
  • 11
  • nice question I created a tag for celestia and edited the questio, maybe it will get some more attention, if not your can offer a bounty – aaronman Jul 25 '13 at 01:43
  • 1
    I think this is more question about can your Android device handle it? For basic solar system simulation it is OK, but when you start adding asteroids,comets, stars, then you suddenly need relatively big portion of memory not all Android devices can handle. The other point is the speed the less objects the faster it runs ... yes you can update the positions with slow rate but when you want to suddenly recompute whole scene that takes time Adding 3D graphics multiply all this. So the question is what device it would run on what quality of simulation/render before even start to port ... – Spektre Apr 27 '15 at 13:36
  • 1
    If you have desktop like power then sure it would run and you could try to port. Take [source code](http://sourceforge.net/projects/celestia/files/Celestia-source/) and rewrite all OS/Platform dependent things to your environment. That is huge amount of work to do with unknown source code. Especially if you do not know what and how it does ... Look here [realistic n-body solar system simulation](http://stackoverflow.com/a/28020934/2521214) how such programs usually works – Spektre Apr 27 '15 at 13:49

1 Answers1

1

Building on Spektre's comments and with a quick look at the , you'd need to:

  1. Get the code (either from SVN or a Git fork)
  2. Convert the automake build system to NDK
  3. replace all linux-dependent code with android NDK (e.g. opengl), or, better yet, add a new platform
  4. Build a new UI. Probably you can get some usage out of Qt, since it works on android

Some things to take into consideration:

  • Code base is about 200k lines, c/c++
  • There are some optional dependencies (e.g. lua) and some compulsory (?) dependencies (e.g. OpenGL libs)
  • You'd need to look carefully to various modules. "celengine" for example contains most of the OpenGL code.

IMHO, this is a hard thing to do (I did quite a few ports myself between OSes in the past years, albeit with smaller code bases). My approach would be rather to build a new thing (lib, app) using the data available, and add functionality and NDK components in time.

Laur Ivan
  • 4,117
  • 3
  • 38
  • 62