![]() |
Planetary system
5 Attachment(s)
Thanks to Ziro (xXziroXx) for proof-reading this thread. He said he couldn't find much wrong with it, but since his opinion can't be trusted, I asked someone else who was quoted saying "Not funny."
Abstract: It's a so called "physics engine" combined with a "graphics engine" in order to produce a rather excessively rapid simulation of a planetary system. I originally tried to do this using Kepler's equations but that just gave me nightmares, so I settled for simple gravity, which can achieve the same thing. The example setup creates a few planets which orbits around different axises with the immovable sun located at (0, 0, 0). You can alternatively make all bodies attract each other with gravity, allowing you to make moons. The problem with this is that it opens up a whole new can of worms stuffed with "Oh <deity>, I can't make them orbit for longer than twenty seconds." Features:
No, I'm not releasing source code for anyone to just use without thinking. The attached document was accidentally posted and I don't know how to remove it. Don't read it! Forbidden knowledge, etc. (The text that you have entered is too long (20830 characters). Please shorten it to 10000 characters long.) Terms of use: The origins of this script must be confused. Whenever you see fit to give credit, you must claim that you wrote it. The most important rule to remember is that you must never attribute me. If you in anyway mention, hint, suggest or imply that I wrote this, I will connect to your server and say mean things to you. Frequently asked questions that aren't really frequently asked since I just made them up: Q: How do I spawn something? A: yourWorld.newMass(position, velocity, massInKilograms); Q: That's nice, but it always comes out as a white square. A: The basic mass object doesn't include details about drawing. You must "derive" to do this. The example setup demonstrates this in newPlanet() and newCustomWorld(), which derives newMass() and newWorld() respectively. I didn't tell you about the gimmicky OOP just to be funny. Q: What's up with renderer.color, renderer.rotate, renderer.translate etc? A: These functions change certain variables which will affect all subsequent drawings, not unlike OpenGL. If you ever want to start from scratch, use yourRenderer.reset(). Q: Can I put players in orbit? A: Technically, yes. I'm not going to do it for you. Make it a father-and-son-time of DIY so you'll have something to fight about. It'll be just like good old times. Q: Sounds like fun! I'm going to remove //#CLIENTSIDE so it looks the same for everyone. A: Please PM me your address so I can be the first to kill you. Q: My planet's velocity breaches the speed of light when it gets really close to the sun. Isn't this impossible according to Einstein's special theory of relativity? A: Einstein was a hobo. Are you going to listen to some chick on an Internet forum or a hobo? You're going to listen to me of course! Q: Where do I test it? A: Connect to Mythic Legends and type /startorbit. Reconnect to get out of there. If it's not working, stop reading old threads. Peace out. |
The 'toggle rotation' effect is very nice.
|
That dog was kinda cool. Do I have to make a serious comment...?
|
Niiiice :D
|
Looks and sounds really nice.
You can remove unwanted attachments by clicking "Manage Attachments" and then "Remove", but I can't tell if you were just being sarcastic? Quote:
|
I'm sure he was joking on both accounts, lol.
|
Pretty nice :O
I need to rep you twice now.. hmm |
1 Attachment(s)
Quote:
|
Very, very nice!
|
-Standing Ovation-
I now have something to stare at for hours yet again! Quote:
|
Holy crap, this is awesome.
|
| All times are GMT +2. The time now is 02:22 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.