User Tag List

Results 1 to 4 of 4

Thread: Top-down tile-based "painted" movement

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Mar 2013
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Top-down tile-based "painted" movement

    I am currently experimenting on a movement system that i would like to try out on a small Advance Wars-style top down turn based strategy game.

    I would like to have a movement-system where you:
    1) Click on a unit to select it
    2) From that unit, draw a small path that you want that unit to follow until its destination (not choppy movement like "snap-to-grid" or teleport, but fluid movement on the path that you have drawn)

    I want to limit the amount of tiles that you can move the unit in to 5 and you need to draw the movement in a way that doesn't overlap itself or go backwards into itself etc.


    Has anyone tried this before?
    I don't really know how to implement this since this type of movement is new to me.

    Here is a small file that i have started on, if it's of any help: paint movement.mfa

    Also here is a picture illustrating what I am trying to do:
    example.jpg

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,344
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    What do you mean with "not choppy movement like 'snap-to-grid'"? I'm just confused since the images clearly shows that the movement should snap to a grid.

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,305
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Popcorn View Post
    What do you mean with "not choppy movement like 'snap-to-grid'"? I'm just confused since the images clearly shows that the movement should snap to a grid.
    I'm guessing he means that the path should be snapped to a grid, but the actual movement of the unit along the path should be smooth.

    Anyway, I've done this before, and I can tell you that there are likely to be a lot of cases you hadn't considered, which make it much more complicated than you want it to be...



    There's the case you're already aware of, where the player draws a line that crosses over itself, in which case the extraneous line should be deleted, but what if the line doesn't cross over itself?
    In the top picture, the player draws a twisty path (more than 5 squares in length) when a more direct route is possible. Should the line be automatically straightened out so that the unit can reach the square that the player intends, as shown in the second picture? In Advance Wars, the movement arrow follows the path given by the player exactly (this is important for uncovering hidden units in Fog of War situations), but if the path is too long, then it is automatically altered (reaching the intended square takes precedence).

    Likewise, in the third picture, the path drawn by the player passes through an obstacle. Should the line be automatically re-directed around the obstacle (using a pathfinding algorithm) so that the unit can reach the square that the player intends, as shown in the final picture? Again, that is what Advance Wars does.

    And what about movement costs? You mention a fixed 5 square movement range, but every other turn-based tactics game that I know of, has a varying movement cost (based on the type of terrain being traversed), which would further complicate matters.

  4. #4
    Clicker Fusion 2.5Fusion 2.5 Mac
    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)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    780
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    Can't you e.g. have a 32x32 object set to the mouse and move that 32 pixel at a time, every time the position changes you save the X/Y to an arrays Y value? And then you just move the player to each position and when you reach it you move on to the next until there's no more Y values.

Similar Threads

  1. Replies: 6
    Last Post: 18th August 2015, 02:23 AM
  2. Comment lire un fichier "tile map" dans MF2 ?
    By imported_gamemaker in forum Multimedia Fusion 2 - Technical Support
    Replies: 37
    Last Post: 3rd December 2011, 08:04 PM
  3. Issues with "Clickteam Movement Controller" and "Runtime" Object
    By jimmyorpheus in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 29th November 2011, 07:10 AM
  4. Recommended setting of "Timer-based Movements"
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 6th December 2009, 03:23 PM
  5. Grid Based "node" movement pathfinder?
    By Kingoftaurus in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 7th July 2009, 03:17 AM

Posting Permissions

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