User Tag List

Results 1 to 8 of 8

Thread: Wargame Map Object

  1. #1
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,821
    Mentioned
    7 Post(s)
    Tagged
    2 Thread(s)

    Wargame Map Object

    Wargame Map Object
    ===================

    The Wargame Map Object is an easy to use, but very effective map array object. Using the basis of a hexagon map as its foundation it can create a computer controlled A* movement path from one point to another.

    Programmed by Chris Branch
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do we know if this is still working for iOS? It seems to be working fine in Windows but in iOS it doesn't work and I can't even get a counter to display the map width.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CruddyBuddy View Post
    Do we know if this is still working for iOS? It seems to be working fine in Windows but in iOS it doesn't work and I can't even get a counter to display the map width.
    My mistake. It is working. I just needed to do a full, final xCode build instead of an application build.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another question: is there a way to change the orientation for the grid from a flat-top to a point-top hex pattern?

    THIS:
    Click image for larger version. 

Name:	2DHexMap_1.png 
Views:	24 
Size:	52.2 KB 
ID:	27045

    INSTEAD OF THIS:
    Click image for larger version. 

Name:	2DHexMap_2.png 
Views:	23 
Size:	40.2 KB 
ID:	27046

  5. #5
    Clicker

    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,706
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Hi CruddyBuddy. As it is now, no. Maybe the author can make changes. I think it is a good request.

    Marv
    ​455 MMF2 & CTF 2.5 Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Marv,

    I think hex tiles look a lot better with a pointed top orientation because they work better with an isometric perspective. The flat top orientation has the effect of making hex tiles look elongated, so the perspective is looking straight down on them. I suppose this could be fine for really flat tiles, but if you want objects to look isometric on the tiles, I think the pointed top looks far better.

    I wonder if the extension could be modified for this. There is already a function to change it from odd columns high to "even columns high", so the change would just be adding odd rows left or even rows left.

    Quote Originally Posted by nivram View Post
    Hi CruddyBuddy. As it is now, no. Maybe the author can make changes. I think it is a good request.

    Marv

  7. #7
    Clicker

    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,706
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    I concur with your observation and I think the Author would also agree.

    Marv
    ​455 MMF2 & CTF 2.5 Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up Solution

    So I figured out how to do it, and I'm posting this solution in case anyone else needs to make their hex grid with the point-top orientation. Here is a video to show it working:

    https://youtu.be/wnqr3C3w0k8

    In order to make this work, you need to fool the object into thinking the game is positioned sideways, or 90 degrees, so that the object will function as if the hex tiles are flat on the top, even thought they are flat on the sides instead. To do this, when setting the tile numbers, reverse the X and Y allocations. This is how it looks in my code:

    * Start of Frame
    Group.HexTiles : Set Tile X to 100 - ( Y( "Group.HexTiles" ) / 192 )
    Group.HexTiles : Set Tile Y to 100 - ( X( "Group.HexTiles" ) / 256 + 1 )

    As you can see, I have an alterable value for X and Y for each of my tiles. But instead of setting the the Tile X number to the X position, I'm setting it to the Y position, and vice-versa. This essentially rotates the map 90 degrees in the "mind" of the Wargame Map Object.

    But now we have a problem, because the tile order is in reverse, which causes the navigation mapping to go crazy because it thinks tiles are in the opposite location than they are, so when the pathway is calculated it will route the path to tiles it doesn't need to go in order to get to the destination. There is an easy fix for this, and it's actually already in the example above.

    Instead of saying "Set Tile X to ( Y( "Group.HexTiles" ) / 192 )" I am actually flipping the order of the tiles as well by including "100 - " to the front of the action, so if the tile would normally be set to Tile X = 2, Tile Y = 3, it will actually be 100 - 2 and 100 - 3, or Tile X = 98, Tile Y = 97. In my video example you can see that the tile numbers start at 99 at the top left and go down from there. Remember, the object thinks the game is rotated 90 degrees, so where the map is positioned on the top left, the hex object thinks is actually rotated to the top right. You just need to make sure your Wargame Map Object is set to size 99 x 99, or larger if your map is larger. It actually doesn't matter if you have fewer than that many tiles, so long as you don't have more than the map limit you set. And for some reason, you should make the map size 1x1 smaller than the number you are using in the action, so if you have it set as "Group.HexTiles : Set Tile X to 200 - ( Y( "Group.HexTiles" ) / 192 )" then make the map size 199x199.

    I hope this helps! Send me a message if you have any questions.

Similar Threads

  1. Hex Wargame Example?
    By XStar in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th October 2012, 11:08 AM
  2. wargame map object?
    By Skyhunter in forum SWF/Flash Export Module Version 2.0
    Replies: 0
    Last Post: 25th November 2010, 03:42 PM
  3. wargame object
    By Skyhunter in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 3rd November 2010, 11:44 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
  •