Cesium Ion powered Moon explorer (for science!)

Feedback and questions appreciated! Currently, this is an early alpha. Demo → https://alpha.moonwurms.pages.dev

The world space rendering features really helped this one along, and saved me countless hours of trying to figure out the real math behind how all this works!

You are a flying space wurm, on the moon! Your primary goal is to learn about the moon and its various physical features. Your secondary goal is to eat food and clear ring sets. Your last goal is to communicate with others and explore the moon together.

The moon 3dtileset is provided by Cesium Ion, and CesiumJS has been patched to work with BabylonJS. This is the technical bit that made the demo work, and is the coolest part according to me. :smiley:

Audio chat is p2p webrtc so that you can talk to friends or other people exploring the moon. I specifically wanted to avoid myself paying a monthly bill for this webapp being up, and found a way to do it. Using cloudflare durable objects as a state-sharing mechanism to negotiate webtc connections is basically free. I may get a bill of a dollar or two if hundreds of people use the webapp but I expect most traffic to fall into cloudflare’s free tier.

Background sky/space data source is NASA’s deep star map 2020, meaning all stars in the sky are scientifically accurate. Due to the image being mostly one color (black), the 450mb exf image was able to be compressed into a 500kb webp image. I was shocked, and it looks so very nice!

The driving narrative of the webapp is ‘science-minded early edutainment’, and sure enough, after playing it a bit I will forever be able to tell the difference between the tycho crater and the Copernicus craters.

The webapp is in early alpha, but I wanted to show it here and get some feedback on the mechanics. You can append ?debug=1 to the url and enable the panels to control the flight speed and curves. Changing those values changes the gameplay mechanics. I’m using a hill curve to power the altitude + speed combining, such that low altitude = low speed, high altitude = high speed. The hill curve describes the mechanics of how leaving and returning to the moon behave visually as well as how flying feels close to the surface. If you find the speed/flying strange, I would appreciate any tweaking of those numbers to make it ‘feel better’ flying. Could also really use some help on getting the deviceorientationcamera to behave given a geo-context, where up is kinda relative to where you are on the surface, outside of world space.

