Skip to content

Instantly share code, notes, and snippets.

@jjmajava
Last active August 29, 2015 14:14
Show Gist options
  • Save jjmajava/5224979cc865396eea12 to your computer and use it in GitHub Desktop.
Save jjmajava/5224979cc865396eea12 to your computer and use it in GitHub Desktop.
Drunken walk
title Drunkard walk
run_rules_on_level_start
(http://pcg.wikidot.com/pcg-algorithm:drunkard-walk)
========
OBJECTS
========
Background
LIGHTGREEN GREEN
11111
01111
11101
11111
10111
Wall #
BROWN DARKBROWN
00010
11111
01000
11111
00010
Edge -
grey darkgrey
00010
11111
01000
11111
00010
Player
Black Orange White Blue
.000.
.111.
22222
.333.
.3.3.
flood
white
=======
LEGEND
=======
P = Player and flood
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
Flood
Player, Wall, edge
======
RULES
======
startloop
random [ flood | wall ] -> [ | flood ]
random [ flood | edge ][ no wall no edge | wall ] -> [ | edge ][ | flood ]
endloop
random [ flood ][ wall | no wall no edge ] -> [ ][ flood | ]
startloop
random [ flood | wall ] -> [ | flood ]
random [ flood | edge ][ no wall no edge | wall ] -> [ | edge ][ | flood ]
endloop
random [ flood ][ wall | no wall no edge ] -> [ ][ flood | ]
startloop
random [ flood | wall ] -> [ | flood ]
random [ flood | edge ][ no wall no edge | wall ] -> [ | edge ][ | flood ]
endloop
[ flood ] -> [ ]
==============
WINCONDITIONS
==============
=======
LEVELS
=======
------------------------
-######################-
-######################-
-######################-
-######################-
-######################-
-######################-
-######################-
-######################-
-###########P##########-
-######################-
-######################-
-######################-
-######################-
-######################-
-######################-
-######################-
-######################-
-######################-
------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment