User Tag List

Results 1 to 7 of 7

Thread: Level load - Change frame based on position

  1. #1
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    Vetmora's Avatar
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Level load - Change frame based on position

    Hi guys,

    In the game I'm currently creating I have a level loader that loads in the levels I create in the native frame editor. What I would like to do is have the "floor blocks" change their sprite to be either an left end piece, middle or right, etc., based on their position and other blocks around it. Not sure of the best way to describe it, haha.

    I thought using an array would work and could get it to store the positions of all the blocks. However I can't seem to the get it loop through all the blocks on level load and read from the array.

    The example below is sort of what I want, but have it load at start of frame with the blocks already there, rather than "drawing" it on the screen at runtime.

    https://onedrive.live.com/?cid=B1E7E...%21131&o=OneUp

    Anyone got ideas?

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,300
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    "Auto tile" is the term you're looking for - google that and you'll find countless explanations.
    There's at least one example on the clickstore, or my own here: http://create-games.com/download.asp?id=8855

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    909
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    What MuddyMole suggested is the way to go if you ever want to finish your game and keep your sanity Also, even the most complex Auto-tiling algorithms are much faster compared to reading from a (gigantic) array you would need to store this information. CPU always wins vs harddrive, even with an SSD. In my current project I store < 1% of all level assets, the rest is done (semi)-procedurally.

  4. #4
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    Vetmora's Avatar
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks MuddyMole, excellent examples. This is pretty much what I was looking for, however is it possible to have it run the loop "Paint" at start of frame with an already "painted" frame?

  5. #5
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    Vetmora's Avatar
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This link sums it up pretty well.

    https://youtu.be/YhX-i3GutrI

  6. #6
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    Vetmora's Avatar
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've attached one I've had a crack at. It sort of works but the animations are out of wack.

    Examples-edit.mfa

    EDIT:

    I managed to fix it. All I had to do was run loop paint 6 times instead of 9.

  7. #7
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    Vetmora's Avatar
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, so I've updated the level save/load feature to use an array instead of an ini, mainly for speed reasons. Basically just replaced all of the ini read/write actions with array equivalents. However after doing this the autotiling function now doesn't seem to work. Is there any known reasons for this to occur? Side effects of swapping from ini to array?

Similar Threads

  1. Replies: 1
    Last Post: 18th October 2015, 09:17 PM
  2. Save Frame Position Load Application Position
    By NotADuckMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 9th March 2015, 11:38 PM
  3. Load frame position problem
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 6th March 2013, 10:14 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
  •