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 

Town surrounded by a wall

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 

fighters smash demons in fire and poison clouds

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 

space ship destroys enemies and asteroids with plasma beams

@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 

Other Game News 

Library & Tooling updates 

gfx-rs & wgpu-rs: Project Update 

gfx-rs rusty logo

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 text logo

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 

Minimal pathfinding and FoV example

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 

Generated textures samples

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,

Iced - a Renderer-Agnostic GUI Library 

All widgets tour demo: radio buttons, sliders, debugging view, etc

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 logo

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:

Godot and Rust 

Recall Singularity's ship base

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:

Use Prebuilt Rooms with Rust Macros for More Interesting Procedural Dungeons 

Top-down view on a generated dungeon

@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 

Meeting Minutes 

See all meeting issues including full text notes or join the next meeting.

Requests for Contribution 

Bonus 

Just an interesting Rust gamedev link from the past. :)

a scene with sand, water, a tree, flowers, and fire

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!

Discussions of this post: /r/rust, twitter.