Visible Planets in Space

by Nauviax

Render the local planet behind platforms when in orbit. Now with parallax, rotation, and mod support!

Tweaks
5 days ago
2.0
17.8K
Environment

i Very complicated overhaul suggestion

a month ago

Right away, I am aware this post is basically detailing a fully complete mod, and this was barely created a day ago (as of me posting).

The simpler version of my suggestion: the planets should be way bigger while in orbit, but they should be static in relation to the camera, not be an object in the world right next to the space platform. See https://imgur.com/09QJF9T as a mockup drawing. It should be positioned somewhere below the platform, as judging by the drop pods, space platforms point their "bellies" towards the planets they are orbiting. If it looks okay, maybe rotate the sprite of the planet below the ship as a crude orbiting animation. Additionally, some subtle planetary effects could look really good, like the clouds flashing blue on Fulgora on the dark side of the planet, or similar effects in orange to emulate eruptions on Vulcanus.

I started thinking about a more physically accurate version of this with the sun's position, the platform's orbit, and day-night cycle accounted for, however this would require a full 3d model of each planet or a procedurally generated map (with clouds, which are maybe even animated). Maybe I'll post a few annotated blender screenshots of possible ways of doing it :P

a month ago

I don't have a good way of doing planet sprite animations as I'm not an artist, but given a sprite sheet I can animate it easily.

As for the planet size and position/speed, I plan on adding config options soon to allow customizing this. Rotation is possible, though I'd like to avoid rotating the sprite on_tick for every stationary platform. A spritesheet animation is probably more likely.

I actually really like the idea of having the planet static rather than moving with the platform. I'll look into ways of doing this soon.

a month ago

Right, I have no clue how to link the planet position to the camera without updating the sprite position every time the camera moves. That would be a working solution, but I'm worried about the possible performance hit. Plus, it would immediately break in multiplayer. (Who's perspective do you use?)

Stars and asteroids in the background of space are tied to the tiles and are basically hardcoded. I was hoping I could use that system somehow but it's not really possible. I also looked into rendering the planet directly to the GUI, but I can't get it to render behind the platform when I implement it this way, which is no good.

Overall, if someone knows a way to render a sprite relative to the camera that works in multiplayer, let me know. The ability to customize size, speed and position will get added soon at least.

a month ago
(updated a month ago)

Unfortunately I have no modding experience, but based on your description this is either an impossible problem, or something extremely specific.

I'd still like to post my pictures of how I imagine an "accurate" version of this would look like: the first two pictures are a planet and a platform lit by the sun. The last two are the platform and planet aligned by their common light source.
https://imgur.com/a/lBST7ZT
Not to scale or anything, of course.

a month ago

Latest version has parallax effects. You can set parallax to a large value to effectively have it static in relation to the camera, and the old configs will let you move around and scale the planet position too.

This thread has been locked.