Gravitate! Demo

Show off your games, demos and other (playable) creations.
User avatar
misterspok
Prole
Posts: 20
Joined: Fri Apr 19, 2013 12:40 pm

Gravitate! Demo

Post 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.
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.
User avatar
unek
Citizen
Posts: 86
Joined: Fri Oct 12, 2012 8:43 pm
Location: Poland
Contact:

Re: Gravitate! Demo

Post by unek »

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
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Gravitate! Demo

Post by qaisjp »

what is this licensed under? looks impressively nice.
Lua is not an acronym.
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: Gravitate! Demo

Post by Germanunkol »

Very nice indeed!

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
User avatar
misterspok
Prole
Posts: 20
Joined: Fri Apr 19, 2013 12:40 pm

Re: Gravitate! Demo

Post 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 :D
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.
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Gravitate! Demo

Post by qaisjp »

code license.
like gplv3, or creative commons 0... or what love uses.
Lua is not an acronym.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Gravitate! Demo

Post 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/
Help us help you: attach a .love.
User avatar
misterspok
Prole
Posts: 20
Joined: Fri Apr 19, 2013 12:40 pm

Re: Gravitate! Demo

Post 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.
andrew.207
Prole
Posts: 19
Joined: Sat Jun 08, 2013 7:27 am
Location: Melbourne, Australia

Re: Gravitate! Demo

Post 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 :P.
http://www.atunnecliffe.com/
Bitcoins? 1LHn9yaErCakYD2iGwCyLungiC7ACxRUW8
User avatar
Deltise
Prole
Posts: 26
Joined: Sat May 18, 2013 7:23 pm

Re: Gravitate! Demo

Post by Deltise »

Don't you just LÖVE what math can do :awesome:
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests