Skip to content

Instantly share code, notes, and snippets.

@PJB3005
Last active October 4, 2018 06:51
Show Gist options
  • Save PJB3005/c84bc700ec58a98f7ec5dccbe77b74f3 to your computer and use it in GitHub Desktop.
Save PJB3005/c84bc700ec58a98f7ec5dccbe77b74f3 to your computer and use it in GitHub Desktop.
So you want to ascend to Atom for coding BYOND?
{
"cmd": "C:/Program Files (x86)/BYOND/bin/dm.exe",
"args": [ "C:/path/to/your/specific/code.dme" ],
"sh": false,
"errorMatch":
[
"\n(?<file>[\\\\\/0-9a-zA-Z\\._]+):(?<line>\\d+).*"
]
}

Why?

If you've ever worked with a proper IDE before, it should come as no surprise to you that DM, the default "IDE" of BYOND is kind of awful. Seriously it breaks when you copy paste text with LF line endings into it.

While there's no proper replacement for mapping or managing icons (although I personally recommend you use an image editor like GIMP for spriting), code editing is a ton easier. There's a variety of editors out there which are modular enough to be used for any language, one of these editors is GitHub Atom.

Alright how do I set this up.

Syntax Highlighting

First of all, you're gonna need the Atomic Dreams, the package allows Atom to do proper syntax highlighting on DM code files, and it even does a basic level of DM code analysis (it can detect defines as proc or variable declarations and provide auto completion for them).

To install the package, open the options of Atom (menu bar or use Crtl+,), go to install, search for the package and install it.

With that installed, if you open a DM code file you'll see it's already done a lot of nice syntax highlighting. That's not all though.

Building from atom.

To build from Atom, you'll need the creatively named build package. Search for the package through Atom and install it.

For the package to know how to build the project, it needs a file in the project root to tell it how to build, a simple build file in JSON format is attached to this gist as a separate file. Make sure to preserve the file name or else it won't detect the file!

Note: I have experienced an issue in the past where the build package requires Atom to be restarted after installation before it actually works. I recommend restarting Atom if you are experiencing issues.

Note that you will have to do a couple of things related to the build file. If your BYOND instalation isn't in the standard location, the script won't find the compiler binary. Secondly the full path to the DM environment file (.dme) has to be added in because it's not advanced enough to find the environment file automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment