Coding - Space Station 13 Wiki (2024)

To Run, Host, Compile, And Develop on SS13 Go To The Goonstation Development Guide

Be sure to follow it exactly!

Discord is the place to talk to fellow players, admins, and devs in realtime. There's plenty of friendly people there, capable of answering most of your questions. Join at This Invite LinkIf you have problems with the above guide, visit ##imcoder

All of these links and more can be found at https://github.com/goonstation/goonstation

You can also take a look at DM by Example guide here: [1]

Introduction to DM as a language

DM is a high-level programming language, meaning, effectively, that its use does not require much understanding of computer hardware. Its purpose is the creation of games, and so tricky things like memory management are smoothed over for the coder's convenience. This is done by way of a process virtual machine: .DM source code is compiled not into machine language, but into a binary format designed specifically for BYOND. For a Dream Maker Binary (.DMB) to run it must be hosted by Dream Daemon, one of BYOND's four executables (Dream Seeker, the program used to play BYOND games, can also host them, but it is not recommended for Space Station 13).

BYOND, being patterned on C++, is an object-orient programming language. Abstract classes are defined in the code, which serve as templates for objects manipulated by functions. Suppose, for example, you are making a game with bears. You define all the variables and functions associated with them: What they're called, how they move, etc. This is the bear class. Whenever a bear comes into existence within the game, an object of this class is instantiated. Though its variables are derived from its class, changes made to them are made only to that specific bear; neither other bears nor the template itself are affected.

The concept of inheritance is central to object-oriented programming. One class can be derived from another, such that they share everything defined in the parent class. For instance, you might wish your game to feature a special type of bear. The path for a bear is <syntaxhighlight lang='cpp' line='none' enclose='none'>/mob/bear</syntaxhighlight> (bear is itself a child of mob, a built-in class which will be discussed later). Therefore, you make a subclass <syntaxhighlight lang='cpp' line='none' enclose='none'>/mob/bear/fuzzy_wuzzy</syntaxhighlight>. Any changes to /bear affect /bear/fuzzy_wuzzy, but not vice-versa. You can even define subtypes of inherited functions, a practice known as overloading. Suppose /bear has a function called sylvan_defecation, rendered in DM as <syntaxhighlight lang='cpp' line='none' enclose='none'>/mob/bear/proc/sylvan_defecation()</syntaxhighlight>. However, you want bears of the /fuzzy_wuzzy variety to behave differently when answering nature's call, and so you overload that function by defining <syntaxhighlight lang='cpp' line='none' enclose='none'>/mob/bear/fuzzy_wuzzy/sylvan_defecation()</syntaxhighlight> (note the absence of /proc/). Whenever a function calls sylvan_defecation() on a bear that belongs to the /fuzzy_wuzzy/ subclass, it will execute its special version of that function.

DM, as we discussed above, is executed by way of a process virtual machine. This means that, though it shares much of C++'s syntax and logic, it is ultimately a lot simpler. As such, it is not overly concerned with rigid type-management. A variable might represent a number one moment and a string the next. Such a transformation can still cause all manner of errors, if the coder does not account for it, but it won't necessarily cause the game to crash. In most cases Dream Daemon will simply shrug, inform you of your blunder, and carry on to the best of its abilities. This sort of extreme looseness is of dubious efficacy, but it means that you won't need to fret about the number of bytes allocated to a given value, whether a number can be negative, and other such distracting things.

ATOMs and Datums

As mentioned above, BYOND has certain built in classes. The first of these is /datum. This is simply the ancestral class, from which all others are derived; note that a class defined with no explicit parent is considered a child of /datum. From /datum comes /atom, the fundamental class for things in the game world. Simply put, if a thing is on the map, it derives from /atom. This brings us to the four elemental classes: /turf, /area, /mob, and /obj. Note that /turf and /area are derived directly from atom, whereas /mob and /obj are derived from /atom/movable. Only objects derived from the elemental classes can exist on the map; this contrivance means there is no point in defining direct descendants of /atom and /atom/movable.

The /obj class is something of a catchall for movable objects. You might derive from it classes for machines, items, or even creatures. Anything player-controllable, however, must belong to /mob, intended exclusively for creatures. Both objs and mobs within the map are contained by objects of the class /turf/. A turf is simply a tile on the map. Being as it is a point on a grid, a turf cannot move. Turfs, in turn, are contained by objects of the class /area. Areas are meant for use as zones or rooms. In the same way that multiple items can be contained within a single map tile, multiple map tiles can be contained within a single area. You might, for example, wish for a certain sound to play when a player is in a given room, or for certain creatures to be barred from certain places, or goodness knows what else. The possibilities are myriad.

It should be noted that there exist built-in classes not mentioned here, such as /client or /image, but they are not relevant at present.

In summary, the line of descent is as follows:

  • /datum
  • /datum/atom
  • /datum/atom/area
  • /datum/atom/turf
  • /datum/atom/movable
  • /datum/atom/movable/obj
  • /datum/atom/movable/mob

Licenses and Stuff

Historical Structure

Goonstation formerly stood at a weird intersection of open- and closed-source. Most of the code is closed-source, kept away from the public; however, some coders may share some code with you, particularly if you want to make a patch. In addition, there have been two public releases of the source code: one from March 2016 and one from 2020, which contains the source as it was on January 1st, 2020, with certain secrets and other things plucked out. Pretty much all the patches made at the time used code from these repositories. So, if closed source is a walled garden, Goonstation was a walled garden that occasionally let people in to study the gardening techniques and landscape patterns used, and sometimes, it released books and treatises explaining how the garden is constructed.

Current Structure

