Skip to content

Instantly share code, notes, and snippets.

@raggy
Forked from anonymous/readme.txt
Last active June 24, 2022 13:25
Show Gist options
  • Save raggy/7fdfe262207310a394c05a175ca20ab1 to your computer and use it in GitHub Desktop.
Save raggy/7fdfe262207310a394c05a175ca20ab1 to your computer and use it in GitHub Desktop.
High Noon
title High Noon
again_interval 0.1
(verbose_logging)
(Ideas:
- Explosive barrels
- Enemy rotates to face, then fires next turn (immediately fire if already facing)
- Horses that spook?
- Enemy with long rifle that pushes crates when turns
- Enemy only turns if adjacent or within a small range?
- Enemy always shooting when you're in front could be more interesting (even if there's an obstacle) e.g. for shooting on corners and killing each other
)
========
OBJECTS
========
Background
Orange
PlayerUp
LightBrown White LightGrey Brown
..2..
..0..
.111.
.111.
.1.1.
PlayerDown
LightBrown White LightGrey Brown
..0..
.111.
.011.
.121.
..2..
PlayerLeft
LightBrown White LightGrey Brown
.....
...0.
22111
..311
..1.1
PlayerRight
LightBrown White LightGrey Brown
.....
.0...
11122
113..
1.1..
PlayerDead
LightBrown White LightGrey Brown
.....
.....
.....
.131.
01122
EnemyUp
LightBrown Black LightGrey Brown
..2..
..0..
.111.
.111.
.1.1.
EnemyDown
LightBrown Black LightGrey Brown
..0..
.111.
.011.
.121.
..2..
EnemyLeft
LightBrown Black LightGrey Brown
.....
...0.
22111
..311
..1.1
EnemyRight
LightBrown Black LightGrey Brown
.....
.0...
11122
113..
1.1..
EnemyDead
LightBrown Black LightGrey Brown
.....
.....
.....
.131.
01122
Wall
DarkBrown
CornerUpLeft
DarkBrown
0000.
000..
00...
0....
.....
CornerUpRight
DarkBrown
.0000
..000
...00
....0
.....
CornerDownLeft
DarkBrown
.....
0....
00...
000..
0000.
CornerDownRight
DarkBrown
.....
....0
...00
..000
.0000
Crate
Brown
.....
.000.
.000.
.000.
.....
TrailVertical
DarkRed
..0..
..0..
..0..
..0..
..0..
TrailHorizontal
DarkRed
.....
.....
00000
.....
.....
BloodSplatUp
Red
...0.
.0..0
..0..
.0...
..0..
BloodSplatDown
Red
..0..
...0.
..0..
0...0
.0...
BloodSplatLeft
Red
.0...
0....
..0.0
...0.
.0...
BloodSplatRight
Red
...0.
.0...
0.0..
....0
...0.
QueueShot
Red
.....
.....
.....
.....
.....
Dying
Transparent
=======
LEGEND
=======
CharacterUp = PlayerUp or EnemyUp
CharacterDown = PlayerDown or EnemyDown
CharacterLeft = PlayerLeft or EnemyLeft
CharacterRight = PlayerRight or EnemyRight
CharacterDead = PlayerDead or EnemyDead
Player = PlayerUp or PlayerDown or PlayerLeft or PlayerRight
Enemy = EnemyUp or EnemyDown or EnemyLeft or EnemyRight
Character = CharacterUp or CharacterDown or CharacterLeft or CharacterRight
Trail = TrailVertical or TrailHorizontal
BloodSplat = BloodSplatUp or BloodSplatDown or BloodSplatLeft or BloodSplatRight
Corner = CornerUpLeft or CornerUpRight or CornerDownLeft or CornerDownRight
CornerUp = CornerUpLeft or CornerUpRight
CornerDown = CornerDownLeft or CornerDownRight
CornerLeft = CornerUpLeft or CornerDownLeft
CornerRight = CornerUpRight or CornerDownRight
CornerNotUpLeft = CornerUpRight or CornerDownLeft or CornerDownRight
CornerNotUpRight = CornerUpLeft or CornerDownLeft or CornerDownRight
CornerNotDownLeft = CornerUpLeft or CornerUpRight or CornerDownRight
CornerNotDownRight = CornerUpLeft or CornerUpRight or CornerDownLeft
Moveable = Corner or Crate
CornerObstacle = Wall or Enemy or EnemyDead
BlocksLOS = Wall or Corner or Enemy or Crate
BlocksBullet = Wall or Crate
. = Background
@ = PlayerRight
▒ = Wall
◸ = CornerUpLeft
◹ = CornerUpRight
◺ = CornerDownLeft
◿ = CornerDownRight
□ = Crate
↑ = EnemyUp
↓ = EnemyDown
← = EnemyLeft
→ = EnemyRight
=======
SOUNDS
=======
SFX0 56708708 (50086104)
SFX1 27898908 (54953108)
================
COLLISIONLAYERS
================
Background
BloodSplat
TrailVertical
TrailHorizontal
Player PlayerDead Enemy EnemyDead Wall Crate
CornerUpLeft, CornerUpRight
CornerDownLeft, CornerDownRight
QueueShot
Dying
======
RULES
======
[ Trail ] -> []
[ stationary Player ] [ Enemy QueueShot ] -> [ stationary Player ] [ action Enemy ]
( Test for enemy line-of-sight )
[ stationary Player Background ] -> [ stationary Player action Background ]
[ action Background | stationary Background no BlocksLOS ] -> [ action Background | > Background ]
[ > Background | stationary Background no BlocksLOS ] -> [ > Background | > Background ]
( There is an orthogonally-aligned player with no obstruction )
[ Enemy | < Background ] -> [ > Enemy | < Background ]
[ Enemy | action Background ] -> [ > Enemy | action Background ]
( Enemy is already facing player, fire )
up [ > EnemyUp ] -> [ action EnemyUp ]
down [ > EnemyDown ] -> [ action EnemyDown ]
left [ > EnemyLeft ] -> [ action EnemyLeft ]
right [ > EnemyRight ] -> [ action EnemyRight ]
( Enemy is not already facing adjacent player, turn now and fire next turn )
[ up Enemy | action Background ] -> [ EnemyUp QueueShot | action Background ]
[ down Enemy | action Background ] -> [ EnemyDown QueueShot | action Background ]
[ left Enemy | action Background ] -> [ EnemyLeft QueueShot | action Background ]
[ right Enemy | action Background ] -> [ EnemyRight QueueShot | action Background ]
[ orthogonal Enemy ] -> [ Enemy ]
[ moving Background ] -> [ Background ]
( Queue up shots )
[ Background action Enemy ] -> [ action Background Enemy ]
startloop
( One enemy randomly shoots )
random [ action Background Enemy ] -> [ stationary Background action Enemy ]
up [ action CharacterUp | no CornerDown no BlocksBullet ] -> [ CharacterUp | up TrailVertical ]
down [ action CharacterDown | no CornerUp no BlocksBullet ] -> [ CharacterDown | down TrailVertical ]
left [ action CharacterLeft | no CornerRight no BlocksBullet ] -> [ CharacterLeft | left TrailHorizontal ]
right [ action CharacterRight | no CornerLeft no BlocksBullet ] -> [ CharacterRight | right TrailHorizontal ]
( Create blood splat )
up [ up TrailVertical Character | ] -> [ up TrailVertical Character | BloodSplatUp ]
+ down [ down TrailVertical Character | ] -> [ down TrailVertical Character | BloodSplatDown ]
+ left [ left TrailHorizontal Character | ] -> [ left TrailHorizontal Character | BloodSplatLeft ]
+ right [ right TrailHorizontal Character | ] -> [ right TrailHorizontal Character | BloodSplatRight ]
( Player dies when hit )
+ [ moving Trail Player ] -> [ stationary Trail Player Dying ] SFX1
( Enemy dies when hit )
+ [ moving Trail Enemy ] -> [ stationary Trail Enemy Dying ] SFX1
( Bullets bounce off corners )
+ [ up TrailVertical CornerUpLeft ] -> [ CornerUpLeft TrailVertical right TrailHorizontal ]
+ [ up TrailVertical CornerUpRight ] -> [ CornerUpRight TrailVertical left TrailHorizontal ]
+ [ down TrailVertical CornerDownLeft ] -> [ CornerDownLeft TrailVertical right TrailHorizontal ]
+ [ down TrailVertical CornerDownRight ] -> [ CornerDownRight TrailVertical left TrailHorizontal ]
+ [ left TrailHorizontal CornerUpLeft ] -> [ CornerUpLeft TrailHorizontal down TrailVertical ]
+ [ left TrailHorizontal CornerDownLeft ] -> [ CornerDownLeft TrailHorizontal up TrailVertical ]
+ [ right TrailHorizontal CornerUpRight ] -> [ CornerUpRight TrailHorizontal down TrailVertical ]
+ [ right TrailHorizontal CornerDownRight ] -> [ CornerDownRight TrailHorizontal up TrailVertical ]
( Bullets move straight )
+ up [ up TrailVertical | no CornerDown no BlocksBullet ] -> [ TrailVertical | up TrailVertical ]
+ down [ down TrailVertical | no CornerUp no BlocksBullet ] -> [ TrailVertical | down TrailVertical ]
+ left [ left TrailHorizontal | no CornerRight no BlocksBullet ] -> [ TrailHorizontal | left TrailHorizontal ]
+ right [ right TrailHorizontal | no CornerLeft no BlocksBullet ] -> [ TrailHorizontal | right TrailHorizontal ]
( Don't actually move trails )
[ orthogonal Trail ] -> [ stationary Trail ]
endloop
( Dying characters die )
[ Player Dying ] -> [ PlayerDead ]
[ Enemy Dying ] -> [ EnemyDead ]
( Clear trail next update )
[ Trail ] -> again SFX0
( Player pushes moveables )
[ > Player | Moveable ] -> [ > Player | > Moveable ]
( Stop things moving into the edge )
[ Background > Moveable ] -> [ > Background > Moveable ]
[ > Background | ] -> [ Background | ]
[ > Background > Moveable ] -> [ Background Moveable ]
startloop
( Corners push not-opposite corners )
[ > CornerUpLeft | CornerNotDownRight ] -> [ > CornerUpLeft | > CornerNotDownRight ]
[ > CornerUpRight | CornerNotDownLeft ] -> [ > CornerUpRight | > CornerNotDownLeft ]
[ > CornerDownLeft | CornerNotUpRight ] -> [ > CornerDownLeft | > CornerNotUpRight ]
[ > CornerDownRight | CornerNotUpLeft ] -> [ > CornerDownRight | > CornerNotUpLeft ]
( Corners push opposite corners from wrong directions )
up [ > CornerUpLeft | CornerDownRight ] -> [ > CornerUpLeft | > CornerDownRight ]
left [ > CornerUpLeft | CornerDownRight ] -> [ > CornerUpLeft | > CornerDownRight ]
up [ > CornerUpRight | CornerDownLeft ] -> [ > CornerUpRight | > CornerDownLeft ]
right [ > CornerUpRight | CornerDownLeft ] -> [ > CornerUpRight | > CornerDownLeft ]
down [ > CornerDownLeft | CornerUpRight ] -> [ > CornerDownLeft | > CornerUpRight ]
left [ > CornerDownLeft | CornerUpRight ] -> [ > CornerDownLeft | > CornerUpRight ]
down [ > CornerDownRight | CornerUpLeft ] -> [ > CornerDownRight | > CornerUpLeft ]
right [ > CornerDownRight | CornerUpLeft ] -> [ > CornerDownRight | > CornerUpLeft ]
endloop
( Corners can't move through corner obstacles )
[ > Corner | stationary CornerObstacle ] -> [ action Corner | CornerObstacle ]
( Cancel movement )
[ action Moveable ] [ Moveable ] -> [ action Moveable ] [ action Moveable ]
[ action Moveable ] -> [ Moveable ]
( Rotate player to face movement )
[ up Player ] -> [ up PlayerUp ] again
[ down Player ] -> [ down PlayerDown ] again
[ left Player ] -> [ left PlayerLeft ] again
[ right Player ] -> [ right PlayerRight ] again
( Stop player )
[ > Player | stationary Moveable ] -> [ Player | Moveable ]
==============
WINCONDITIONS
==============
(No Trail
No Enemy
Some EnemyDead)
=======
LEVELS
=======
@..
..←
...
@□←
...
@..
.→.
...
.↑.
...
(◸...◹
.....
..@▒.
.....
◺...◿
.......
..▒▒▒..
..◹▒◸..
..←▒@..
..◿▒◺..
..▒▒▒..
.......)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment