Skip to content

Instantly share code, notes, and snippets.

@jcmiller11
Created August 19, 2023 20:53
Show Gist options
  • Select an option

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

Select an option

Save jcmiller11/d5a5ebad3d126ecdafdc9de284aac65a to your computer and use it in GitHub Desktop.
Simple Tank Movement Game (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Simple Tank Movement Game
author jc
========
OBJECTS
========
Background
grey darkgrey
11111
01111
11101
11111
10111
Wall
brown darkbrown
00010
11111
01000
11111
00010
PlayerUp
green darkgreen
..1..
.010.
.010.
.000.
.000.
PlayerDown
green darkgreen
.000.
.000.
.010.
.010.
..1..
PlayerLeft
green darkgreen
.....
.0000
11100
.0000
.....
PlayerRight
green darkgreen
.....
0000.
00111
0000.
.....
MoveUp
transparent
MoveDown
transparent
MoveLeft
transparent
MoveRight
transparent
=======
LEGEND
=======
Player = PlayerUp or PlayerDown or PlayerLeft or PlayerRight
MoveMarkers = MoveUp or MoveLeft or MoveDown or MoveRight
. = Background
# = Wall
P = PlayerUp
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
Wall, Player
MoveMarkers
======
RULES
======
(Deosil)
[Right PlayerUp ] -> [PlayerRight]
[Right PlayerRight] -> [PlayerDown ]
[Right PlayerDown ] -> [PlayerLeft ]
[Right PlayerLeft ] -> [PlayerUp ]
(Widdershins)
[Left PlayerUp ] -> [PlayerLeft ]
[Left PlayerLeft ] -> [PlayerDown ]
[Left PlayerDown ] -> [PlayerRight]
[Left PlayerRight] -> [PlayerUp ]
(Forward Movement)
[Up PlayerUp ] -> [MoveUp PlayerUp ]
[Up PlayerLeft ] -> [MoveLeft PlayerLeft ]
[Up PlayerDown ] -> [MoveDown PlayerDown ]
[Up PlayerRight] -> [MoveRight PlayerRight]
(Backwards Movement)
[Down PlayerUp ] -> [MoveDown PlayerUp ]
[Down PlayerLeft ] -> [MoveRight PlayerLeft]
[Down PlayerDown ] -> [MoveUp PlayerDown ]
[Down PlayerRight ] -> [MoveLeft PlayerRight]
(Let's move!)
[Player MoveUp ] -> [Up Player ]
[Player MoveLeft ] -> [Left Player ]
[Player MoveDown ] -> [Down Player ]
[Player MoveRight] -> [Right Player]
==============
WINCONDITIONS
==============
=======
LEVELS
=======
######
#....#
#.#P.#
#....#
#....#
#....#
######
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment