User Tag List

Results 1 to 3 of 3

Thread: stop the star - object overrun problem

  1. #1
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    stop the star - object overrun problem

    This is a relatively minor issue but it is bugging me, both in the specific instance I am working on and, less so, in relation to the general principle; I can imagine this coming up again. Bear with me here... (relative) newbie wandering in the woods.

    The game is a non-grid map and objects move along a path of several user determined x,y coordinates.
    User clicks the object, then clicks a series of way-points which the object then moves through.
    To test the accuracy of my array building I set up a loop using polygons.

    My challenge has been setting a condition so the object knows it has reached a way-point so it will then move on to the next way-point.

    The current approach is setting a small, stop-object at the upcoming way-point. The collision of the player's object (PO) with the stop-object is the switch condition. The trouble is 'speed.' When the speed of the PO reaches a certain value the (or at least my) computer fails to register the collision and the PO just shoots off the screen. Making the stop-object bigger allows for greater speed but then the collision point is moved further from the actual way-point.

    As far as this game goes - realistic speeds won't pose this problem
    As regards the future - the problem may well arise
    As regards my nerdy mind... you can fill in the blanks here

    So, the question is: "How to set up a reliable condition to test the location of a moving object?"
    A second question might be: "Can you suggest a simpler way of doing this?"

    The example here will make it all clear:
    http://www.buddhamind.info/mmf/AK_Point2Point.mfa

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: stop the star - object overrun problem

    1. If it's not registering the collision at high speeds, then you're moving the objects the wrong way. If an object's X speed is faster than it's X width, and the same for Y speed and Y Height, then it has a chance of skipping over things. This is when you should start to fastloop it's movement to make sure you get every pixel - but only when it is going fast like that.

    2. You shouldn't be using a collision marker anyway, all you have to do is compare if the distance from point A is greater or equal to the distance between point A and point B.
    Working as fast as I can on Fusion 3

  3. #3
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: stop the star - object overrun problem

    thanks LB
    It will take me a few minutes to digest 1.

    >> You shouldn't be using a collision marker anyway
    Yes, it felt like a bit of a hack. Learning 'clean' code practices is part of my angularity here. Bare with me. I was also trying to minimise the amount of calculations going on.

    ps. am studying your PointA-B mfa and will test this against the formula I am currently using. Smoother stepping looks like one advantage.

    only 366 shopping days until xmas

Similar Threads

  1. How to make an object fall on another instance of the object and stop?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 20th June 2013, 09:42 PM
  2. Stop on collision problem
    By Reckless_Cowboy in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 9th June 2011, 05:08 AM
  3. Start animation when objects have stop problem
    By Worf in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 1st December 2009, 06:23 PM
  4. 3D Mesh Stop problem in Movement
    By 4444 in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 5th March 2007, 12:51 AM
  5. 3D Mesh Stop problem in Movement
    By 4444 in forum File Archive
    Replies: 0
    Last Post: 17th December 2006, 02:56 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
  •