WASD move directionally up/down/left/right
IJKL rotate directionally up/down/left/right
U/O rotate “corkscrew” or “barrel roll” left/right
; set perspective to planet horizon
[/’ face outward/inward to moon center
Tab key (in debug) shows camera mechanic details like raytraces etc.


For fun, I also put constellation and their boundary layers on, so you can see the accurate constellations too! :smiley: NASA released them in the same project I got the background file from so… why not right?


The stars actually sparkle, due to what I think is oversampling the image size with so many different white dots. its 16k image for the background on a standard HD screen. :smiley: Id be curious to know if they still sparkle on a 4k monitor.

9 Likes

Wow, that music gives me some “Outer Wilds” vibes :hourglass_done::collision:

Anyway, I feel kind of lost what to do :thinking: Where can I “learn about the moon”?

About the controls. I think you need to decide what you want. Simulation or arcade? Kerbal Space Programme, MS Flight Sim, Space Zombie Shooter…?

  • From an arcade perspective: steering with mouse (and/or gamepad). My bet: at least half of the future players will complain about this. Also, auto-leveling (cam roll) would be useful.

  • From a simulation perspective: I have got no clue about space (well, or Earth) physics. But the steering controls are way too senstive. I just tap the “i”-key and it goes way off. Even if this was realistic, it makes operating the simulation difficult (ofc could be a gameplay feature). Also, should there not be some kind of inertia?

  • Education perspective: Come to think of it. If your final goal is to teach students about the moon, you could also decide against free controls. A fixed path (maybe with freelook) can ensure students will always arrive at the teaching spots.

I think I have found some bugs, too:

  • The camera can clip into the moon. Also, “death” triggers too soon according to the altimeter (96m; unless I am one of those huge Dune worms). To repro both: just let the game run after start.

  • If I switch the spawn point (Apollo landing), the moon starts flickering.

  • Nothing happened when I flew through the ring

I got the music from freesound :smiley: I want to replace it with music I have made for the purpose, but I did want to capture the music feeling. Glad it gave an impression!

Learning about the moon is achieved by going to different landmarks on the moon, different craters and flying around them. One idea being, if you navigate the rings they will guide you down contours of crater and other distinct landmarks.

Controls are vague in the webapp for sure. I need a little control explanation popup in the settings. There are two types of controls. One is mobile based and uses the device orientation sync the player direction. This is the ideal ‘fly’ mode. The second is keyboard wasd / ijkl / p;[‘ – wasd is your non-rotational axis movement (up,down,left,right), the ijkl is your rotational axis. the rest are special keys P is uturn, ; is autoleveling you asked about (facing horizon). [ and ‘ are face directiy away from planetoid center and directly facing it. U and O do corkscrew turns on the forward axis. … I haven’t been able to fit that into a nice explanation yet :smiley: But I do agree it needs to be more visible in the webapp.

The controls should ideally be mobile, i view the keyboard controls as secondary, mainly for development debugging and only included because people on desktop should be able to play if they want. The mobile UI with device orientation is designed to be the main input, so less button clicking and more moving the phone around.

You are picking up on a gameplay feature, where the turning time for small wurms is very very (overly tight) almost with the keyboards. As the wurms get bigger, their turns get slower, following the pattern that if any wurm goes “full turn” in any direction it will almost meet back with its tail. There is some padding to prevent collision but the radius of that circle grows with wurm size. – That said, the numbers are very very loose and not dialed in, and will need to be tweaked to to maximize fun. :smiley:

I hadn’t thought of the “tour” mechanism. That might be a great game mechanic play tutorial! I could see getting familiarized with the mobile controls on a fixed track before letting it loose.

If you are using the debug panels, then the altitude in [brackets] should be the real tile-based altitude. the one outside of brackets is the ellipsoidal based distance calc. The math falls back to an ellipsoid of the planetoid if the tile is unavailable. When you start the wurms are only like, 10meters wide, but I will double check that! I eventually would like to see huge dune-sized wurms out there :smiley:

Tiles do not load prior to spawn point traversal. I haven’t put the spawn points outside of the debug panels yet for exactly that reason. :smiley: – future additions, i will add a warp particle that when you eat it, it takes you to another spawn point. I’ll need to figure out the preloading of tiles before the camera gets there. Ill probably end up saying “if close to warp particle, preload tile data at its pointed to location”.

The rings only work one way right now. Which is not terrible good UX. flying thru the first ring in the other direction shows you a ring path series. To your experience, I think i need a “reverse side” ring indicator.

Thanks for taking the time to play and check it out! Your feedback hit core areas I’d also like to improve in the whole app.

1 Like

@Joe_Kerr Latest update took your feedback into account. :slight_smile:

Initial spawn spots have starting rings that are optional to interact with.

Control explanations were added to the keyboard controls. Clicking the button will show the modal explaining the different buttons.

Updated small bits of the hillcurve responsible for setting speed from altitude. It should feel smoother and more responsive than jerky now.

The rings are no longer challenge points, they are on-rails guides around features of the moon with voice over explanations. This was a great move! Thank you!

camera deaths, spawn points, and a few other glitches were fixed.

Let me know what you think! :slight_smile:

2 Likes

I keep crashing into the moon (input way too sensitive, way too complicated) :frowning: But if keyboard controls arent a priority this is alright. Havent tried on mobile.

But I have finally found the guide lady. Thats actually pretty cool, I do like the idea. But when on rails, why can’t I look around? Also, just idea, but when the lady talks about specific geographic features, these could be highlighted or at least some sprite arrow/marker could give a hint.

Finally, I still do not get the “worm” bit. What should I eat? What am I supposed to do? Speaking of which, after the intial guided tour, I havent found any other rings.