You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

4h 7m 50s logged

Moon orbit… in a browser!

TL;DR: Spent a long time researching, also decided to use the SPICE library instead of GMAT for calculations, and run SPICE on a remote server instead of the browser. Images are the path of the moon’s orbit around Earth, drawn inside a web browser(!!!)

⋆⋆⋆⋆⋆⋆⋆⋆

So it’s been kind of a while since my last devlog. The main reason for this is that I’ve been working on things that can’t be tracked with Hackatime or measured very well, such as attempting to compile things (In the terminal, not an editor) or researching on various websites. (Speaking of which, here’s a really good NASA resource I found for explaining the basics of spaceflight)

I’ve decided to make some changes to how I’m going to simulate the game. Instead of using GMAT (Mentioned in previous devlogs), I’m going to use a different NASA program called SPICE. GMAT uses this internally, and SPICE is a library instead of a GUI application. Sadly, I have not yet managed to get SPICE running in a browser with WebAssembly, so I’ll be running all the calculations on a python web server. To summarize, I’m now using SPICE for calculations instead of GMAT, and running the calculations on a remote server instead of in the browser.

To demonstrate that this works, I made a webpage and simple python web server that calculates and displays the orbit of the moon around Earth for 90 days. It visualizes the orbit with a custom 3D engine I’m creating for this project. Screenshots of this are attached, where the rainbow line is the path of the orbit and the white dot is Earth. (Note: my 3D engine seems to stretch things out so it doesn’t look perfectly circular. I’ll probably fix this if I include it in the real game.)

⋆⋆⋆⋆⋆⋆⋆⋆

Edit: seems like Stardance isn’t showing all the images, if you can only see the first one, please look in the comments of this devlog for links to the other two!

0
52

Comments 2

@J

It seems Stardance killed 2/3 of my images. I’ll link the other ones in another comment shortly.

@J

Here’s the links to the images:
Other image 1

Other image 2