Skip to content

Instantly share code, notes, and snippets.

@jcmiller11
Created July 8, 2021 20:49
Show Gist options
  • Select an option

  • Save jcmiller11/57b88dcc72032646c06216891551107b to your computer and use it in GitHub Desktop.

Select an option

Save jcmiller11/57b88dcc72032646c06216891551107b to your computer and use it in GitHub Desktop.
Simple Block Pushing Game (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Realtime Tick Movement
author jc
homepage www.puzzlescript.net
realtime_interval 0.5
========
OBJECTS
========
Background1
LIGHTGREEN GREEN
11111
01111
11101
11111
10111
Background2
GREEN LIGHTGREEN
11111
01111
11101
11111
10111
Player
Black Orange White Blue
.000.
.111.
22222
.333.
.3.3.
2to1Marker
transparent
UpMarker
grey
..0..
.000.
0.0.0
..0..
..0..
DownMarker
grey
..0..
..0..
0.0.0
.000.
..0..
LeftMarker
grey
..0..
.0...
00000
.0...
..0..
RightMarker
grey
..0..
...0.
00000
...0.
..0..
RealtimeMarker
transparent
=======
LEGEND
=======
Background = Background1 or Background2
DirMarkers = UpMarker or DownMarker or LeftMarker or RightMarker
. = Background1
P = Player
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
Player
2to1Marker
DirMarkers
RealtimeMarker
======
RULES
======
(Marker must be used for realtime so we know it's still a realtime turn even if we add a movement later)
[stationary Player] -> [Player RealtimeMarker]
(Make the background flash every realtime tick so we can see when those happen)
[Background2] [RealtimeMarker Player] -> [Background2] [RealtimeMarker Player 2to1Marker]
[RealtimeMarker Player no 2to1Marker] [Background1] -> [RealtimeMarker Player] [Background2]
[RealtimeMarker Player 2to1Marker] [Background2] -> [RealtimeMarker Player 2to1Marker] [Background1]
[2to1Marker] -> []
(Put a marker on the player if they push a direction and remove the movement)
[UP Player] -> [Player UpMarker]
[DOWN Player] -> [Player DownMarker]
[LEFT Player] -> [Player LeftMarker]
[RIGHT Player] -> [Player RightMarker]
(Do the movements, only on realtime tics)
[RealtimeMarker Player UpMarker ] -> [UP Player]
[RealtimeMarker Player DownMarker ] -> [DOWN Player]
[RealtimeMarker Player LeftMarker ] -> [LEFT Player]
[RealtimeMarker Player RightMarker] -> [RIGHT Player]
[RealtimeMarker] -> []
==============
WINCONDITIONS
==============
=======
LEVELS
=======
......
......
...P..
......
......
......
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment