User Tag List

Results 1 to 7 of 7

Thread: AGBO problems example - Bejeweled clone

  1. #1
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Tiles's Avatar
    Join Date
    Jun 2006
    Posts
    1,359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AGBO problems example - Bejeweled clone

    Here the needed examples. First file is the original file that comes with AGBO. It uses 6 bricks. Then i sucessfully managed to set the number of bricks to 7. That`s the second file. I have also added a diagonal search.

    But every try to set the number of bricks to something bigger does not work. I have filled in more direcitons. And changed the code i thought i have to change. But the directions are not displayed. And the game itself works buggy now, diagonal search fails for example. That`s the third file inside the zip.

    To define my goals a bit closer: i want it with more bricktypes. Plus i want to fill in some "dead" bricks too.

    My biggest problem is to understand how AGBO really works. It`s too much code in the examples. I am a bit lost with it
    Attached files Attached files

  2. #2
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: AGBO problems example - Bejeweled clone

    You know how a fastloop works:
    You start it and it runs a number of times, each time with a different loop index.

    AGBO works very much the same way when you start a search for connected bricks - except that 'on found connected' only happens if there actually were any bricks found in the search.
    The 'on found connected' event is similar to the 'on loop' event in MMF2 in the way that it happens immediately after calling one of the search methods.

    What people often get confused about is what all the stuff about 'marking bricks as used' is about.
    If you want to search both horizontally and vertically for connected bricks and destroy them you will run into trouble.

    Some finely crafted images to explain the problem when I fail to do it in words :-)




    I'll look at the files you uploaded shortly

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Tiles's Avatar
    Join Date
    Jun 2006
    Posts
    1,359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AGBO problems example - Bejeweled clone

    Thanks for explanation. I already understand that part somehow. Fastloops are nothing new to me. What i am still lost with is how to tell the AGBO what a brick is, how the brick is connected with the AGBO

  4. #4
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: AGBO problems example - Bejeweled clone

    AGBO has two "modes" kinda when it comes to active objects being bricks in AGBO.

    The first one is where each active represents one slot in the board. Those slots are stationary and the objects never move from their spot, but they change appearance after what brick is stored on their location. For that I mostly used directions to represent each cell. The 0 direction was the empty cell while the other directions were actual bricks.

    This was the first mode I coded but I realized that often you want the bricks to move around smoothly (for example by using MoveIt or with some custom movement engine) and not being forced to have one active object for each AGBO cell.

    For that I coded the 'Move fixed values with bricks' option (in the setup dialog). For this to make sense, you need to store the fixed value of the active object into the position on the board where you want it.

    If you do any action in AGBO that makes the bricks in the board move around, for example gravity or swap bricks, then the fixed values on the board will move around as well. Using this new mode you don't need to have one active object for each AGBO cell, but only have one active object for each brick you actually have on your board. I recommend that you check all the check boxes in the AGBO setup dialog and use the new mode for moving around active objects.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Tiles's Avatar
    Join Date
    Jun 2006
    Posts
    1,359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AGBO problems example - Bejeweled clone

    Thanks for explanation. That makes sense in case you want to move the blocks

    In our case here all i want to do is to use your old example (which uses the old method, one cell equal one block) and increase the number of bricks/directions. And cannot find where to do that.

    Andos i think you think too complicated. It`s the very first basics where i struggle here. How the actives are connected at all with AGBO

  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Posts
    1,630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AGBO problems example - Bejeweled clone

    On the last example I guess it's when he add object to queue of Move it and Move objects to XofCell (that part inside "Move it" folder. However I agree it could be simplified.

  7. #7
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: AGBO problems example - Bejeweled clone

    As in the other post I made, here is the link to a very simple example file showing only the very basics:
    http://click.andersriggelsen.dk/examples/files/agbo_explanation.mfa

Similar Threads

  1. AGBO help please
    By mikec in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 25th September 2011, 02:13 PM
  2. Bejeweled clone, check for one more possible turn
    By Tiles in forum File Archive
    Replies: 2
    Last Post: 20th January 2010, 07:38 AM
  3. Bejeweled checking for next possible turn problem
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 19th January 2010, 11: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
  •