Log In  


Cart #fobijnugi-0 | 2023-10-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

Hi, I was seeing if it was possible to build a fake 3D solar system model and I think it came out pretty well so I decided to post it.

I saw some other carts with nice procedurally generated or handmade planets, spherical distortion, etc, but I haven't seen any pseudo-3D planets actually orbiting around.

The cart will randomly generate a solar system, and the controls are just the arrow keys to rotate the camera (with left and right) or zoom with forward and back.

There's no actual 3D rendering being done, it's just using sin/cos to make the circles rotate with a slanted oval pattern and at each loop around the sun, a variable is flipped and then the list sorted so that they are drawn in order.

I am not sure if this technique can be used to build a game. Probably not, but it's cool. I would like to add some effects to this cart so that the planets are more interesting, and maybe something cool like comets, rings, clouds.

5



[Please log in to post a comment]