User Tag List

Results 1 to 10 of 10

Thread: Tilebased movement

  1. #1
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Tilebased movement

    Hi!
    I have a question that is a littlebit difficult for me to explain, but I will give it a try.

    I walk pixel for pixel to for example left. When I change the direction to up or down, I don't want the player to change the direction before the new tile starts.

    Hope you understand me. If you have played Dig Dug before...well, it's excactly the same movement I need help with.


    Thanks

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Tilebased movement

    I believe the "Grid Based Movement" example on my website can do this.

    (open Source)
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #3
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tilebased movement

    it sounds like you want to move in a grid? So when you press left, you walk 16 pixels left, and if you press up, you wait until you finish moving the 16 pixels then move up.

    Is that what you wanted? If so, simply create an active object +/-16 x or y from where you want to move, and move you character i pixel at a time until it is in the same position as the active.
    Hard to explain right now, but there are numerous examples around somewhere

  4. #4
    No Products Registered

    Join Date
    Jul 2006
    Posts
    2,289
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Tilebased movement

    There is a widget that does that, too. See if it helps you at all:

    Grid Based Widget

  5. #5
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tilebased movement

    Quote Originally Posted by bigredron
    it sounds like you want to move in a grid? So when you press left, you walk 16 pixels left, and if you press up, you wait until you finish moving the 16 pixels then move up.

    Is that what you wanted? If so, simply create an active object +/-16 x or y from where you want to move, and move you character i pixel at a time until it is in the same position as the active.
    Hard to explain right now, but there are numerous examples around somewhere
    Almost correct!

    When I press left, I walk 1 pixel left of the tile that is 32x32. And when I press up, the player wait until the player finish the tile (32x32) then move up.

  6. #6
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Location
    USA
    Posts
    2,982
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Tilebased movement

    I tried making a tile based movement, but the problem I had with how i was coding it that the player would move in a stop and go fashion, if that makes sense. Like I would move, player would proceed to move to the next tile, then there would be a brief pause before they moved again.

    I tried making a continuous movement, but when I did that, it messed up the calculations for where the player is supposed to stop and I had the player moving past where they were supposed to go. I'm sure it was a problem with my coding however. If someone has an example of a grid/tile movement where you can move in a continuous manner without pauses I'd love to see it.

  7. #7
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Tilebased movement

    Shawn, I have one on my website ("Custom Grid Movement")
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  8. #8
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Location
    USA
    Posts
    2,982
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Tilebased movement

    Quote Originally Posted by nivram
    Shawn, I have one on my website ("Custom Grid Movement")
    Okay thanks! Sorry I've checked out some of your examples but I forgot the Custom Grid Movement example lol. I'll have to do that

  9. #9
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tilebased movement

    I don't think nobody understand excactly what I mean.
    Take a look at this online game of Dig Dug.

    http://www.heavygames.com/digdug/showgame.asp

    As you can see the player is moving 1 pixel at a time, but if you click at the up button when you walk left or right, the player finish the tile before he change the direction.

    So the question is: Does somebody know how I can fix this in MMF2?

  10. #10
    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)

    Re: Tilebased movement

    Quote Originally Posted by Novabrain
    There is a widget that does that, too. See if it helps you at all:

    Grid Based Widget
    Look at the code. You can quite easily apply this to a platform engine if that's what you need.

Similar Threads

  1. Movement synchronization issues (physics spaceship movement)
    By SecondSons in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 24th January 2014, 10:52 PM
  2. [Possible BUG] Clickteam Movement Controller vector movement
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 16th November 2012, 01:10 AM
  3. Platform movement on Active objects using Nifflas' basic movement widget
    By ac3raven in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th October 2012, 02:16 AM
  4. Spaceship movement left and right trought bouncing ball movement instead 8 direction?
    By daryuss in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd May 2012, 09:33 PM
  5. Vector movement/clickteam movement controller
    By Tuna in forum SWF/Flash Export Module Version 2.0
    Replies: 0
    Last Post: 18th July 2011, 03:11 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
  •