Be sure to check out the reference for all of the new features below.
Version 515:
- Breaking changes
- New savefile capabilities will make many savefiles written via 515 unusable by earlier versions; set savefile/byond_version=514 if you want to maintain compatibility for now
- call() for external libraries is now call_ext()
- call() can use direct proc references
- Compiling src.var in a static var initializer doesn't work anymore, nor does accessing other proc-local vars
- A ./proc type path shortcut is no longer available in static var definitions; use __PROC__ and nameof() instead
- Including "list" in a var's path makes type checking treat it as /list; e.g. previously var/list/foo/bar was counted as var/foo/bar for type checking
- Optimization/performance
- SendMaps has been threaded, so high-population games get a huge performance boost
- for() loops can now internally optimize more than just view() and block(), but also range(), hearers(), etc.
- Faster implementations of x**2, x**-1, 1/x, and x*x
- Map editor
- The map editor has had a major overhaul
- Hardware rendering is now used for the editor to match Dream Seeker
- A new properties pane has been added for quick editing of an atom's properties
- The old method of editing by altering an instance has been replaced, but you can change this via Options | Instances | Classic
- The user interface layout can be changed
- Language features
- Pointers are now available, using the & and * prefix operators, and ispointer() to test if a value is a pointer
- Procs can now have return types specified so the compiler can infer their type when using the . operator; follow the proc's definition with as /typepath or as num or as text|null, etc.
- New :: operator which can do compile-time calculations/optimizations or act as shorthand for initial()
- %% and %%= operators, for non-integer modulo
- operator"" to override converting an object to embedded text
- nameof() operator, which can grab the name of a proc or var at compile time
- __TYPE__, __PROC__, and __IMPLIED_TYPE__ pseudomacros
- #pragma directive, which can be used to change warning levels and allow multiple copies of an included file
- final keyword for vars and procs, preventing further overrides
- Misc. vars and procs
- world.Tick(), overridable by developers, is called before map sending for a built-in global loop
- client.RenderIcon() can leverage a client to fully render an atom or appearance
- world.process reads the system process ID of the server
- New math procs: floor(), ceil(), trunc(), fract(), isnan(), isinf()
- trimtext() proc
- ftime() proc for grabbing a server file's last-modified or creation time
- New block(x1,y1,z1, x2=x1,y2=y1,z2=z1) syntax
- noise_hash() for procedural generation
- get_steps_to() to get an entire path from the built-in pathfinding
- refcount() proc
- list.RemoveAll() to remove all copies of an item from a list
- call_ext(), to replace call() for external libraries
- Changes to procs
- json_encode() and json_decode() now have flags controlling their behavior
- animate() now has an ANIMATION_CONTINUE flag and a delay argument
- Byondapi
- A new method of calling external libraries (and vice-versa) has been created called Byondapi
- External calls using the new method are made by prefixing the external function name with byond:
- Libraries using Byondapi can read/write vars, call procs, and more
- Savefiles
- byond_version and byond_build vars have been added to enforce compatibility
- Improvements have been made to saving appearances (not readable by older servers)
- Sound
- offset var now can change where a sound begins
- pitch var has been added, for bending pitch without changing duration
- Parameters can be set to initiate a command on sound end
- Client
- Atoms and appearances can be rendered by reference in the browser
- User interface
- Embedded wingets now include num-lock, caps-lock, scroll-lock
- A "raw" type for embedded wingets has been added
- Command-line software
- dm.exe now supports a -D option for custom #define
- dd.exe has been added as a command-line Dream Daemon in Windows; use the -console option for an interactive console