Joined: Jun 12 2001

We tried. We failed. We moved on.

Click here for a list of Ter13's posts in Tutorials & Snippets.
Ter13's Games
DawnCaster Infestation
Rid the HMS DawnCaster of the alien menace!
Version 0.2
Date added: Jul 19 2014
Last updated: Jul 26 2014
27 fans
My entry for BYOND Game Jam 2014, a first-person raycasting shooter made in a little under 36 hours.

Programming & Art: Ter13 (Terrey West)
Music: Matthew Pablo
Sound: Stephen M Cameron
The source code for this game is now available to the general public. Feel free to take a look:

For those who already got a copy of this, I've restructured things a bit. Things are a bit more organized now.
Ter13's Demos
A DMM importer/processor for merging autotiles.

Version 0.1a
Date added: Jun 25 2014
Last updated: Jun 26 2014
3 fans
This utility will allow you to paint autotiles onto your map, import the map, then export the connected autotiles back into DMM format.

Source code is available here.
Autotile Editor
A quick way to import, format, and process animated autotiles.

Version 0.1b
Date added: Jun 25 2014
Last updated: Jun 26 2014
0 fans
Import animated autotiles on the fly easily.

Simply provide an RMXP or RMVX formatted autotile, and then use the keyframe animation editor to animate your autotile for export using my autotile format.

Source code is available here.
A customizable autotile generator

Version 1.0a
Date added: Oct 26 2013
Last updated: Dec 13 2013
5 fans
Generate 16, 47, and 256-state autotiles from a series of 8 base images.

This tool can be used to create customizable autotiles.

I will be adding further documentation and features per request.

Source code is available here:
Edge Slide Demo
Pixel Movement with diagonal and half-edge sliding.
Version 1.0b
Date added: Jan 9 2014
Last updated: Jan 24 2014
9 fans
This demo shows you how to take advantage of the edge sliding commonly seen in pixel movement-enabled games like the 2D Zelda games and even tile-based games like Dragon Warrior III for the GBC.
ImageScrollbar Demo
Customize your output scrollbars for a more professional interface.


Version 1.0a
Date added: Apr 12 2013
Last updated: Apr 13 2013
10 fans
This contains a demonstration of how to utilize the browser to duplicate some of the features of the output panel.

Run it, jabber away, take a look at how the scrollbar works.

You can find the source code and instructions included here:
A batch converter utility for my first-person game tutorial.
Version 0.4a
Date added: Jul 25 2013
Last updated: Jul 26 2013
0 fans
Use the RayCropper to painlessly crop and export a large number of images into a format compatible with the first person system I wrote a tutorial for.

Check out the tutorial on the forums!
Roofing Demo [Bug: Roof hiding is broken in the latest BYOND versions.]
By far the most superior roofing system on BYOND.

Version 1.0
Date added: Mar 1 2015
Last updated: Mar 2 2015
3 fans
Set up buildings with complex rooves. Hide them all at once with an animated fade, and edit the rooves on the map quickly and easily.
Ter13's Libraries
Fast, simple, abstract 47-state autojoining library

Version 1.0e
Date added: Jan 2 2017
Last updated: Oct 26 2017
8 fans
AutotileLib makes mapping gorgeous maps with tile edges a complete breeze.

Map editor:


AutotileLib doesn't expect you to draw every single join state on your own either.

Simply import a DMI file in this format:

Run the command GenAutotile() from the command line, select the DMI file, and then save the machine-converted 47-state autotile for use in your project!.

The autotile generator will take icons of any size. even animated DMI files!

The input must be in the form of a 3x4 autotile sheet. The system will automatically spit out icons 1/3rd the width of the sheet, and 1/4th the height of the sheet, using each subsegment of the supplied icon.

The engine also allows you to specify multiple different tile ids that each autotile rule merges with, allowing you to make bridge tiles not interrupt water autojoining, or for cobblestone paths to tile with dirt paths seamlessly.

In addition, autotiles can be given an icon_state in the map editor at compile-time. The autotile will use that icon_state as its default, allowing you to create one-time tiling rules without overriding the autotile group rules!

The autotiling algorithm is blazing fast and incredibly flexible, tiling 1000x1000 maps in around a second at world initialization and updating tens of thousands of autotiles at runtime per second.

This library depends on StdLib.

Documentation is here.
Smaller, easier, safer savefiles.
Version 1.0a
Date added: Mar 4 2013
Last updated: Jul 3 2015
11 fans
CleanSave is a simple, forward-oriented saving system. The design is intended to interleave with the default BYOND saving system, allowing it to do what it does best, and stopping it from what it doesn't do very well.

For a tutorial on how to implement this system into your game, look here.

For a more basic tutorial on how saving works, look here

Notably, this system allows you to specify variables that are not marked tmp, const, or global that will never be saved per-object.

The system is easy to use, and incredibly intuitive.

To specify files that shouldn't be saved, the system adds a single function to datums:


  • L a list passed from child to parent to specify what variables won't save.


  • A list of values that are not to be saved


NeverSave() is called internally by the saving system. When you define a type that has variables that aren't temp, const, or global that you want to save anyway, you call the parent proc, then add your items to the list, or remove items from the list, then return it.


list/foo = list()
L = ..(L)
return L

The above example defines a list foo, and adds it to the NeverSave list, which is called internally when objects are saved. Essentially, foo is effectively a temporary variable, which would be better achieved by setting foo to tmp anyway.

What this system was made to do, however, is make it so that several non-temporary internal variables are not saved to make setting up player saving behaviors a snap.

By default, this disables saving for:




The removal of default saving of this system is to achieve one-line object saving, a more compact savefile on the hard drive, and in general, a more flexible saving and loading system without the pain of specifying each and every variable that needs to be saved.

Just tell the game what NOT to save, and it'll take care of everything else.

(This is not a substitution for marking variables as temporary!)
Create dynamic behavior easily!

Version 1.0
Date added: Oct 1 2013
Last updated: Oct 27 2013
0 fans
Codehooks allows you to create dynamic behavior with ease. Just define a few hook-related variables, and you are ready to hook objects together.

Hooks are called from specific functions defined by the user, and can quickly and easily be set up.

See this post for further information on using this library.
Control portion of Lib13
Version 2.0
Date added: Dec 28 2016
Last updated: Oct 26 2017
0 fans
Handle attack/skill cooldown periods flexibly and simply (supports saving)

Version 2.0
Date added: Dec 28 2016
Last updated: Aug 27 2017
0 fans
CooldownLib allows you to handle ability cooldowns on mobs.

Cooldowns are inherently just named time offsets. CooldownLib provides functions for getting single and multiple cooldowns at once, setting a single cooldown, and also contains behavior that will allow you to save and restore players with cooldowns relative to the real time passed between when they saved and loaded, or even to not be saved between login sessions at all.
Manage 2D location data easily with DatumPoint. Allows you to convert absolute coords to tile coords and vice-versa.

Version 0.2
Date added: Sep 14 2013
Last updated: Oct 27 2013
1 fan
DatumPoint implements a new datum called "point". This type allows the developer to work with 2D+z points with a series of helper procs.

DatumPoint stores its data in absolute pixel coordinates, and has functions that allow the developer to rotate these points around other points, determine if it is inside of a bounding box, move movable atoms to the location denoted by a point, Clamp the point to a bounding box, as well as Add, Subtract, Multiply, and Divide points by each other or raw coordinate data.

For assistance using functions and their arguments, please see this post.

Please report bugs, as the current version is somewhat untested.
DM Standard Library
Essential helper functions, variables, and definitions for almost any project

Version 0.9
Date added: Jul 16 2015
Last updated: Aug 26 2017
7 fans
DM Standard Library provides a laundry-list of useful features that frankly should be provided by BYOND by default.

This project strives to have an almost completely negligible impact on any existing project while provided a slew of useful features that everyone can take advantage of.

See the documentation thread for a listing of features that this provides and how to use them:
Handle generic temporary combat effects efficiently and cleanly

Version 2.2
Date added: Dec 28 2016
Last updated: Aug 26 2017
3 fans
EffectLib provides a generic, manageable data structure for handling temporary effects such as debuffs, status ailments, etc.

This structure implements stackable, timed, toggle, and ticking functionality. It also implements id and subid identification of effects per-player, preventing accidental override of identified effect. Lastly, the structure allows the developer to quickly get existing effects on the user associated by either "id", or "id.subid".

See the documentation thread for further details, or Snippet Sunday #15 on the forums.
Set up complex, and elegant control schemes without defining tons of verbs and procs.

Version 0.1a
Date added: Sep 14 2013
Last updated: Oct 2 2013
4 fans
InputHandler defines several new datums that assist in handling input with only two verbs.

This library fundamentally changes how mouse and keyboard input is handled within BYOND, and allows the developer to quickly and easily set up some very complex control schemes that can do things like tracking combos for a fighting game, and just about anything else you can imagine.

For further information on how to use this library, please see this post for the reference guide and an example of how I used it for a simple space shooter.
Mouse control portion of Lib13
Version 1.0
Date added: Dec 28 2016
Last updated: Jan 1 2017
0 fans
Essential movement helper functions and collision overhaul

Version 1.0 rev19
Date added: Dec 21 2016
Last updated: Jan 20 2018
3 fans
MoveLib provides a number of helper functions that make complex, smooth tile and pixel-driven movement and collision handling much easier and more appealing.

This takes a lot of the headache out of designing collision tests and figuring out exactly how two objects are touching, and where they are in relation to one another.

Movelib provides you a lot of highly granular metadata. It is not a simple drop-in for games, however. You have to learn certain methodologies inherent to its design in order to take full advantage of it.

Documentation can be found here.
Create and manage pools of objects for retrieval and reuse later.

Version 1.0a
Date added: Sep 14 2013
Last updated: Oct 2 2013
7 fans
Instantiation of movable objects in DM creates a small, but noticeable bottleneck.

For objects that you need to keep a certain amount of around, it's usually best to keep them somewhere out of use for a little while, then pull them out of the pool again later.

This library keeps a number of global lists available for mobiles (per type), and also allows you to retrieve them again later.

This system is meant to be used with movable atoms only. Other types, such as datums, aren't communicated from server-to-client, and thus don't induce the same bottleneck. atoms/turfs/areas can't be relocated, and thus can't be used for dynamic pooling.

This library is under heavy development at the time of writing, so please report bugs and request features in the forums.

For feature reference, see this post.
Particle portion of Lib13
Version 1.0
Date added: Dec 28 2016
Last updated: Dec 29 2016
0 fans
Projectile segment of Lib13
Version 1.0
Date added: Dec 28 2016
Last updated: Dec 29 2016
0 fans
RoofLib [Might have bugs.]
Complex rooves with ease! Made with mappers in mind.

Version 1.0
Date added: Mar 1 2015
Last updated: Mar 2 2015
11 fans
Create rooves using the roof object on the map. At runtime, the roofing library will automatically generate the minimum number of subareas needed to display the roof.

This library uses a novel approach to hiding objects on a per-player basis, rather than adding every image object for every roof the player CAN see, we actually use an override image to hide only the roof the player can't see.

Here's a short image showing what it can do:

For documentation, please see this thread:
StdLib [Bug: The arctan() and arccot() #defines are each missing the final right parenthesis.]
Essential standardized features for use in any DM project.

Version 2.2
Date added: Dec 21 2016
Last updated: Oct 17 2017
2 fans
StdLib is meant to make writing code in DM easier, faster, and less prone to bugs.

StdLib is a one-size fits all solution, and is completely implementation agnostic. The code is intended to work out of the box with just a little work on your part to inform StdLib of standard definitions and values for your specific project.

Documentation can be found here.
Easy, minimal impact event watchers

Version 1.0
Date added: Nov 18 2017
Last updated: Nov 19 2017
1 fan
WatcherLib implements a top-level event handling structure.

Separation of Concern is an important concept for keeping codebases clean and easy to work in. Watcher structures are by far the best way to ensure proper separation of concern.

Event handlers and the like are a good way to minimize the amount of effort someone has to expend to learn your codebase by making dynamic inter-connectivity not be pre-programmed into data structures. Everything is standardized into a dynamic relationship that is easy to digest, debug, and refactor.

See the documentation thread for this library here:
Thank you for sharing it
RoofDemo is broken btw. Should probably remove it since he won't update it and Kaiochao made one that is functional.
Thanks, Multiverse! I'm a big fan of DawnCaster, and Ter13 made great libraries.
You're welcome. I felt it was necessary to make sure the community can still access these hubs in some way. New members wouldn't have a clue where to look and existing ones would still have to go on a massive scavenger hunt to find something.

Ter13 (Terrey West) has had a huge impact on this community over the years and we will miss him. I'm sure he will achieve great things wherever he goes. It would be sad to lose a huge chunk of what he contributed here.

I don't think it was the right choice to make the inactive status completely disable all hub access. Such a fragile community needs a more resilient site, but if this is what it takes, then so be it.

Maybe we can write something that automatically generates this sort of HTML code. Embedded hubs might make the site come alive, and bridge the gap between these main forums and individual game/resource forums. It would provide a new dimension with which to communicate.

I made some changes to allow for a table of contents, making it easier to navigate this page, and provides direct links to each individual compact minihub. I also added comments that describe bugs or issues that may occur with a few of these.

Let me know if you find anything else worth noting. This should probably be made sticky.