As of April 1st, 2020, the goonstation administration made the decision to make the code open-source; for the interested, a statement from the admins exists at this link. The new open source is found here. Some elements are still kept secret, particularly content designed to be secret so it can't just be instantly looked up and figured out; but the vast majority of the code is now maintained there.

License

Goonstation is specifically licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License, or just CC BY-NC-SA 3.0 US. It's best explained on its dedicated page on the Creative Commons website, but it essentially means people like you can contribute code to Goonstation, using code from the public releases, open source release, and/or snippets of code shared by people on the Goonstation coder team, and the only lawyers you'll have to worry about are ones in-game.

Community
ContributingGuide to Contributing to Wikistation · Goonstation Development Guide · Goonstation Contributor Guidelines · Spriting · Goonstation Spriting Guidelines · Coding· Goonstation Code Guide · Hosting a server · Mapping · Goonstation Map Submission Guidelines · Goonstation Audio Guidelines · Contributing to Requisitions
MembersAdmins
Culture & ArtTerminology · Storyline (Old Storyline) · Fan Videos · Fan Art
History & HappeningsChangelog · Pre-2016 Changelog · History of SS13
Tales & HumorSex and the Singularity · Maintenance Doggs · The Rapper · The Trial of Heisenbee · Albert and the Deep Blue Sea · The uWu Interrogation · HeadSurgeon · Tales of The Devil‎ · IT'S ALIVE! It died. IT'S ALIVE! It died. IT'S ALIVE!‎ · The floor is now explosions‎ · My god, it's full of butt · The Crashwich · The Doom Peel‎ · Jugglemancy‎
Coding - Space Station 13 Wiki (2024)

FAQs

What is Space Station 13 coded in? ›

SS13 is coded in Byond, which is an object oriented programming language.

What does SS13 stand for? ›

Space Station 13, often shortened to SS13, is a top-down tile-based action role-playing multiplayer video game running on the freeware BYOND game engine, originally released in 2003. Space Station 13. Developer(s)

How do you write in Space Station 13? ›

Writing is performed on paper using any standard writing utensil.
  1. Pens come in a few different colours, black or blue by default, and some departments are provided with red pens. ...
  2. Crayons work much like pens, except that they are always bold, and lack the list, horizontal rule, and small tags.

What is Blackstone SS13? ›

Blackstone is a fantasy roleplaying game based on the source code for Roguetown, and is inspired by Table Top Roleplaying Games.

How many lines of code does the ISS have? ›

In the International Space Station's U.S. segment alone, more than 1.5 million lines of flight software code run on 44 computers communicating via 100 data networks transferring 400,000 signals (e.g. pressure or temperature measurements, valve positions, etc.).

What code does NASA use? ›

Both ISRO and NASA use C p programming language for ground operations. Further, it provides programmers with the ability to control how, when, and where to allocate and deallocate memory. C++ is considered one of the most powerful languages that are used in developing flight software.

What are Z levels in Space Station 13? ›

Z-Levels are the various maps with set borders that contain the playable areas of SS13. Moving off the edge of a z-level in space will place you somewhere on the opposite edge of another z-level.

Is space station 14 the same as 13? ›

Space Station 14 is a remake of SS13 that runs on Robust Toolbox, our homegrown engine written in C#. This is the primary repo for Space Station 14. To prevent people forking RobustToolbox, a "content" pack is loaded by the client and server.

What is the point of Space Station 13? ›

Space Station 13 is a bit like a multiplayer Dwarf Fortress in space, a game in which you control a single character fulfilling a single role upon a prebuilt and fully functioning space station. Your collective goal is to survive whatever secret catastrophe the game mode dictates at the start of the round.

Is Space Station 13 open source? ›

Space Station 13 (SS13) is one of the largest open source games in the world.

What is the origin of Space Station 13? ›

Creation: 2003 It's no doubt you've heard that SS13 actually started out as an air simulator. Unlike a lot of other things people say about the history of SS13, this is actually quite true. Strange as it may sound, SS13 was created by Exadv1 as a simple hobby project/air physics demo.

How to talk in Space Station 13? ›

How do I talk? To speak to fellow players, type Say, press spacebar, and write your message. Press Enter. To speak on your headset, type Say, press spacebar, type a ;, then write your message.

Why is it called Blackstone? ›

The founders named their firm "Blackstone" using a cryptogram derived from their names: "Schwarz" is German for "black"; "Peter", "Petros" or "Petra" (Πέτρος and πετρα, the masculine and feminine rendering of the word, respectively), means "stone" or "rock" in Greek.

How powerful is Blackstone? ›

Blackstone is the world's largest alternative asset manager, with more than $1 trillion in AUM. We serve institutional and individual investors by building strong businesses that deliver lasting value.

What is plasma SS13? ›

From /tg/station 13 Wiki. A miracle substance, this is one of the things SS13 mines and researches. What little NT has been able to glean so far indicates it is an alien element that has never been encountered across human conquered space.

What is the space station code name? ›

The call sign of the International Space Station was Alpha, now Station.

What is the area code for the ISS? ›

The phone number for the International Space Station has a 281 area code because it is connected to a device at the Johnson Space Center. Astronauts have to dial 9 to call Earth. The space station is not reachable by outside phone lines.

References

Top Articles
Latest Posts
Article information

Author: Trent Wehner

Last Updated:

Views: 5934

Rating: 4.6 / 5 (56 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Trent Wehner

Birthday: 1993-03-14

Address: 872 Kevin Squares, New Codyville, AK 01785-0416

Phone: +18698800304764

Job: Senior Farming Developer

Hobby: Paintball, Calligraphy, Hunting, Flying disc, Lapidary, Rafting, Inline skating

Introduction: My name is Trent Wehner, I am a talented, brainy, zealous, light, funny, gleaming, attractive person who loves writing and wants to share my knowledge and understanding with you.