The Daily Click ::. Forums ::. Klik Coding Help ::. Planet gravity
 

Post Reply  Post Oekaki 
 

Posted By Message

markrasher



Registered
  25/02/2013 18:43:57
Points
  34
29th December, 2013 at 29/12/2013 15:27:34 -

Hello
i need some help.
i need to make multiple planets
and i want the player to walk on them
i dont know how to make gravity work
and i want to make big round planets.
anybody have an idea how to make that??
that simplest way possible


 
Check out my survival game project:
http://www.create-games.com/project.asp?view=main&id=2424

Superslimeboy

President of Space

Registered
  24/12/2012 09:15:07
Points
  55
29th December, 2013 at 29/12/2013 19:25:52 -

There's no simple way. To do this you'd need advanced math and trigonometry. I don't even know how you would start.


 
I forgive you, Wheatly.

Riptide



Registered
  26/07/2013 21:07:20
Points
  101
30th December, 2013 at 30/12/2013 11:27:03 -

Hi
Obviously you'll need a custom movement engine.
I would start to get the position of the player and the nearest planet/the size of the planet (bigger => more attraction) and adjust the angle of the player(for the feets to be on the planets) and adjust the gravity to positive or negative (Up or down), that looks really complex x)
The trigonometry is not my favorite math-part, it was just an idea good luck !

 
Working on some engines, working for the fun !

markrasher



Registered
  25/02/2013 18:43:57
Points
  34
30th December, 2013 at 30/12/2013 12:24:35 -

And how to adjust the angle of the player so its feet will be on the ground?
i dont need advanced gravity i just need him to walk across the planet.

 
Check out my survival game project:
http://www.create-games.com/project.asp?view=main&id=2424

Riptide



Registered
  26/07/2013 21:07:20
Points
  101
30th December, 2013 at 30/12/2013 22:07:34 -

Hey mark, i did this little example for you:
http://www.puu.sh/63UGu.mfa
(Angle of the player, and allow him to walk across the planet i dont know x) )

hope that will help
good luck bro !

Edited by Riptide

 
Working on some engines, working for the fun !

markrasher



Registered
  25/02/2013 18:43:57
Points
  34
31st December, 2013 at 31/12/2013 14:39:38 -

Thanks Riptide!

its a real problem with the gravity.
ill try to make it woriking!

thnaks very much

 
Check out my survival game project:
http://www.create-games.com/project.asp?view=main&id=2424

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
1st January, 2014 at 01/01/2014 18:20:39 -

It's actually not too hard at all, and as luck would have it, I was working on something like this before Christmas.
I made you an example here: http://sdrv.ms/1k84cKy

I know Pixelthief has also released similar engines before, so it might be worth checking out his downloads as well...

Happy New Year

 
n/a

Riptide



Registered
  26/07/2013 21:07:20
Points
  101
1st January, 2014 at 01/01/2014 22:34:10 -

Hey sketchy, thanks for your useful post, i'll definitively analyze this mfa, anyways happy new year all !

 
Working on some engines, working for the fun !

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
2nd January, 2014 at 02/01/2014 13:07:04 -

No worries
I was planning to make a kind of Worms clone, set in space, with destructible planets - but it turns out that has already been done before, so I won't bother (unless I make it far more strategic)
Image

 
n/a

Riptide



Registered
  26/07/2013 21:07:20
Points
  101
2nd January, 2014 at 02/01/2014 14:18:39 -

Wow sketchy that looks awesome !
Even if it has been made, this game is a sketchy game, meaning it's an awesome game ! I see all the efforts you put into the mmf2 community (examples and all) you're very good at maths and you got good ideas, did you learned mmf2 by yourself ? Anyway, you're awesome !

 
Working on some engines, working for the fun !

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
2nd January, 2014 at 02/01/2014 15:01:41 -

Sorry - I didn't make that - that's the game that someone else already made. It's just to show you the kind of thing I had in mind.
But yeah, thanks - that's very kind of you to say
And I started with Klik'n'Play many years ago, so I've had a while to learn stuff...

 
n/a
   

Post Reply



 



Advertisement

Worth A Click