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.
Gravitate! Demo
- misterspok
- Prole
- Posts: 20
- Joined: Fri Apr 19, 2013 12:40 pm
Gravitate! Demo
- Attachments
-
- Gravitate!.love
- Gravitate! Demo app. MIT Licenced, see inside the *.love archive.
- (3.3 KiB) Downloaded 161 times
Last edited by misterspok on Wed Jun 26, 2013 6:05 am, edited 7 times in total.
Re: Gravitate! Demo
nope
DRAW DRAW - online painting app CLICK NUMBERS - cool game with numbers THEME LOVEFRAMES - a collection of my themes HOST FOR FREE - free hosting for online LOVE games STALK PEOPLE - a map of LOVE users
-
- Party member
- Posts: 712
- Joined: Fri Jun 22, 2012 4:54 pm
- Contact:
Re: Gravitate! Demo
Very nice indeed!
Good work on this. Was it just mathematical interest or are you planning on taking this somewhere further?
Good work on this. Was it just mathematical interest or are you planning on taking this somewhere further?
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
- misterspok
- Prole
- Posts: 20
- Joined: Fri Apr 19, 2013 12:40 pm
Re: Gravitate! Demo
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!qaisjp wrote:what is this licensed under? looks impressively nice.
Edit: If you ask what I used to do this: just Newton's laws, trigonometry and my own head
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.Germanunkol wrote:Very nice indeed!
Good work on this. Was it just mathematical interest or are you planning on taking this somewhere further?
Re: Gravitate! Demo
code license.
like gplv3, or creative commons 0... or what love uses.
like gplv3, or creative commons 0... or what love uses.
Lua is not an acronym.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Gravitate! Demo
(I'm going to assume zero knowledge here, please don't feel insulted if you know (some of) this stuff already.)misterspok wrote: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!qaisjp wrote:what is this licensed under? looks impressively nice.
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/
Help us help you: attach a .love.
- misterspok
- Prole
- Posts: 20
- Joined: Fri Apr 19, 2013 12:40 pm
Re: Gravitate! Demo
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.
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.
-
- Prole
- Posts: 19
- Joined: Sat Jun 08, 2013 7:27 am
- Location: Melbourne, Australia
Re: Gravitate! Demo
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 .
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 .
http://www.atunnecliffe.com/
Bitcoins? 1LHn9yaErCakYD2iGwCyLungiC7ACxRUW8
Bitcoins? 1LHn9yaErCakYD2iGwCyLungiC7ACxRUW8
Re: Gravitate! Demo
Don't you just LÖVE what math can do
Who is online
Users browsing this forum: No registered users and 0 guests