3d Space Sim

Previous topic - Next topic


its kinda fun, i find myself spending hours every night playing with profiles, formations.
Fact: Most solar systems have a jupiter-like planet circling near the star.
In this sim, you can actually see this sort of thing form, and you can see why it happens (if you watch)
Watching, waiting, thats what this sim is about, theres not much to do except to start the planets and watch them whirl merge and form orbits.
Bing ChatGpt is pretty smart :O


collisions with beautiful slow motion explosions too???   ;/


its mostly just math physics not much in the way of special effect.
just a toy at the moment, no real plans for this side project.
my big dream is still to do a flight sim. i have all the code i need for one, just not the time i need.
Bing ChatGpt is pretty smart :O


Quote from: erico on 2019-Feb-14
collisions with beautiful slow motion explosions too???   ;/

fine ok, as you wish. And how about comets and trails that push away from stars?
How about this lighting from the star to the planets?
These objects all share the same object, they are coloured by another light from the cam position.
Bing ChatGpt is pretty smart :O


 <3 That is neat! Would it work better if the planet shading was more "hard", like a cartoon shade?
Looks awesome and I bet even better while moving about. :)


Quote from: erico on 2019-Mar-01
<3 That is neat! Would it work better if the planet shading was more "hard", like a cartoon shade?
Looks awesome and I bet even better while moving about. :)
not sure, if it would or not?

heres a close up on the planets moving..
the ones on fire recently absorbed smaller things
the ones with trails (in this scene) are the smallest and original objects flying around, they take on color when they combine with something smaller, and lose the tails.
Bing ChatGpt is pretty smart :O


That is great, so you have a whole simulation of accretion disks to form the planets? Do you have different process for rock, gas,ice planets? Rings too?


There is a space sandbox simulator if you really want that kind of effect with gas...saw it on youtube
tho it doesn't do accretion disks directly, you can immitate them by shredding stars lol

To answer your q's: yes and yes
basically, during system creation when the profile is chosen, it is an accretion disk engine at the beginning
gas? gas physics are present in the comets, the star pushes the gas tail away from the star.
planets form, its based on solids only, ice...rocks..solid. also....some gas are solid or liquid in deep space anyway, no atmospheres yet.
IRL most of the universe is made of hydrogen, doesn't make a good platform for planets.
supernovae create the higher density elements, and that is what these simulated objects represent, without regard to chemical properties and effects.

yes the disks can be formed into rings....every dimensional feature of an accretion is disk is covered if im not mistaking, but im not a scientist so, maybe i missed something.
Directly, it uses these features to form the solar systems:

Code (glbasic) Select

GLOBAL SPLITWAVE = FALSE // Initial planet formation splits into 2 directions.
GLOBAL SPACEWAVEFORM% = 1 // 0 = direct VECTORADD addition, 1 = random VECTORADD addition ()
GLOBAL RINGS% = 12 // Number of rings
GLOBAL RADS% = 2 // # of radial hub arms
GLOBAL SPREAD# = 12.0 // additional rad spread random angle on xz plane
GLOBAL GAP# = 8000.0 // Magnitude between each ring
GLOBAL G# = 0.000006674 // Gravitational constant - time, the bigger the constant, the faster time goes. our universe irl is very very slow, constant is tiny and thats a good thing.
GLOBAL STARSIZE# = 1000000000.0 // 0 = normal object >0 = star to form in center, size starts at this size.
GLOBAL VECTORADD# = 0.0 // addition to SPACEWAVEFORM% angle of fall at initialization, 0 = stable, no variationss regardless of SPACEWAVEFORM%,
GLOBAL E# = 120.0 // solar system initial spin speed

Once the system is created and set into motion, its all Master Lord Sir Isaac Newtons Laws of motion in effect.
The algorithms he created and so beautiful, so beautiful they're compatible with computer code.
And to think he designed them 400 years ago without a calculator or computer is mind boggling.

[edit] it also has 3 cams, so far (these so tedious)
1 planet chase cam(not fixed, litteraly chases), 2 star tracking cam, and 3 freemouse cam
Freemouse cam also tracks with star, because it moves sometimes, quickly.
Bing ChatGpt is pretty smart :O


Now I just wonder, you are probably dealing with numbers super small and huge, are you keeping it all float?


Looks very interesting Hemlos, looking forward to seeing it in motion!  :good:


"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)


Very cool and nerdy! :)
Speccy-48k, Speccy-128k, Amigas, PCs

Kitty Hello

Very cool. How do you come up with that kind of ideas?


Quote from: Kitty Hello on 2019-Mar-09
Very cool. How do you come up with that kind of ideas?

I randomly study of math and astrophysics on a regular basis, using GLBasic to visualize some math.
I really wanted to see gravity in action, to see; stars, planets and moons form and take on unique orbits.
When i saw the formula for gravity from Isaac Newtons principia, i figured it could be worked out using a double nested loop.
Also, it has become a great platform for refining my 3d libs for cameras, particle engine, lighting, and sfx, etc etc
Bing ChatGpt is pretty smart :O


Just waiting patiently to see this in action, at least in video..  :)
Check my source code editor for GLBasic - link Update: 20.04.2020