Page 1 of 2
Gravitate! Demo
Posted: Fri Jun 07, 2013 5:19 pm
by misterspok
A simple demo, that represents the solving of classical N-body equation. NO love.physics used, pure math
Any feedback is appreciated.
Enjoy.
Edit: Terribly sorry. I packed the *.love file incorrect.
Edit2: As I see all the hassle about licensing thing of this demo I decidet to clearly put it under MIT licence. Feel free to use the code as long as you include the original copyright. Copyright text file is now included in .love archive.
Update
Made some changes in the demo. It now somehow simulates objets impacts that makes them to merge in one bigger and heavier body. Try out
Merging bodies now share their masses and volumes. Ther speeds are also now calculated with impulse conservation law. But main body will now eventually eat up all the others
Update 2
Completely refactored code. It now first checks collision, then evaluates all the resulting gravitational pulls and after all that - moves all the bodies. Enjoy. Maybe someone will find it useful.
Re: Gravitate! Demo
Posted: Fri Jun 07, 2013 5:32 pm
by unek
nope
Re: Gravitate! Demo
Posted: Fri Jun 07, 2013 6:58 pm
by qaisjp
what is this licensed under? looks impressively nice.
Re: Gravitate! Demo
Posted: Fri Jun 07, 2013 7:30 pm
by Germanunkol
Very nice indeed!
Good work on this. Was it just mathematical interest or are you planning on taking this somewhere further?
Re: Gravitate! Demo
Posted: Fri Jun 07, 2013 9:08 pm
by misterspok
qaisjp wrote:what is this licensed under? looks impressively nice.
I don't quite understand what do you mean
But if you need the code - feel free to use it in any way you want!
Edit: If you ask what I used to do this: just Newton's laws, trigonometry and my own head
Germanunkol wrote:Very nice indeed!
Good work on this. Was it just mathematical interest or are you planning on taking this somewhere further?
Well, yes, just a little practice in Lua and LOVE2d. I am new to programming and game development. So I try to do some simple practice projects to make myself comfortable around this language and game engine functions.
Re: Gravitate! Demo
Posted: Fri Jun 07, 2013 9:21 pm
by qaisjp
code license.
like gplv3, or creative commons 0... or what love uses.
Re: Gravitate! Demo
Posted: Fri Jun 07, 2013 9:28 pm
by Robin
misterspok wrote:qaisjp wrote:what is this licensed under? looks impressively nice.
I don't quite understand what do you mean
But if you need the code - feel free to use it in any way you want!
(I'm going to assume zero knowledge here, please don't feel insulted if you know (some of) this stuff already.)
If you plan on making more software (demos, games, applications, ... anything, really), it is probably a good idea to read up on open source and software licensing, it will save you a lot of hassle and legal troubles in the long run.
The following links might be of interest:
https://en.wikipedia.org/wiki/Open_source
https://en.wikipedia.org/wiki/Software_licensing
http://opensource.org/
Re: Gravitate! Demo
Posted: Sat Jun 08, 2013 8:31 am
by misterspok
I didn't think of it before. Thanks for the heads-up. As I said, I am completely new to gamedev, so this side if new to me as well
When I posted it I never thought anyone would be interested in "what it is licensed under"! It's a demo, you know
And I can say it is completely open-source and falls under GPL license. If you wan to - use it, copy it, distribute it, modify it. Maybe you'll want to mention me as creator of this module if you use it in your projects
Do anything you want
For me it was merely a practice project, and it holds no value to me except the experience I got developing it.
But I will certainly read about licensing before doing something serious.
Re: Gravitate! Demo
Posted: Sat Jun 08, 2013 10:25 pm
by andrew.207
Yeah licensing is important -- I made an Android app a while ago that performs a fairly simple (but as yet unimplemented) function, released it through Google Code (as it wasn't technically within guidelines to be in Play Store). It good about 300,000 downloads, then someone stole all the code, put ads in it, to their credit they also made the UI a lot nicer, then re-released it.
Sucks, but I initially was all happy about everything saying "yeah do whatever you want with the code", but then someone copied the whole thing and started making money off it. Imagine 300,000 downloads x ad revenue :C. Lesson learned!
That being said, Gravitate is awesome. I'm looking forward to see more interesting math examples. Fortunately the code wasn't too complex, because I couldn't understand the commenting
.
Re: Gravitate! Demo
Posted: Sun Jun 09, 2013 4:11 am
by Deltise
Don't you just LÖVE what math can do