sonneveld |
This is just a small test demo to show you what I meant with arrays and mazes:
Pinkun Maze Test
The aim: Walk around the maze to find the gem.. read solution.txt if you get lost.
Using 2 logics, 1 picture, 4 views and around 6 vars I've managed to create a working 6x6 maze in AGI. I could go up to 16x16 if I felt like it.. but it would be hard to navigate.
I can't release the tools yet, because they need a bit of cleaning up, but this is to demonstate them. I've borrowed a few graphics from space quest 2, but the picture background I made myself (you can tell!). The blockages don't quite block the player because add.to.pic doesn't create a large enough margin, I'll work on that. But they do represent a direction you can't travel in.
I plan on adding to this game, making the backgrounds a bit more varied and some other gameplay elements.
- Nick
|
AGI1122 |
Wow this is great, it would be pretty interesting to impliment a maze in V, I can't wait till the tools are released.
|
AGI1122 |
I decided to play around with what you have done and created a new maze that is 8x8, so far it looks pretty good I have not noticed any problems, I think I might try adding a few things like maybe some sort of warp that sends the player somewhere else in the maze if he touches it.
|
Andrew_Baker |
I was thinking today about an old algorithm that was published that could randomly generate solvable mazes. If I can find this code and convert it to AGI Logic, I'll post it. I was just hoping that someone else might also know the algorithm to which I am referring.
I figure that it could be possible to use this code and a bunch of pics that are shaped like different branching tunnels ( +, |_, --, etc.) to make a near-infinite number of mazes in the context of the same game. This would be good for people who are adding RPG elements to their AGI games (Like Apocalyptic Quest, or the Quest for Glory-type AGI's).
I know this algorithm is used in games such as ROGUE, NETHACK, Ancient Domains of Mystery, ALPHAMAN, and others of that type. Anyone who has played these games will know what I mean.
PS - If you spill Mr. Pibb on your keyboard, you get to go out and buy a new spill-proof keyboard. Learning is fun and expensive.
|
sonneveld |
I probably use the same algorithm for my maze generation. It would be too memory intensive for agi though.. there are probably other algorithms though.. The maze was generated before compiling in this instance..
algorithm:
setup an axb grid of cells that have doors up/down/left/right closed. give each cell a unique set number.
While there's still some unique cels: { pick a random cell pick a random direction pick the next cell in next direction isn't in the same set as the current cel, open direction and then combine the two sets }
you can simplify things a bit by only defining right and down.. then getting up and left from the adjacent cells.
I could have drawn 16 individual pics but I didn't have that much time and I wanted to get a working prototype working.
- Nick
|