Gravity !

phoenixbbsphoenixbbs Join Date: 2003-02-10 Member: 13379Members, Constellation, NS2 Playtester, Subnautica Playtester
Would it be possible to make gravity a variable in FP, it would allow designers to give mods / games a different feel.

I suppose the ideal would be to allow variable gravity - possibly even from several sources, i.e. 3 "gravitators" in the same room affecting how you can fly around it.

Comments

  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    I haven't dug too far in, but with a component system, this should be fairly easy to make.

    I will be digging into the code more, and probably producing some custom bits over the coming weeks and months as I get more familiar with the code.

    Or you could always learn to do it yourself ;) No time like the present when it comes to learning new skills :D hahaha
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    It seems to me that you will have full control over such things.
  • MurphyIdiotMurphyIdiot NS2 programmer Join Date: 2008-04-17 Member: 64095Members, Super Administrators, NS2 Developer, Subnautica Developer, Pistachionauts, Future Perfect Developer
    Already possible!

    Warning: Old video!

    Collision components have a gravity setting when physics is enabled and there are ways to adjust gravity in movement code as well.
  • cooliticcoolitic Right behind you Join Date: 2013-04-02 Member: 184609Members
    edited November 2014
    Now, can we make planets that rotate around a sun or black hole? (obviously quite a bit later)

    Remember, in a game like this, you want to make everything possible, ie: needs a large scope and such
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    But with it being so openly moddable, the community, particularly the early community, will hopefully produce a lot of content.

    If you are thinking about playing with making games, I'd certainly suggest buying this now, it's a great entry point.

    If you are looking for ready made games to play, give it a couple of months to let the modders get a feel for the game and engine.

    Although I expect to see new maps being created quite quickly, 'games' will take a bit longer.
  • HeadClotHeadClot Utah Join Date: 2009-12-20 Member: 69724Members
    edited November 2014
    Can We toggle gravity (to a Zero G State) in the game world if certain objects are destroyed or not present?

    Just curious,

    - HeadClot
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    HeadClot wrote: »
    Can We toggle gravity (to a Zero G State) in the game world if certain objects are destroyed or not present?
    Yes it would only take a couple of lines of Lua to do this. There's a function World_SetGravity to change the global gravity.
  • KalopsiaKalopsia Join Date: 2003-05-15 Member: 16331Members, Reinforced - Shadow
    How about an entity that would change the direction of gravity? E.g when switched, the wall or ceiling become the floor.
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    edited December 2014
    Kalopsia wrote: »
    How about an entity that would change the direction of gravity? E.g when switched, the wall or ceiling become the floor.

    If the functionality doesn't already exist, you'd be able to mod this in, for sure.

    What'd be REALLY cool is the ability to set localized gravity directions, like find the nearest surface point on a special mesh, and set the gravity vector to the normal vector of that point. You could have sphere-shaped levels, or re-create THAT scene from Inception. Not sure how well that would tie in with the physics system in the game... but at least for player movement you'd be able to do this.
  • dushandushan Breaker of Games Join Date: 2011-10-30 Member: 130202Members, NS2 Developer, Squad Five Blue, Pistachionauts
    For non-uniform gravity you'd want to set the global gravity to 0 and manually apply force to each dynamic body every frame based on their position. This could definitely be prototyped in Lua with what we have already - it wouldn't be very efficient but if it's popular we could drop a more general gravity system into the engine.

    As far as physics is concerned, gravity is just another force pulling on a body. Things get a bit more hairy when it comes to player characters. For convenience there are probably few places assuming that Y is up in the controller code and the animation won't be looking too good with changing gravity.
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    dushan wrote: »
    For non-uniform gravity you'd want to set the global gravity to 0 and manually apply force to each dynamic body every frame based on their position. This could definitely be prototyped in Lua with what we have already - it wouldn't be very efficient but if it's popular we could drop a more general gravity system into the engine.

    As far as physics is concerned, gravity is just another force pulling on a body. Things get a bit more hairy when it comes to player characters. For convenience there are probably few places assuming that Y is up in the controller code and the animation won't be looking too good with changing gravity.

    Ah, thanks. That's what I was wondering. I figured it would be easy enough to make players react to different "gravity", but as for actual physics stuff, I wasn't sure how flexible it would be in game.
  • clankill3rclankill3r Join Date: 2007-09-03 Member: 62145Members, NS2 Map Tester, Reinforced - Shadow
    @‌dushan
    Things get a bit more hairy when it comes to player characters. For convenience there are probably few places assuming that Y is up in the controller code and the animation won't be looking too good with changing gravity.

    Can those places be accessed by us? I'm working from time to time on a design document about a game with arbitrary gravity for over 7 years now.
    I have a lot of different mechanics to test and FP seems to be heading in a way for 'rapid' prototyping.
    Without it FP is still awesome! But with the possibility for arbitrary gravity I will so jump into FP :)
Sign In or Register to comment.