Planet Gravitation

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
SCARD
Prole
Posts: 45
Joined: Tue Sep 04, 2012 12:44 pm

Planet Gravitation

Post by SCARD »

Hi Folks!

I've made a little planet gravitation stuff. This version is not working perfectly but demonstrates pretty well what i want to do.
Just wanted to share it to the lövely wörld. Have fun with it.

Controls are left, right, up down or w,a,s,d to move.

Comments and ideas for improvement are welcome.


---------------------------------------------------------------------------------------------------------
In version 0.2 I've added the functionallity described in post#4. Feels much better now!
---------------------------------------------------------------------------------------------------------
Version 0.3 start in fullscreen at highest resolution
You now can spawn planets and spheres that are influenced by the gravity by clicking.
You can zoom by using the mousewheel.
---------------------------------------------------------------------------------------------------------
Version 0.4 lets you delete objects in the world by pressing the spacebutton
---------------------------------------------------------------------------------------------------------
Attachments
planetgravitation v0.4.love
(3.21 KiB) Downloaded 282 times
planetgravitation v0.3.love
(2.88 KiB) Downloaded 190 times
planetgravitation v0.2.love
(2.11 KiB) Downloaded 210 times
Last edited by SCARD on Sun Mar 03, 2013 2:25 am, edited 3 times in total.
User avatar
mickeyjm
Party member
Posts: 237
Joined: Thu Dec 29, 2011 11:41 am

Re: Planet Gravitation

Post by mickeyjm »

Nice. No love.physics i think/hope. You certainly did better than when I once tried something similar (I got as far as calculating the closest gravitational mass and gave up)

Only problem I've seen is that for some reason the bottom right planet has no gravity.

BTW what are those black blobs?
Your screen is very zoomed in...
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: Planet Gravitation

Post by Taehl »

Looks neat so far. Having to repeatedly tap the controls to move instead of holding them was a bit odd. I enjoyed it more when I modified all three planets to be the same size, so you could orbit better and not just always land on the big one.

May I suggest a small addition to your code?

Code: Select all

function love.keypressed(k)
	if k == "escape" then love.event.quit() end
end
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
User avatar
SCARD
Prole
Posts: 45
Joined: Tue Sep 04, 2012 12:44 pm

Re: Planet Gravitation

Post by SCARD »

In another version i have another variable per gravitable, which specifies the current planet, so only the current planet spawns a gravity, but when you jump every planet spawns a gravity. maybe i''ll add this functionality to this little program. You have to know that i and 4 other friends do this project for university as a software project.

When our progress is at a certain level i will post more of this.
I think this could be the biggest project ever made with löve ;)
Taehl wrote:Looks neat so far. Having to repeatedly tap the controls to move instead of holding them was a bit odd. I enjoyed it more when I modified all three planets to be the same size, so you could orbit better and not just always land on the big one.

May I suggest a small addition to your code?

Code: Select all

function love.keypressed(k)
	if k == "escape" then love.event.quit() end
end
Well this is just a little demo and as already said it doesn't work too good but controles feel indeed very odd, you're right.
One question from my side: is love.event.push("quit") deprecated?
mickeyjm wrote:Nice. No love.physics i think/hope. You certainly did better than when I once tried something similar (I got as far as calculating the closest gravitational mass and gave up)

Only problem I've seen is that for some reason the bottom right planet has no gravity.

BTW what are those black blobs?
- love.physics is used to do the collisions and add forces
- the bottom right planet has at my computer a gravity ;)
- The black blobs are just some more little balls, that are influenced by the gravity of the 3 planets
Last edited by SCARD on Fri Mar 01, 2013 12:41 am, edited 1 time in total.
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: Planet Gravitation

Post by Taehl »

So what kind of a game is this going to be? Some kind of multi-planet platformer? A space-sim?
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
User avatar
SCARD
Prole
Posts: 45
Joined: Tue Sep 04, 2012 12:44 pm

Re: Planet Gravitation

Post by SCARD »

Taehl wrote:So what kind of a game is this going to be? Some kind of multi-planet platformer? A space-sim?
Basically it will be Super Mario Galaxy in 2D, i hope :)
But more of the actual game when we are at a certain level.
Maybe we release a demo with a little test level when everything works fine!
User avatar
SCARD
Prole
Posts: 45
Joined: Tue Sep 04, 2012 12:44 pm

Re: Planet Gravitation

Post by SCARD »

Added new functionallity!
User avatar
SCARD
Prole
Posts: 45
Joined: Tue Sep 04, 2012 12:44 pm

Re: Planet Gravitation

Post by SCARD »

Added version 0.3
TheScriptan
Citizen
Posts: 56
Joined: Wed Feb 27, 2013 7:53 pm

Re: Planet Gravitation

Post by TheScriptan »

This Planet Gravitation is AWESOME! Keep it up, maybe from this some kinda game will come? :emo:
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: Planet Gravitation

Post by Germanunkol »

This is really nice :)

My 2 cents: Don't make a normal "platformer" with different graphics out of it. The part I liked the most was the adding/deleting of the objects. You should think about making that a game mechanic.
Example: You have a certain amount of "points" which you can transform into objects by clicking. Using this, you need to reach places. But you only have so many points you can use - the larger the object you create, the more points if takes...

Or something along those lines.
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
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests