Skip to content

Instantly share code, notes, and snippets.

@hcs64
Last active July 4, 2022 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hcs64/3562bb288178b4adb486a33066b65d02 to your computer and use it in GitHub Desktop.
Save hcs64/3562bb288178b4adb486a33066b65d02 to your computer and use it in GitHub Desktop.
Time Loop
title Time Loop wip
author Adam Gashlin
homepage gashlin.net
key_repeat_interval 0.25
========
OBJECTS
========
Background
Black
Wall
Grey
Block
Yellow LightBrown
00000
01110
01110
01110
00000
BlockStart
Transparent
StartHidden
Transparent
Start
LightBlue Blue
00000
01110
01110
01110
01110
EndHidden
LightGrey Grey
00000
01110
01110
01110
01110
End
LightBlue Blue
00000
01110
01110
01110
01110
P1
Blue LightBrown Purple Pink
..3..
.111.
00000
12221
.2.2.
P1Ghost
Grey White DarkGrey
..2..
.111.
00000
12221
.2.2.
P1Shadow
Transparent
P2
Blue LightBrown Purple Pink
..3..
.111.
00000
12221
.2.2.
P2Ghost
Blue LightBrown Purple Pink
..3..
.111.
00000
12221
.2.2.
P2Shadow
Transparent
Tombstone
DarkGrey Black
.000.
00100
01110
00100
00000
MemUp
Green White
00000
00100
01110
00000
00000
MemDown
Green White
00000
00000
01110
00100
00000
MemLeft
Green White
00000
00100
01100
00100
00000
MemRight
Green White
00000
00100
00110
00100
00000
MemWait
Green White
00000
00000
00100
00000
00000
MemSpace
Green
WriteHead
Blue
00000
0...0
0...0
0...0
00000
WroteHead
Transparent
ReadStart
Transparent
ReadHead
LightGreen
00000
0...0
0...0
0...0
00000
ReadedHead
Transparent
TutorialFlag
Transparent
=======
LEGEND
=======
Player = P1 or P2
Mem = MemUp or MemDown or MemLeft or MemRight or MemWait
. = Background
# = Wall
b = Block and BlockStart
- = MemSpace
! = TutorialFlag and Wall
( start in phase 1 )
s = StartHidden and P1
e = End
o = ReadStart and WriteHead and MemSpace
( start in phase 2 )
a = EndHidden and P2
z = Start and P1Ghost
} = MemRight and ReadHead and MemSpace
{ = MemLeft and ReadHead and MemSpace
~ = MemUp and ReadHead and MemSpace
_ = MemDown and ReadHead and MemSpace
% = MemWait and ReadHead and MemSpace
r = MemRight and MemSpace
l = MemLeft and MemSpace
u = MemUp and MemSpace
d = MemDown and MemSpace
w = MemWait and MemSpace
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
Start, StartHidden, End, EndHidden, TutorialFlag, BlockStart
P1, P2, P1Ghost, P2Ghost, Tombstone, Wall, Block, MemSpace
WriteHead, WroteHead
Mem, P1Shadow, P2Shadow
ReadStart, ReadHead, ReadedHead
======
RULES
======
(install "must-move" shadow)
[ P1 ] -> [ P1 P1Shadow ]
[ P1Ghost ] -> [ P1Ghost P1Shadow ]
[ P2 ] -> [ P2 P2Shadow ]
( remember Phase 1 movements )
[ up P1 ] [ WriteHead ] -> [ up P1 ] [ MemUp WroteHead ]
[ down P1 ] [ WriteHead ] -> [ down P1 ] [ MemDown WroteHead ]
[ left P1 ] [ WriteHead ] -> [ left P1 ] [ MemLeft WroteHead ]
[ right P1 ] [ WriteHead ] -> [ right P1 ] [ MemRight WroteHead ]
( wait removes shadow to allow no movement )
[ action P1 P1Shadow ] [ WriteHead ] -> [ P1 ] [ MemWait WroteHead ]
( advance the write head )
right [ WroteHead Mem | ] -> [ Mem | WriteHead ]
( remaining WroteHead means out of space horizontally, try CRLF )
left [ WroteHead Mem | Mem ] -> [ Mem | WroteHead Mem ]
down [ WroteHead | ] -> [ | WriteHead ]
( At this point WroteHead exists only if there is no more space, otherwise
(if we're in Phase 1) WriteHead exists. )
( replay movements into the ghost )
[ ReadHead MemUp ] [ P1Ghost ] -> [ ReadedHead ] [ up P1Ghost ]
[ ReadHead MemDown ] [ P1Ghost ] -> [ ReadedHead ] [ down P1Ghost ]
[ ReadHead MemLeft ] [ P1Ghost ] -> [ ReadedHead ] [ left P1Ghost ]
[ ReadHead MemRight ] [ P1Ghost ] -> [ ReadedHead ] [ right P1Ghost ]
( wait's only action is to remove the shadow )
[ ReadHead MemWait ] [ P1Ghost P1Shadow ] -> [ ReadedHead ] [ P1Ghost ]
( advance the read head )
right [ ReadedHead | ] -> [ | ReadHead ]
( remaining ReadedHead means out of space horizontally, try LFCR )
down [ ReadedHead | ] -> [ | ReadHead ]
left [ ReadHead | ... | Mem ] -> [ | ... | ReadHead Mem ]
( Can also wait in Phase 2 )
[ action P2 P2Shadow ] -> [ P2 ]
( player and ghost can push blocks )
[ > Player | Block ] -> [ > Player | > Block ]
[ > P1Ghost | Block ] -> [ > P1Ghost | > Block ]
( Time Travel 1: Remove blocks )
late [ P1 End ] [ Block ] [ StartHidden ] -> [ P1 End ] [] [ StartHidden ]
( Time Travel 2: Reset blocks, safe as the player is on an exit and _I won't start blocks on an exit_ )
late [ P1 End ] [ BlockStart ] [ StartHidden ] -> [ P1 End ] [ Block ] [ StartHidden ]
( Time Travel 3a (optional): WriteHead disappears (already be gone if we used the last space))
late [ P1 End ] [ WriteHead ] -> [ P1 End ] []
( Time Travel 3b (optional): WroteHead disappears (only present if we used the last space))
late [ P1 End ] [ WroteHead ] -> [ P1 End ] []
( Time Travel 4: Enter Phase 2, start Ghost, ReadStart becomes ReadHead )
late [ P1 End ] [ StartHidden ] [ ReadStart ] -> [ P2 EndHidden ] [ P1Ghost Start ] [ ReadHead ]
( tutorial )
late [TutorialFlag] [P2] -> [] [P2] message Now return to the start on time!
( win when everyone hits their marks, ghost P2 to close the loop )
late [ P1Ghost EndHidden ] [ P2 Start ] -> [ P1Ghost EndHidden ] [ P2Ghost Start ] win
( check shadows )
late [ P1 P1Shadow ] -> cancel
late [ P2 P2Shadow ] -> cancel
( Ghost can't move as recorded )
late [ P1Ghost P1Shadow ] [ P2 ] -> [ Tombstone ] [ ] message Time paradox!
( remove shadows )
late [ P1Shadow ] -> []
late [ P2Shadow ] -> []
( write head could not advance and we're still in Phase 1, die )
late [ WroteHead ] [ P1 ] -> [] [ Tombstone ] message "OUTATIME"
( failed to close the loop )
late [ P1Ghost EndHidden ] [ P2 ] -> [ P1Ghost EndHidden ] [ Tombstone ] message Didn't get there on time!
( remove heads from death screen )
late [ Tombstone ] [ ReadHead ] -> [ Tombstone ] []
late [ Tombstone ] [ WriteHead ] -> [ Tombstone ] []
( remove ReadHead from win screen )
late [ P2Ghost ] [ ReadHead ] -> [ P2Ghost ] []
==============
WINCONDITIONS
==============
=======
LEVELS
=======
message Blue Guy, be at the Blue Door when the Grey Guy gets to the Grey Door
##########
##......##
##.####.##
##a####z##
##.####.##
##......##
##########
~ullllldd-
##########
#...##...#
#.#.##.a.#
#..z##...#
#.####.###
#.####.###
#b....b..#
#.#.##.#.#
#...##...#
##########
~ulldddddr
rrrruuuru-
message Tip: Wait with Action (X)
########
###..###
###..###
#abb..z#
###..###
###..###
########
{lulddww
uwwll---
#########
#a#..#z##
#....b.##
#....b.##
#########
_llldlluu
##########
#...##...#
#.#.##.#.#
#..z##..a#
#.####.###
#.###.b###
#b......##
#.#.######
#...######
##########
~ulldddddr
rrrruuurr-
##############
##############
##..z.##.a..##
##.##.##.##.##
##.##.##.##.##
##.##.##.##.##
#....b..b....#
#####.##.#####
##############
}ddddrrrrrruuu
ull-----------
##############
##############
##..z.##.a..##
##.##.##.##.##
##.##.##.##.##
##.##.##.##.##
#....b..b....#
#####.##.#####
##############
{lddddrrrrrrrr
ruuuull-------
message there and back again
!########
#...b...#
#s..b..e#
#########
o--------
#########
#.#.b.#.#
#s..b..e#
#.#.b.#.#
#########
o--------
---------
(
=!#########
=#...##...#
=#.#.##.#.#
=#..s##..e#
=#.####.###
=#.###.b###
=#b......##
=#.#.######
=#...######
=##########
=o---------
=----------
=##########
=##z.....##
=##..bb..##
=##......##
=##......##
=##....bb##
=##.....a##
=##########
=_ddddrrrrr
=----------
=!#########
=#s.....###
=#..bb..###
=#......###
=#......###
=#.....b###
=#.....e###
=##########
=##o-------
=##--------
=s###e
=.#...
=...##
=#..##
=R}}}_
=_{{{{
=}}}}X
=....
=s..e
=....
=D}_X
=}~}~
)
message that's all for now, sorry!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment