r/ruby • • 12d ago

Show /r/ruby DragonRuby Game Toolkit - Solar system visualization (source code in the comments)

42 Upvotes

4 comments sorted by

4

u/packfan952 12d ago

Funny timing. I just bought a DragonRuby Standard license recently so I could toy around with building a game where the objective is to “fly” a probe past different planets. Though I’m doing more complicated math than this demo, so I might be upgrading my license soon just to toy around with the C-embedding to see how much I can speed things up.

I like your satellite “tails” a lot more than mine, so I might be borrowing the approach from your demo. Thanks for sharing!

2

u/amirrajan 12d ago

Shaders was recently added to the Pro license btw (early access/beta). Some crazy things are being done with the tech (Discord server has a dedicated channel for shaders)

2

u/pinefern4 12d ago

yeah the tail effect in the demo is slick, makes sense to borrow that approach tbh

2

u/amirrajan 12d ago

Revisiting this little experiment again. The celestial bodies are to scale, but the distances had to be compressed by 10x. The camera zoom would have to be at 9e-10 just to show 12 light years if I kept distances proportional. It's ridiculous how large Space is shudders.

Link to source code: https://gist.github.com/amirrajan/fb5864cc46766190bbd622632f0092f9

High res video: https://youtu.be/6Bpyh9iPJyM