Scream of the Stickster
by Lummox JR
3rd place entry in the BYONDscape 4K Challenge 2002
Keys quick reference |
Insert | Up |
Delete | Down |
Space numpad 5 | Shoot |
Backspace | Who |
F1 | Help |
The pages are no longer safe, for a vicious creature
stalks them, searching for anyone it can find to satisfy its neverending
hunger for living line segments. A band of brave but foolhardy stick figures
has taken it upon themselves to rid the planes of the beast, determined to
kill him as many times as it takes to keep him from coming back. The only
thing standing between each of them and certain death are their guns and
their companions--preferably their companions.
The Stickster resides in a maze of twisty passages and exposed chambers,
where he prowls tirelessly for fresh victims. Legend has long held that
he can outrun his unlucky prey, whether bounding after them in the open or
ambushing the unwary in blind alleys.
As one of the hapless stick
figures, your task is to rack up as many Stickster kills as you can. Your
only defense is your dotgun, which has only 6 shots. To fire the gun, press
the center key (numpad 5). Your gun will reload slowly, giving you a
new round of dots every 3 seconds. That's a long time to wait when a hungry
Stickster is on your tail, so conserve ammo when he's nearby. The Stickster
takes 3 hits to kill. You lose points for killing other players,
unless they have a negative score.
If you're stuck in a series of passageways and can't find an open space, or
if you don't have enough room to get a good shot on the Stickster, you can
shoot through walls instead. A wall will break after 5 hits, unless
it's one of the outer maze walls. The Stickster, too, can crash through a
wall, but this is done mostly by accident while dodging dots.
Your dotgun can fire diagonally, but it's hard to hit the Stickster solidly
in that direction. It's also possible to shoot up or down ladders, if
something is blocking you.
Ladders will appear whenever a new
maze level opens up. This happens whenever the Stickster is killed; he
reappears on the lowest level. Once the maze reaches 6 levels in size, it
will stop growing, and the Stickster may reappear on any level. Level 1 is
the top level.
To go from one level to another, find a ladder going in the direction you
want, then use the Up or Down commands, or the
Insert key (up) or Delete key (down). Up ladders appear to be
freestanding; down ladders go down through a hole in the floor. But don't
think you can escape the Stickster so easily: He can climb too. The Stickster
will go to any level it has to to find a player.
Sound carries throughout the level. If you hear a sound in the distance, it's
someone on your level.
Your state-of-the-jot tracking
device can help you track down the Stickster, roughly predict its movements,
and avoid it when necessary. If the Stickster isn't on your level, the
tracker will tell you which level it's on. Otherwise, it will tell you the
Stickster's direction and approximate distance.
It's important to know where you are in the maze. The northwest corner is
2-40-level, and the southeast is 40-2-level.
You can coordinate with other players by typing Say and a message.
If you like you can tell them where you are in the maze, but nothing says you
have to be honest about it. Whether you want to help the others or feed them
disinformation is your call. If other players wander into your field of view,
you can find out who they are by pressing the Backspace key or typing
the Who command.
The game is played in rounds of 10 minutes. Whoever has the most kills
at the end of the round is the winner. If a player takes the top spot, they
will win unless another player passes their score.
The host of the game may kick out unruly players with the Kick
command.
The
BYONDscape 4K Challenge 2002 limited
all participants to under 4,096 bytes of actual code within their .dm
source files, no hand-altered .dme files, but unlimited sound, graphics,
and other files. To fit the requirements of the competition, this game's
source code is within the 4K limit.
This game packs in a list of complex features into the 4K limit:
- Maze generation. Each maze is generated on the fly by a compact
routine. The mazes are made more playable by delibarately creating
5×5 open areas.
- 47-state space. 47-state walls are a bit of a pain. Instead I
opted to use 47-state open space to draw the wall borders, which is just
as difficult, because 47-state walls could give away contours of the maze
that should be out of view. They're coded efficiently into this game.
- Intelligent movement. Movement is fluid, allowing players to
move smoothly, and turn and fire at the same
time.* Movement diagonally
against a straight wall will move along the wall instead of stopping the
player. If you move in a new direction while in motion, your direction
will turn (and still animate smoothly), allowing you to get off a shot
quickly.
- 2-level sound effects. Each sound effect has two versions: One
is played for players close by, another for players far away but on the
same level. This compensates for BYOND's lack of volume control but also
adds a nice echo.
- Pathfinding AI. Sure, it isn't top-notch, and it's slow, but it
works most of the time. Taking z-levels into consideration complicates
the issue tremendously and bloated the code something fierce. This is
hard to incorporate with minimal code.
- Rounds of play. The game plays through 10-minute rounds, and
resets for the next round without rebooting the world. This feature was
unbelievably expensive to add.
- Score sorting. Players are listed in order from highest score
to lowest, except that each player sees themselves at the top. The score
is sorted such that achieving a tie score with another player won't
change your ranking, put passing them will. Also a very expensive
feature.
- M:SS timer. This feature is a tremendous byte glutton, but it's
snazzy.
- Splash screen. The splash screen is displayed between rounds
instead of a blank field.
- In-game HTML help. You're reading this, aren't you?
There are a few other touches in the game that give it a more complete feel.
Attention was paid to detail, even at the expense of size.
- Smart names. Players with lowercase names aren't referred to as
"the" by mistake.
- Smart keys. Climbing ladders is easy: Players can use the Insert
or Delete keys instead of the Up and Down commands. For help, they can
type Help or press F1. To shoot, the usual numpad center key is used, but
the space bar will work too.
- HTML block. Players can't use HTML when they talk.
- Glitz control. If a player changes direction mid-stride, they
won't jump to the next tile instantly. The speed at which players and the
Stickster move is linked to the movement speed dictated by the game.
- Host credit. The game's host is listed when it is viewed in the
hub listings.
- Death delay. A player who's just been killed has a few seconds
to see the aftermath of their death before respawning.
- Persistent scores. A player who logs out and logs back in during
the same round (perhaps due to a disconnect, or an attempt to cheat) will
retain their score.
- Hidden commands. To ensure the stat panel always stays on top,
all verbs are hidden. They will still appear in expansion lists.
- Kick command. This was a byte-munching feature, but very
important to add. For ease-of-use, using the command calls up a list of
other players to choose from, and also allows the host to cancel the
command.
Version 2 fixes and
features:
I'm celebrating this game's 3rd place finish with a brand new version, still
under 4K. In version 2 the AI is tougher, a lot of the code is more
efficient, and I even saved 8 more bytes.
- The Stickster now can find shortcuts around long routes by breaking
through walls. He'll also break through walls in a frenzy to get to any
player who's close by, making him a lot harder to sucker into a dead
end.
- Movement in a diagonal direction blocked by walls to either side, or a
wall to the diagonal and none to either side, will result in moving
randomly to one side (north or south) or the other (east or west).
- Bug fix: Shots can now go up or down ladders by more than 1 level as
long as the right ladders are there.
- Bug fix: The Stickster resets properly after killing a player with a
negative score.
- Bug fix: A minor (and perplexingly not fatal) syntax error in Stat()
was corrected.
- The maze generator was improved for efficiency and 21 bytes saved.
- The maze generator is much faster because turf.s() is now called
manually, afterwards.
- Minor changes were made to the AI in an attempt to reduce strain on the
processor and keep the game speedy.
Serendipity is responsible for some
of unexpected features that add to the game's completeness. Early on I
discovered that the Stickster can dodge shots, a side effect of the built-in
functions used in the AI. Because of the way the AI is written, if the timing
is right to allow the Stickster to dodge, it will keep trying to dodge until
successful, sometimes bumping into walls enough times to knock them
down.
Another unexpected feature was that players can shoot up or down ladders;
this was never intended in my design. However, it seems that two bit flags I
was using to represent movement up or down happen to match two undocumented
bit flags BYOND has reserved for future use. These directions are considered
valid by some of BYOND's built-in functions. A little tweaking was needed to
make sure this feature didn't act as a bug too, but it was a welcome
discovery.
This game was inspired by a game
from an old programming magazine (Compute!) in which a monster chased
the player's footprints through a maze, forcing the player to backtrack into
side passages while collecting treasure. Ultimately this game little
resembles the old, but it is a distant offspring of the glory days of 8-bit
computing.
The
source code
release, available with a
BYONDscape subscription, contains all
of the original files from the game, plus the updated ones to compile version
2. The original help file and splash screen icons have been renamed with -old
and the original code is in stickster-original.dm. Version 2's source code
can be read in a special translated version, presented in a much more
readable format with many comments.
Don't forget to check out BYONDscape
for the worthy 1st and 2nd place winners of the 4K Challenge 2002:
Shadowdarke's Blob4K
and Air Mapster's
Draggin' Ballz 4k
(and source).
In almost any game there are
known bugs. This is no exception. What do you want for 4K?
- *In BYOND 334 and several previous
versions, spawn() executes a tick too early in many cases, which prevents
some procs intended for fluid movement (including the ability to turn and
fire simultaneously) from working.
- At times, particularly when looking for ladders, the Stickster AI may
cause minor spikes of processor lag despite all efforts to control it.
Anything I could do to significantly improve the AI speed would take way
too many bytes.