User Tag List

Results 1 to 9 of 9

Thread: Gravity question

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    BiznessMan's Avatar
    Join Date
    Apr 2007
    Location
    Sandy UT
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Gravity question

    I am trying to achieve a platforming style game where the player can walk on the wall, floor, and ceiling of a group of actives. Here is a basic mockup of what I'm looking for


    The player would have to stick to each side of the floating platform. I was thinking maybe a "planetary orbit" system would work, but all of the examples use the Phisx Box 2d which I cannot find anywhere. Maybe this can be done using the built in physics engine?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,112
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    you don't need to use box 2D if your game is going to look like your mockup (eg using square tiles, not a 360 degree surface like a sphere) All it really requires is a basic fastloop platform movement and then you can have 4 different 'modes'.

    for the default gravity you'd have your standard x=left/right and y=up/down
    for reverse gravity you'd have the same except the y would be inverted
    for the side ways gravity instead of using y for the gravity you'd use x values as the gravity/jumping and the y values to move along.

  3. #3
    Clicker Fusion 2.5 DeveloperSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,306
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Yea..... You basically script a normal platform code of Y gravity. Then for the other sides of the walls, just invert the gravity values of Y falling to X falling.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    BiznessMan's Avatar
    Join Date
    Apr 2007
    Location
    Sandy UT
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I assume this means I would have to code my own platform movement rather than using the built in one? This is planned for an Android game so I don't know how well doing so many loops will run on the hardware.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,112
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    you wouldn't need too many loops.. pro tip - separate your loops into groups and disable the groups whenever you're not using them. I feel like you could get away with less than 6 loops running at any given time.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    BiznessMan's Avatar
    Join Date
    Apr 2007
    Location
    Sandy UT
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found the crawler example here which seems to be what I am looking for, but I am not sure how to reverse the movement if I am holding down another key. I'm also not too sure how to handle jumps changing gravity.
    Any ideas?

  7. #7
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If that's the crawler example I made for Krim (should be grey blocks on white) then all you need to do is reverse the speed value to be negative to change the direction. I can't tell because I don't have MMF2 anymore. There are a few games using the mechanic you mention (Hempuli's Once in Space is rather good) and such games do not change gravity while jumping. Rather, only walking over a corner changes the gravity direction.

  8. #8
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Yeah. I originally programmed the Box2D platform movement to cope with all the directions of the gravity.
    But I had to remove the code before initial release : 4 direction code X 4 different runtime = 16 chunks of code to maintain, a hell. And we had quite a few bugs in the platform movement at first. But I will re-implement this in a future version.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    BiznessMan's Avatar
    Join Date
    Apr 2007
    Location
    Sandy UT
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome to hear. Does anybody have a planetary gravity example that uses Box2D? Such as being able to run around on a big circle?

Similar Threads

  1. Fusion 2.5 Object Gravity Question
    By scottige in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 12th December 2013, 07:16 PM
  2. gravity movement question
    By zordork in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 6th June 2012, 08:19 PM
  3. Gravity
    By Degamer in forum The Games Factory 2 - Technical Support
    Replies: 7
    Last Post: 12th July 2010, 07:11 PM
  4. New Gravity
    By Guitaristinmakin in forum File Archive
    Replies: 7
    Last Post: 16th December 2007, 04:24 PM
  5. gravity
    By Taco in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 18th September 2007, 08:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •