Skip to content

Instantly share code, notes, and snippets.

@jjmajava
Forked from anonymous/readme.txt
Created December 26, 2017 13:35
Show Gist options
  • Save jjmajava/8f53f7cbc8f00702f95f7103060e0721 to your computer and use it in GitHub Desktop.
Save jjmajava/8f53f7cbc8f00702f95f7103060e0721 to your computer and use it in GitHub Desktop.
title
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
Title Realtime button presses
realtime_interval 0.01
key_repeat_interval 0.07
Run_rules_on_level_start
norepeat_action
========
OBJECTS
========
Background .
black
Wall #
grey
Hero @
white
Player P
transparent
Tick T
transparent
BtnD
lightgreen
.....
.....
.....
..0..
.....
BtnL
lightgreen
.....
.....
.0...
.....
.....
BtnR
lightgreen
.....
.....
...0.
.....
.....
BtnU
lightgreen
.....
..0..
.....
.....
.....
BtnX
red
.....
.0.0.
..0..
.0.0.
.....
FirstPress P1
darkgreen
SecondPress P2
green
W32
transparent
W16
transparent
W8
transparent
W4
transparent
W2
transparent
W1
transparent
CD
transparent
=======
LEGEND
=======
Press = FirstPress or SecondPress
Btn = BtnU or BtnD or BtnL or BtnR or BtnX
BtnDir = BtnU or BtnD or BtnL or BtnR
BtnH = BtnL or BtnR
BtnV = BtnU or BtnD
S = Wall and Player and Tick
W = W1 or W2 or W4 or W8 or W16 or W32
SmallW = W1 or W2 or W4
=======
SOUNDS
=======
sfx0 32471906
================
COLLISIONLAYERS
================
Background
Wall Hero
Player
Tick
FirstPress SecondPress
BtnR
BtnL
BtnU
BtnD
BtnX
CD
W1
W2
W4
W8
W16
W32
======
RULES
======
( Tick and movement instructions )
[ P ] -> [ P T ]
( Read button presses )
[ P T FirstPress ] -> [ P T SecondPress ]
[ moving P T no Press ] -> [ moving P T FirstPress ]
[ up P T ] -> [ P no T BtnU ]
[ down P T ] -> [ P no T BtnD ]
[ left P T ] -> [ P no T BtnL ]
[ right P T ] -> [ P no T BtnR ]
[ action P T ] -> [ P no T BtnX ]
( Move Hero )
( Clear buttons when opposing buttons pressed )
[ T BtnU BtnD ] -> [ T W8 W2 ]
[ T BtnL BtnR ] -> [ T W8 W2 ]
( Just mae sound on action )
[ T BtnX P2 no W ][ Hero ] -> [ T P2 ][ Hero ] sfx0
( )
up random [ T BtnU BtnR P2 no W ][ Hero | no Wall ] -> [ T BtnU BtnR P2 ][ | Hero ]
[ T BtnU BtnR P2 no W ][ Hero ] -> [ T W8 ][ right Hero ]
up random [ T BtnU BtnL P2 no W ][ Hero | no Wall ] -> [ T BtnU BtnL P2 ][ | Hero ]
[ T BtnU BtnL P2 no W ][ Hero ] -> [ T W8 ][ left Hero ]
down random [ T BtnD BtnR P2 no W ][ Hero | no Wall ] -> [ T BtnD BtnR P2 ][ | Hero ]
[ T BtnD BtnR P2 no W ][ Hero ] -> [ T W8 ][ right Hero ]
down random [ T BtnD BtnL P2 no W ][ Hero | no Wall ] -> [ T BtnD BtnL P2 ][ | Hero ]
[ T BtnD BtnL P2 no W ][ Hero ] -> [ T W8 ][ left Hero ]
[ T BtnU P2 no W ][ Hero ] -> [ T W4 W1 ][ up Hero ]
[ T BtnD P2 no W ][ Hero ] -> [ T W4 W1 ][ down Hero ]
[ T BtnL P2 no W ][ Hero ] -> [ T W4 W1 ][ left Hero ]
[ T BtnR P2 no W ][ Hero ] -> [ T W4 W1 ][ right Hero ]
[ T SecondPress no W ] -> [ T no Press no Btn ]
( Waiting )
late [ T ][ W ] -> [ T ][ W CD ]
late [ T ][ W1 CD ] -> [ T ][ ]
late [ T ][ W2 CD no W1 ] -> [ T ][ W1 ]
late [ T ][ W4 CD no W2 no W1 ] -> [ T ][ W2 W1 ]
late [ T ][ W8 CD no W4 no W2 no W1 ] -> [ T ][ W4 W2 W1 ]
late [ T ][ W16 CD no W8 no W4 no W2 no W1 ] -> [ T ][ W8 W4 W2 W1 ]
late [ T ][ W32 CD no W16 no W8 no W4 no W2 no W1 ] -> [ T ][ W16 W8 W4 W2 W1 ]
late [ T ] -> [ no T ]
==============
WINCONDITIONS
==============
=======
LEVELS
=======
########################
#...#...#..............#
#.#...#.##.............#
#.###.#...........@....#
#.#...#................#
#.....#......##........#
###...#.......##.......#
#.##.##..##....##......#
#.#..#....##....##.....#
#...##.....#...###.....#
#.###......#...#p###.###
#...#......#...###.....#
###.##....##...........#
##...##..##............#
#.....#................#
#.....#................#
##.....................#
########################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment