This Month in Rust GameDev #2 - September 2019
Welcome to the second issue of the Rust GameDev Workgroup’s monthly newsletter.
Rust is a systems language pursuing the trifecta: safety, concurrency, and speed. These goals are well-aligned with game development.
We hope to build an inviting ecosystem for anyone wishing to use Rust in their development process! Want to get involved? Join the Rust GameDev working group!
Game Updates
Veloren
Veloren is an open-world, open-source multiplayer voxel RPG. The game is in an early stage of development, but is playable.
Some of the September's improvements:
- Improved multi-staged towns generation;
- Improved inventory system and character creation;
- Massive progress on water, water physics, lakes, and rivers!
- New chunks data structure;
- Three-dimensional map and minimap;
- First-person view;
- Bows and arrows;
- Performance optimization;
New video: "24 Minutes of Alpha Gameplay".
Full weekly devlogs "This Week In Veloren...": #31, #32, #33, #34, #35.
Zemeroth v0.6
Zemeroth is a minimalistic 2D turn-based tactical game.
This month Zemeroth v0.6 was released. Main features of this release are:
- renown and fighter upgrades,
- possessions,
- sprite frames and flips,
- status effect icons.
Read the full devlog post or watch the video version.
Twenty Asteroids
@VladZhukov0 published a few devlogs about their "Twenty Asteroids" game:
Updates include:
- New enemies: a ship with a big pinball-like bullet and a laser-mesh ship;
- New upgrades: laser range and bullets reflection;
- Explosion size now depends on asteroid's size;
- Improved main menu, upgrade and death screens;
- Better color contrast;
- New AI behaviors: follow and circle around;
- Debugging performance plots;
Amethyst Games
-
Space Shooter v0.1.3 by @carlosupina introduced a currency system, shop system, and sound effects: watch the devlog video.
-
@mvlabat is working on interpolation in his multiplayer prototype (video).
-
Azriel Hoh released a major new devblog update titled "Focus!".
-
@webshinra made progress with raycasted FOV in their hexagonal game.
Other Game News
-
@dooskington published their 5th devlog: "Stats And Skills";
-
Alex Butler continues to polish their "Robo Instructus" game; 1.8, 1.9, 1.10 and 1.11 versions were released: official macOS support, bugfixes, and better translations.
-
@Wraithan got tower placement working in their "WraithDefense" tower defence game; the development process is streamed on Twitch.
-
@oliviff released v0.0.1 and v0.0.2 updates for Tennis Academy: simplified gameplay flow, areas, cash flow, animations, players' state visual cues and more.
-
The Garden game is under active development again. Devlogs are coming soon!
-
"Live" by @pincfloit - a small command-line interface survival game [twitter, github].
-
@MrVallentin tweeted a bunch of updates about their voxel engine: falling cubes, text rendering, 60M cubes generated in the blink of an eye, remeshing, retrospective video, saving and loading, and some more.
-
@Mistodon got their entire game "Disconnect" to render in the terminal;
Library & Tooling updates
gfx-rs & wgpu-rs: Project Update
gfx-rs is a Rust project aiming to make low-level GPU programming portable with low overhead. It’s a single Vulkan-like Rust API with multiple backends that implement it: Direct3D 12/11, Metal, Vulkan, and even OpenGL.
wgpu-rs is a Rust project on top of gfx-rs that provides safety, accessibility, and even stronger portability.
- gfx-rs was slimmed down: “magical” deps (like failure and derivative) were removed and it sped up the fresh gfx-hal build by a factor of 8.5X; the “typed” layer of gfx-hal got removed.
- Backend features were removed from wgpu-rs;
- An entirely new swapchain model was prototyped and implemented.
Discussions: /r/rust
Mun and Hot Reloading Experiments
Mun is a scripting language for gamedev focused on quick iteration times that is written in Rust.
Mun's pillars:
- Hot Reloading. Mun natively supports hot reloading - the process of changing code and resources while an app is running - on all target platforms and consoles with marginal runtime overhead. Its runtime has useful error messages, and can easily be embedded into other languages.
- Static Typing. Mun's type system eliminates an entire class of runtime errors and provides powerful IDE integration with auto-completion and refactoring tools allowing developers to focus on writing code.
- Performance. Mun uses LLVM to compile to machine code that can be natively executed on any target platform, guaranteeing the best possible runtime performance.
The driving force behind the development of Mun is natively supported hot reloading for functions and data. As such, the language and its syntax will keep growing at the rate in which hot reloading-supported semantics is added. Currently, the language looks like this:
fn main() {
let sum = add(a, b);
// Comments: Mun natively supports bool, float, and int
let is_true = true;
let var: float = 0.5;
}
// The order of function definitions doesn't matter
fn add(a: int, b: int): int {
a + b
}
The source code of the project is available on GitHub under the MIT or Apache licenses.
Mun's runtime is implemented in Rust. Check out a GIF demo of the Rust hot reloading functionality that shows:
- Catching and logging of errors (e.g. type mismatch),
- hot reloading of a shared library's symbols (used for reflection) and method logic,
- runtime invocable methods and type/method reflection.
Discussions: /r/rust
Rust Roguelike Toolkit and Roguelike Tutorial
rltk_rs by @herberticus is a Rust implementation of C++ Roguelike Toolkit (what is a "roguelike?").
It provides all the basic functionality one needs to write a roguelike game, as well as mouse support, an embedded resource system, Web Assembly support, and more.
All examples are linked to browser WASM to try.
The back-end uses glow to abstract OpenGL between versions. API for embedding assets directly into your binary.
If you'd like to see a functional roguelike that uses rltk_rs, check out Rusty Roguelike.
The Roguelike Tutorial includes more than 20 chapters now and continues to grow.
It covers topics from "hello rust" and "what is an ECS?" to adding monsters, equipment, nice menus, save/load, multiple levels, bloodstains, particle effects, magic mapping scrolls, and more.
The tutorial has Web Assembly links to all examples so you can run them in your browser.
EmbarkStudios/texture-synthesis
Embark has open-sourced their texture synthesis crate texture-synthesis. It's an example-based non-parametric image generation algorithm written in Rust.
The repo also includes multiple code examples along with test images, and a compiled binary with a command-line interface can be found under the release tab.
Also, see a great long recorded talk "More Like This, Please! Texture Synthesis and Remixing from a Single Example" which explains this technique and the background more in-depth.
Full list of stuff that Embark has released so far: embark.rs.
Discussions: twitter
Also,
- Embark will be sponsoring RustFest in Barcelona this year.
- Embark started hiring new grads [twitter].
Iced - a Renderer-Agnostic GUI Library
Iced is a renderer-agnostic GUI library focused on simplicity and type-safety. It was originally born as an attempt at bringing the simplicity of Elm and The Elm Architecture into Coffee 2D game engine.
Features:
- Simple, easy-to-use, renderer-agnostic API;
- Responsive, flexbox-based layouting;
- Type-safe, reactive programming model;
- Lots of built-in widgets and custom widget support.
Check out the design overview in the repo's README.
Discussions: /r/rust
Amethyst
Amethyst is a game engine and tool-set for ambitious game developers. It enables game developers to make complex games without getting into too much trouble, by means of data-driven design and the ECS architecture.
Tooling:
-
Amethyst Engine v0.13 was released. A new
amethyst_tiles
crate was added and the Pong tutorial is now complete with the addition of an audio section. -
@_AndreaCatania published an "Initialize physics world - Amethyst physics tutorial #1" video.
-
amethyst-imgui v0.5 is out, supporting a beta-version of the new imgui docking feature.
-
"How to do a turn-based game with the ECS pattern" post, by @webshinra.
-
@valkum is implementing area lights using linearly transformed cosines.
Godot and Rust
Tom Leys is working on a "The Recall Singularity" game about designing autonomous factory ships and stations and this month they published a few posts about using the Godot engine with Rust:
- "How I use Rust and Godot to Explore Space" [/r/godot];
- "Gorgeous Godot games in Rust" [/r/rust];
- "A Basic Godot-Rust Structure";
Use Prebuilt Rooms with Rust Macros for More Interesting Procedural Dungeons
@whostolemyhat published the fourth part of their tutorial series on procedural generation with Rust. In this tutorial, the room generation is updated so it can pick from a selection of pre-built room patterns as well as create the standard empty room.
Discussions: /r/rust
Other Library & Tooling News
-
uset - an implementation of sets and maps designed for small and medium number of stored elements which change quickly - i.e. in a dynamically evolving scene in a video game.
-
blend - a parser and runtime for Blender's .blend files that can be used to read (almost) everything inside the file: from mesh data, materials, cameras and animations to user preferences, window locations and render settings [/r/rust].
-
cubism-rs (Rust bindings for Live2D Cubism) got renderer support for Piston2D.
-
"Github Actions CI with Rust and SDL2" - Alexandru Ene wrote a post about CI with github actions for their hobby game project that uses Rust and SDL2.
-
@phaazon released luminance 0.33 that brings geometry instancing support; also, the third wiki chapter "Wavefront .obj loader" was released.
-
phaazon/spline-editor - a simple spline editor for the splines crate written using luminance.
-
@magistratic gave a talk on the Doom's BSP rendering engine using their Rust implementation as a demonstration at RevolverConf: recording (in Norwegian) and a WASM demo available here (source code).
-
rx by @cloudhead is a modern pixel editor and animator; this month, v0.2.0 was released, with new brush modes - pixel perfect drawing, symmetry and multi-frame drawing - a new GLFW backend and
.gif
output. [/r/rust, github]. -
Pixel art editor Xprite is now open source under GNU GPL [/r/rust, /r/rust_gamedev].
-
minimum by (@aclysma) is a game development framework that provides basic tooling and a content authoring workflow; this month, rendering of draggable shapes in the editor and rotation/scaling were added [YouTube demo].
-
The imgui-inspect macro-based property editor by @aclysma is a by-product of the above-mentioned "minimum" project.
-
Project Deios decided to implement their core in Rust and has been looking for a Rust graphics programmer: /r/rust announcement.
Popular Workgroup Issues in Github
- #36 "Adoption of Rust over time in existing game codebases"
- #48 "Placement New"
- #49 "Branch prediction hints (i.e. Likely/Unlikely)"
- #51 "Using wasm-bindgen for games"
Meeting Minutes
See all meeting issues including full text notes or join the next meeting.
Requests for Contribution
- winit:
- gfx-rs's "contributor-friendly" issues;
- wgpu's "help wanted" issues;
- luminance's "low hanging fruit" issues;
- Request from Amethyst: "The renderer-agnostic GUI library “Iced” by @hecrj looks so good. If someone wants to make this work with Amethyst please get in touch with us! (or just do it...)".
Bonus
Just an interesting Rust gamedev link from the past. :)
Sandspiel is a falling sand game by @MaxBittker built in late 2018 using Rust (via WASM), WebGL, and some JS glueing things together.
Sandspiel is a pixel physics simulation sandbox where you can paint with elements, conduct experiments and build your own world!
Elements include Ice, Water, Sand, Lava, Fire, Oil, Plant, Fungus, and many more!
The goal was to produce an cellular automata environment that's interesting to play with and supports the sharing and forking of fun creations with other players. Ultimately, I want the platform to support editing and uploading of your own elements via a programmable cellular automata API.
The history of the game and the development process are documented in a great "Making Sandspiel" blog post.
The source code is available on GitHub.
The game's community is still active: check @sandspiel_feed feed of uploads.
Discussions: /r/rust, /r/programming, hacker news
That's all news for today, thanks for reading!
Want something mentioned in the next newsletter? Send us a pull request.
Also, subscribe to @rust_gamedev on Twitter or /r/rust_gamedev subreddit if you want to receive fresh news!