
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.ĭM, as we discussed above, is executed by way of a process virtual machine. 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 /mob/bear/fuzzy_wuzzy/sylvan_defecation() (note the absence of /proc/). Suppose /bear has a function called sylvan_defecation, rendered in DM as /mob/bear/proc/sylvan_defecation(). You can even define subtypes of inherited functions, a practice known as overloading. Any changes to /bear affect /bear/fuzzy_wuzzy, but not vice-versa. Therefore, you make a subclass /mob/bear/fuzzy_wuzzy. The path for a bear is /mob/bear (bear is itself a child of mob, a built-in class which will be discussed later). For instance, you might wish your game to feature a special type of bear. One class can be derived from another, such that they share everything defined in the parent class. The concept of inheritance is central to object-oriented programming. 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. Whenever a bear comes into existence within the game, an object of this class is instantiated. You define all the variables and functions associated with them: What they're called, how they move, etc. Suppose, for example, you are making a game with bears. Abstract classes are defined in the code, which serve as templates for objects manipulated by functions. 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).īYOND, being patterned on C++, is an object-orient programming language.
Space station 13 byond code#
DM source code is compiled not into machine language, but into a binary format designed specifically for BYOND.

This is done by way of a process virtual machine. Its purpose is the creation of games, and so tricky things like memory management are smoothed over for the coder's convenience. You can also take a look at DM by Example guide here: Introduction to DM as a languageĭM is a high-level programming language, meaning, effectively, that its use does not require much understanding of computer hardware. Join at This Invite Link If you have problems with the above guide, visit #imcoderĪll of these links and more can be found at There's plenty of friendly people there, capable of answering most of your questions. To Run, Host, Compile, And Develop on SS13 Go To The Goonstation Development Guideĭiscord is the place to talk to fellow players, admins, and devs in realtime.
