A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Dream Maze ! yea right.....

Hybrid View

  1. #1
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Hey guys whats up ?
    I know this sux for now but whant to hear what you think. I used the tiles approach Ive been talking with FlashKat. and seems that she/he was right that it will slow down the game. I used arround 100 MC jeez thats alot. this will change. Use the spc bar to shoot stuff.

    http://savco.virtualave.net/maze.swf

    credit to rsnail for the hero animation.

    Strategie wich I used 4 tiles MC up down left and right.
    hero moves in all dirs. by default
    you have to step on tile and a direction will be disabled.
    OK thats it.
    I will change the approach and post new samples. Once I get it right will post the fla as well.
    Mad_sci
    PS I was on a vacantion in Las Vegas. This place rocks guys.

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    323
    Sorry I didn't get in on this one sooner...

    Seems to me you could do this with a grid... Don't necessarily move the hero with the grid, but after every pixel or unit of movement:

    (M = Number of pixels he moves with each iteration)
    (X,Y = hero's location in pixels)
    (G = width/height of one grid square)

    If he's moving left:
    Get the location of (X-M,Y)
    Call a procedure to translate this to grid coordinates
    gX = Int(((X-M) + (G/2)) / G) * G
    gY = Int(((Y) + (G/2)) / G) * G
    Check your grid to see if there's a barrier there.
    If so, make him stop moving.

    So you see, this approach will let you have a grid-based map (or multiple ones loaded from text files), but still have the hero move in 1-pixel (or whatever) increments.

    Oh, and of course by a grid, I mean a 2D array... "grid_1_1" and the like... The grid values could be "0" for open space, "1" for a wall, "2" for a player or enemy, or anything you want... It's a pain to code, but it will run faster and more efficiently than having hundreds of MCs.

  3. #3
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Sorry guys server wil be down for couple of days for update.
    Xantor definately this is the way to go I thought that I can do it otherway arround.
    It works preaty good for small mazes to tell you the trought. this one is big.
    Mad_ci

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    435
    Lol, Mad-Sic, you are just like me. But over time I learned that the fast way is often not the best way.

    I hope that you will not be set back to much in developing your game.

    Don’t for get to plan out your reweighs, so you don’t forget something important!

  5. #5
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Howdy FlashKat, you know what when i whant something done I want it yestarday you know. he he he. Set Back ? Jee I have to redo from scratch. he he. NO rush
    Mad_sci

  6. #6
    Senior Member
    Join Date
    Jun 2000
    Posts
    435
    Hay that means we could talk TBWs again!

    I have bin thinking about using game events to tigers for other stuff. Things like activating story line from collision detection or timers.

    But most importantly haw to store “story or scripts” and dynamically references them.

  7. #7
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Listen Ill redo the maze tiles from variables see how this goes. though it is a pain here Xentor is right. Now Ill be using 0 and 1. for walk or not to walk. Now I was thinking to make a simple script to generate look up tables on the fly. I need cgi script ( FlashDB is perfect ).
    Keep in touch.
    Mad_sci

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center