User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Random dungeon help.

  1. #1
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Random dungeon help.

    Hello

    Since i have my player movement and some other things down i want to make a random dungeon.

    I used the random dungeon object.
    The grid the player moves on is 32x32.

    So i made a 32x32 wall, floortile and door.

    So far so good. But now it gets tricky.
    1. The generated dungeon is never on the top left corner of the screen. It's always one 'gridstep' (32x32) down and right. I tried everything, i can't move the grid somewhere else.

    2. The size of the dungeon i don't get it. When i make 8x8 shouldn't there be 8 walls? It's 9! I don't get it.

    3. When i generate a very large dungeon the programm stops for ages and windows says that it's "not responding". What should i do?

    I learned it all from Nivrams "Random Dungeon Generation Example" (forum says i'm not allowed to post link). But that doesnt help me any further, due to lack of documentation.
    Then i tried to learn from "Dungeon Dash" (on nivrams page aswell). But there are so many variables, that i can't understand that at all. Are there any other Random Dungeon generation tutorials?

    Regards

  2. #2
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay this is getting dumb. Problem after problem.

    The application window is currently 640x480. The Frame is bigger. Camera is always centered around player. The dungeon generated outside of the initial viewfield is sometimes shown, sometimes not. But it's there, i tried to walk with the player through the white area and it works, the obstacles (walls) are there. But not displayed....

  3. #3
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We'll have better luck understanding your problem if you upload an example file so we can check out your code

  4. #4
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I recreated it and left some stuff (movement etc) out for better overview of the event editor.

    Here you go:
    Attached files Attached files

  5. #5
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No one knows the answers? :/

  6. #6
    Forum Moderator

    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,754
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Give us a few.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  7. #7
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA 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)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I've never used the Dungeon object before, but I looked at the properties you had set for the dungeon object yesterday and wasn't able to figure anything out (everything seemed okay).

    After looking at it again and actually checking the event editor I realized why the generated dungeon is always offset down/right one square however. In your events you set the position of every room/wall block to +32/+32 after it's created. Get rid of that if you want the dungeon to be generated in the upper left corner.

    Edit: Okay, I figured the rest of it out.

    As for question #2, when you click on the properties of the dungeon object, go to the settings tab and click where it says 'Size'. If you read what it says at the bottom it explains that the actual size of the dungeon will be twice as large as the number you enter plus 1. Since you have the grid size set to 15x15, the actual grid size will be 31x31. Don't ask me why it's like that, but that's apparently how it works.

    Your problem for question number 3 is because you need to increase the number of objects allowed at runtime. Click on the frame in the workspace toolbar > runtime options > and change the number of objects at runtime to some large number. It should work after that.

    Here's the corrected mfa. Hope that helps.
    Attached files Attached files

  8. #8
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, awesome!

    Some beginner errors i did there....

    At question 2: Yes, this is kind of weird. Makes it impossible to get an even number. But i can always set for example screenY = 30*32+32 i guess.

    Thank you so much!

    Edit: Have no option to add "solved" to the topic title.

  9. #9
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Sorry, saw your PM too late I suppose. Yes, the dimensions of the dungeons object might seem a bit odd. The Size*2+1 part is how the library that I used for the dungeon generation works. It basically makes sense, because dungeons HAVE to have an odd (not even) size. With this method, it's impossible to enter an even number that would fail.

  10. #10
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't worry. Your extension is simply amazing.

    Just found out about the find random position function. Super.

    Regards

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Random Dungeon Generation
    By nivram in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 30th October 2011, 07:14 PM
  2. Random Dungeon generator?
    By Jacob in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 17th May 2008, 12:52 AM
  3. Random dungeon/maze generator, plz?
    By Karasu in forum The Games Factory 2 - Technical Support
    Replies: 9
    Last Post: 17th April 2007, 06:04 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
  •