Getting started with Code

From /tg/station 13 wiki
Jump to: navigation, search

Let's get one thing out of the way right at the start: coding takes a long time to learn, a long time to get proficient in and a long time to actually do anything. But the good thing is that you can start contributing after just a few days of intense learning, so even tho you won't be reinventing Aliens any time soon, you will be able to fix bugs and make minor improvements soon.

But how do I learn to code? Which resources should I use?

Contents

Coding guides

Here is a repository of the guides we are aware of and we recommend. There is no 'all in one' guide, which we could consider 'great', but we'll have to do with what we have available. Of course, anyone who is proficient in BYOND or SS13 code is welcome to write or update guides.

BYOND

The byond language, called Dream Maker Language or DM, is relatively simple and forgiving. It is pretty good for people, who are just starting to learn how to program.

This is the only half-decent guide any of us are aware of on 'basic byond'. I usually don't recommend using this guide, because the problems you will run into and try to solve are not problems you will ever run into in SS13, because SS13 is coded on a much higher level than this guide, since many 'helper' functions are already written. But if DM is going to be your first programming language, it is still a good idea to go through this guide.

Basic BYOND guide by ZBT

Our SS13 guides

Understanding SS13 code is a guide we have, which is intended for people, who wish to just read through the code and understand it on a basic level. The guide is written in SS13 code, meaning it does not bother with the problems base-level Byond code has, because they were already solved by SS13 ground code.

SS13 for experienced programmers is another SS13 code guide we have. It is a guide intended for people who want to write code. You don't need to be an experienced programmer to read it tho. It just doesn't stop at each point for too long. If you don't understand what a term means, you can easily find it explained through Google.

DM reference

The DM reference is a reference page on BYOND. If includes a lookup of all the variables and procs included in the base byond language. It will not be very helpful to you at first, but you will soon realize how useful it is. The reference page has moved recently, so the links on our SS13 guides don't work anymore, but you can look up all the procs and variables that are linked to there, on the newer DM reference.

Ask a Coder

We have quite a few coders now, who are very capable of answering most of your questions or referring you to the proper coder for more detailed or code-specific questions. You can get in touch with coders on our IRC channel for contributors. Just ask a question there. Try to avoid sending questions in private messages.

Tinkering

Playing around with code is the only 'real' way to learn. You will have to learn the quirks, catches and specifics of SS13 code, before you will be able to do large projects quickly. Look at the issues list and try to fix a few bugs or ask a coder in our IRC channel for contributors for suggestions on projects you could do. Tinkering should always be done in SS13 code tho, don't bother with base-level BYOND code, because the experience you'll get from that will not be all that useful.

Once you finish a project

Once you've made an improvement or finish a project, you can request for it to get included in the NT Station 13 master repository. See From blank to commit for more information on how to commit something.

Contribution guides
General Hosting a server, Setting up git, Downloading the source code, Guide to contributing to the game, From blank to commit, Game Resources category
Database (MySQL) Setting up the database, Working with the database, MySQL
Coding Understanding SS13 code, Getting started with Code, SS13 for experienced programmers, Binary flags‎
Mapping Guide to mapping, Map Merger
Spriting Guide to spriting
Wiki Guide to contributing to the wiki, Wikicode, Hiding content