User Tag List

Results 1 to 9 of 9

Thread: Pathfinding Object > Fun > Generate Maze

  1. #1
    No Products Registered

    Join Date
    Nov 2007
    Location
    Wales
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pathfinding Object > Fun > Generate Maze

    Is the Generate Maze function of the Pathfinding object broken?
    I can't seem to get it to work.

    I don't need to use this for anything that I'm working on at the mo, but I occasionally like to take a short break from my main project and potter around with things that I might want to do for future projects.

    I've looked at the various maze algorithms mentioned here and elsewhere, and I'm going to knock something up in C++ later before trying it in MMF2, but I'd just like to see whether the "Generate Maze" function of the Pathfinding object would be useful or not.

    On a separate note, I'm in need of several extensions that various example files need to work, and was wondering if anyone knew where I could get them, and if they can work in MMf2.

    The extensions are:
    ScrollBar.mfx
    SliderBar.mfx
    ColourPicker.mfx
    PrintIt.mfx

    Thanks for any help,
    Krush.

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

    Re: Pathfinding Object > Fun > Generate Maze

    If you have installed all the bonus packs and if you don't see them on the Extension list here

    http://ext.neatwares.ath.cx/

    They are most likely old MMF 1.5 extensions that can not be ported.

    You can get the bonus packs on the side bar ----->

  3. #3
    No Products Registered

    Join Date
    Nov 2007
    Location
    Wales
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding Object > Fun > Generate Maze

    I installed all the bonus packs when I first bought MMF2, but I'll check them all again just in case I missed one.
    I've a feeling that some, if not all of them are 1.5 extensions, so it might be a lost cause.

    Any idea about the Generate Maze function?
    All the other functions of the Pathfinding object seem to work fine.

    Cheers.

  4. #4
    No Products Registered

    Join Date
    Jul 2006
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding Object > Fun > Generate Maze

    I tested it a few minutes ago and it worked then.. What's the version number of the pathfinding object? Latest should be 1.3 I think. I'll upload an example to the file archive (but there is a bug which can make it crash that I know of. I fixed that a few days ago and sent it to Yves, so he might have updated the extension pack).

  5. #5
    No Products Registered

    Join Date
    Nov 2007
    Location
    Wales
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding Object > Fun > Generate Maze

    Thanks mate.

    I can't understand what it was I was doing wrong last night, as it seems to be the same as your example.

    When I tested it last night, I did the following:

    :: Set the size of the maze
    :: used Generate Maze
    :: used nested fast loops to display the maze using a default diamond shape pasted into the background when an obstacle was found in the map data.

    Pretty much what you've done, except yours works.

    I either did something wrong in the fast loops where reading the data is concerned (although I can't see how to get that wrong), or maybe I had an earlier version of the object.

    After my post yesterday, I went and downloaded all 4 packs on the right side of the page.
    Although I was sure I'd done this when I first installed MMF2, I thought it wouldn't hurt to make sure.
    Is it possible I had a real old version from somewhere that didn't work?

    Anyway, thanks for saving my sanity with your example.

    One more thing; Is there a randomiser that can be used with the Generate Maze function?
    I can't find one, and generating a map of the same dimensions creates exactly the same map every time.

    Thanks again for your help.

    Krush.

  6. #6
    No Products Registered

    Join Date
    Jul 2006
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding Object > Fun > Generate Maze

    Does it create the same maze every time? For me it doesn't.. Try start the example, press F2 (restart the game) a few times to see if the maze changes. Because they can look a lot the same.

  7. #7
    No Products Registered

    Join Date
    Nov 2007
    Location
    Wales
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding Object > Fun > Generate Maze

    Lol, yeah it would be easy to become maze blind, but they're definitely the same maze.

    Pressing F2 does create a new and random maze, each time different to the last layout, but if you run the program from scratch, it's always the same maze that appears first, and all the subsequent mazes are the same as they were the last time.

    It also happens in a compiled exe.

    So it appears to be using the same sequence of numbers each time it's run fresh.
    I could always loop through the maze creation a random amount of times, but there would be some duplication if the random number was the same as a previous time. i.e. rather than creating random mazes, it would almost be like picking a maze from a set of pre-calculated mazes.

    In C++ or Z80 you'd just use the contents of whatever location the computers Program Counter was pointing at as a seed, which always gave a good random result, but I don't know if MMF2 has a randomising seed function like this, or whether it would be need to be programmed into your PathFinding object.

    I think I remember seeing a random object or function somewhere in MMF2, but I haven't got time to have a look now.

    I'll give it a go later and let you know how it goes.

    Cheers.

  8. #8
    No Products Registered

    Join Date
    Jul 2006
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding Object > Fun > Generate Maze

    Sorry, then random might be disabled by me, since the maze generation function is more there for fun, not to be useful.. But I can ask Yves to add a seed to rand function when he compiles the other update I gave him a few days ago. Just one line of code, "srand(time(NULL));"

  9. #9
    No Products Registered

    Join Date
    Nov 2007
    Location
    Wales
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding Object > Fun > Generate Maze

    If you could z33z, that would be great.
    All my attempts to make MMF2 randomise the outcome have failed.

    Quote Originally Posted by z33z
    since the maze generation function is more there for fun, not to be useful..
    Ahh, but it is useful.

Similar Threads

  1. pathfinding object
    By westray in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th April 2012, 11:30 PM
  2. Generate Bad object
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 17th December 2010, 08:25 PM
  3. Moving a mouse controled object in a maze
    By DEKE15 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 6th February 2010, 06:59 PM
  4. Pathfinding & Maze Example
    By LB in forum File Archive
    Replies: 5
    Last Post: 19th July 2009, 08:09 PM
  5. Pathfinding object
    By Stephen38 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 21st February 2008, 06:09 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
  •