mazes

10/3/12 @ 11:13 pm

some people asked about Forget-Me-Not’s maze generation. it’s simple and brutish but makes some nice shapes because, symmetry! here’s what happens:

initial setup:

1. start with an entirely filled in grid of random proportions.

2. decide the maximum length of the path i’m allowed to carve, based on the size of the grid (max = total number of tiles divided by 5).

3. decide what kind of symmetry to use.
- none / vertical / horizontal / vertical + horizontal / diagonal / weird
- extra tiles carved away due to symmetry don’t count towards the max carve amount from step 2.

4. decide how many wrap points are allowed. wrap points are the bits at the edge of the grid where corridors wrap around to the opposite side.
- either none, 2 (common), or random amount up to 7 (rare).
- wrap points will be the only places i’m allowed to carve a tile from the edge of the map.

5. decide whether doubling back will be allowed (YEP is most common). if NOPE, then path carving can’t turn directly back on itself when changing direction (though it can still cross paths it’s already carved).

6. choose two start points.
- either top/bottom middle, or random
- positions right on the edge of the map aren’t allowed

7. choose random initial carving directions.
- if startpoint positions are top/bottom middle, direction can only be left or right.

8. decide current corridor length (how many steps it will be until the carving direction changes).
- minimum = 1, maximum = 11

9. carve!

carving loop (runs twice, once for each start position)

10. clear current tile

11. if level has symmetry, clear the mirroring tiles

12. move to next tile in current direction

13. keep doing that until current corridor length has been reached.

14. choose a new direction and corridor length, and repeat process.
- directions which lead (in the next step) to a tile on the edge of the map aren’t allowed.
- if doubling back is disallowed, new direction can’t be the opposite of current direction.

15. if at any point i’m about to hit the edge of the map, check to see if the number of allowed wrap points has been reached.

- if i can make more wrap points:
— clear the edge tile and the opposite edge tile.
— move current position to opposite side of map, one tile in
— carry on as we were..

- if i can’t make more wrap points:
— choose a new direction (with the same rules as mentioned in step 14)

16. keep going until total path length (from step 2) has been reached.

17. now do all that again for the second startpoint.

18. if at any point the number of cleared tiles is more than half the total number of tiles, reject this maze and start again. this is a simple way to (hopefully) avoid having too many large open areas… this game needs mostly just thin corridors.

19. lastly, run a flood fill to make sure every bit of path joins up to every other bit of path. if there are inaccessible areas, reject this maze.

~

(yeah needs diagrams. i hate making diagrams.)

the arbitrary little rules in this are just there to cause slight variations.. eg when doubling back is allowed you sometimes get an oddly shaped little room instead of several corridors, because the generator keeps going back over itself.

~

PS this thread shows a lovely way of making tiles automatically “join up” (like how the walls in FMN reconstruct themselves to connect with each other when bits are exploded), without needing huge amounts of if/else code.


pretty pictures

9/2/12 @ 11:00 pm

my friend johnreno made cool 3d Forget-Me-Not art!

<3


Update-Me-Do

20/12/11 @ 5:38 pm

Forget-Me-Not v2.0 for iOS is finally out \o/

It’s got…..

* All the new stuff from the PC/Mac version (new enemies, more fruit, etc)..

* Two difficulties:

[Original] – like FMN v1.

[Arcade] – like the PC version – faster and harder, and the lights go off when time runs out.

* Two new game modes:

[Seed] – Everyone in the world gets the same set of levels, which changes once a day. Replay the day’s levels as many times as you want to compete for highscores. Level change time should be midnight in California, which should mean it syncs up with Game Center’s “today’s scores” function. Hopefully.

[Arena] – There’s just one big level. There’s no door. Enemies keep appearing, flowers keep being replenished, the walls keep being blasted away. Oh, and you only get one life.

* All new leaderboards. When you load the update, your scores will be wiped. But don’t panic, the old ones are still there! They’re just locked.

* All modes have been tweaked a bunch to try to make things more balanced. Looking forward to people finding a way to exploit it again now :D

* It’s now MORE RANDOM. Except for certain things which are less random. :O

* Oh yeah and, iCade support. The iCade controls are reworked – 8-way instead of 4-way like touch controls. You can’t control menus with iCade at the moment, I’ll add that in soon I think. I haven’t been able to test it on iCade in person, but have been told it works well. Let me know how you go with it..

App store linku.

Enjoy <3

###

edit: just been told that this update crashes on iOS 3.1.3.. sorry about that, 3.1.3 people. i’ll try to figure it out..

 


FMN for Pandora!

9/11/11 @ 11:11 pm

Forget-Me-Not has been ported to Pandora! Super fast work (after a long delay when I kept forgetting to send the source code over) by ZXDunny. Thanks man, and good job!

I don’t have a Pandora myself but apparently the game plays pretty well, except for a bit of slowdown when there’s heaps going on I think.. my code could definitely use some optimising :)  There may be some other issues (e.g. stereo panning is slightly off in the current build, apparently) but I think Dunny is onto it!

You can grab the port here.


buttonless

9/11/11 @ 10:41 pm

Ryan Rigney has written a book called Buttonless, about some cool iOS games and the stories behind them. Basically it’s about the people who made the games, and whatever odd things they went through while making them. There’s a bit about Forget-Me-Not in there somewhere =)  Should be really interesting, looking at some of the other people who were interviewed. (ENVIROBEAR!)

It’s preorderable from Amazon here.


% © NYARLU LABS % wordpress theme based on aav1 %