Welcome to the eleventh 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!

You can follow the newsletter creation process by watching the coordination issues. Want something mentioned in the next newsletter? Send us a pull request. Feel free to send PRs about your own projects!

Table of contents:

Legion Game Jam 

The Roman Empire at its greatest extent

The “Legion” game jam by Laticoda is about the Roman Empire for the background theme and ECS paradigm for the technical side. The conditions are:

  • Open-source & Rust only.
  • Projects should use some ECS library (you can choose Legion if you don’t have one).
  • Team working and recycling old assets are allowed.

Submissions open to August 1st 2020.

It can be RPG, strategic, arcade or else; multi or solo. What you want. Just try to include a little bit of history and culture taste. Don’t be afraid, it is not ranked.

Also, participants are encouraged to document the development process at the event’s forum.

Game Updates 

Way of Rhea 

Way of Rhea Trailer
Click to see the latest version of the game’s trailer

Way of Rhea (steam) is an upcoming puzzle platformer that takes place in a world where you can only interact with objects that match your current color. It’s being built in a custom engine, and custom scripting language both written in Rust by Mason Remaley. This month’s updates:

Follow development updates on the game’s Twitter or subscribe to its newsletter.

A/B Street - Adjust Traffic Patterns in Real Cities 

Measuring the effects of changes
Measuring the effects of some changes

A/B Street is a traffic simulation game exploring how small changes to roads affect cyclists, transit users, pedestrians, and drivers.

June highlights:

  • Alpha release with a trailer, an excited reaction from r/seattle, and some local press coverage
  • Support for parking lots, automatically inferring the number and position of individual slots from OpenStreetMap geometry
  • Names of roads shown in-game, in a way that doesn’t cause clutter with agents moving nearby
  • Work starting on light rail and restricting through-traffic to zones

A/B Street uses a custom GUI library, leveraging glium, usvg, and lyon. Help with Rust and visual/game design is always welcome! Check out the roadmap and good first issues.

Crate Before Attack 

In-game visual scripting prototype
In-game visual scripting prototype

Crate Before Attack by koalefant (@CrateAttack) is a skill-based grappling hook multiplayer game where frogs combat their friends while navigating the landscape with their sticky tongues.

A summary of recent changes:

More details in June Update DevLog-entry and on the YouTube channel.

Garden: June Devlog 

screenshot: concrete & trees

Garden is an upcoming game centered around growing realistic plants. Some of the updates from the June devlog:

  • Soil collision detection & changes to the soil column generation.
  • Plant sim & terrain updates happen at different times & separately.
  • Proper Global Illumination research.
  • Automatic in-game texture reloading.

Veloren 

Animation improvements
Animation improvements

Veloren is an open world, open-source voxel RPG inspired by Dwarf Fortress and Cube World.

In June, Veloren did a big interview with GamingOnLinux, be sure to check it out! Veloren’s lead artist also started a weekly blog about his work on Veloren, which you can see here. Veloren recently reached the first page of most starred projects on Gitlab! The Veloren Youtube channel also reached 1000 subscribers.

A lot has been done over the last month towards 0.7, which is slated to release at the beginning of August. Lots of work has been done improving UI and animations. These will help towards the goal of 0.7 being the “progression” update. Many improvements have been made to the continuous integration system to make it more reliable and faster. Mac support was added to Airshipper, the Veloren launcher. Significant work was done on the world simulation front. This includes economic simulations that will represent trade and resource pricing in settlements and cities. Castle generation is also now in the works.

Work on castle generation

Test coverage and documentation has started to improve, and a workflow around it is being developed. The project is now hosting a proper documentation site that is updated with each merge. A #ux working group was created to facilitate discussions on improvements to player interactions in Veloren. Lots of translations were merged, including Swedish, Polish, and Brazilian Portugese. The skill system is moving on to implementation, being a coordinated effort between the game design, art, and combat working groups.

You can read more about some specific topics from June:

June’s full weekly devlogs: “This Week In Veloren…”: #70, #71, #72, #73, #74.

In July, work will be done to complete the progression systems. There will be financial meetings held to discuss how funds from the project’s Open Collective will be distributed.


Also, check out a talk about open source and Veloren:

Veloren talk

Zero to Game 

ships with greater thrust explode
The initial destruction prototype applied across different thrust levels

Zero to Game is a project that documents the creation of an independent space game from zero.

My plan for this website is to narrate my independent development of a computer game in the Rust programming language. I’ve never done this before, and so I hope to be able to show you the progression right from zero all the way up to a game.

  • Zero game programming experience.
  • Zero experience in the Rust programming language.
  • Zero experience making assets, images, sounds, models, etcetera.

Currently published posts:

Pont 

Screenshot of the Pont board game

Pont is a multiplayer online board game based on Qwirkle, implemented by Matt Keeter. Both the client and server are written in Rust, using WebAssembly to run the client in the browser without any Javascript (besides a small shim).

It can be played online here!

The system architecture is described in a blog post and the source is available on GitHub

Discussions: /r/rust, Hacker News

Scale 

Scale screenshot

Scale’s objective is to become a granular society simulation, filled with fully autonomous agents interacting with their world in real time.

The 4th devlog was published, talking about the new renderer based on wgpu-rs, pathfinding, parking, curved roads and a new crate extracted from the project called flat_spatial.

Discussions: /r/rust_gamedev

runner 

Runner gameplay sample

runner is a simple side-scrolling endless runner game that takes place in a bright world that only has our fearless adventurer & a few pesky beings that are bent on keeping her from running! It uses specs for ECS and has multiple frontends: sdl2 & quicksilver. Between the two frontends it can target the majority of the platforms: Web, Mac, Linux, Windows (untested) & possible even iOS & Android.

Animal Chess 

Part of the game map
Part of the game map

Animal Fight Chess (斗兽棋, “Doe Show Chee”) by @netcan is a Rust implementation of a popular Chinese game.

To win the game, one player must successfully move any animal into the Den(兽穴) of the opponent or eat all animals of the opponent. The basic move is just one space either forward, backward, left, or right. The pieces never move diagonally. Each player has eight pieces, different animals with different degrees of power, a larger power piece can eat a little power piece, but rat can eat elephant. Here’s a picture of the pieces, their English names, and relative powers indicated by a number. See full rules at ancientchess.com or Wikipedia.

The project uses alpha beta pruning algorithm for AI and provides a python module to use AlphaZero algorithm for training.

rs-type 

screenshot: planets and words

rs-type is a WIP typing game inspired by zty.pe. It can load KTouch courses and also has a built-in basic vector drawing tool for painting backgrounds.

Guacamole Runner 

gif

Guacamole Runner is a small game made with Tetra and Shipyard in approximately 2 days by @EllenNyan. The game’s concept is that the player is constantly falling and must jump off planes to stay in the air. When they go over the top of the dirt tiles they plant flowers which gives them points.

Wooting Snake 

Video of snaky keyboard lights in action

Wooting Snake is a snake game where the visuals are represented on your keyboard lights, instead of a computer screen.

TanTan released a video documenting the process of making this project.

boundless 

terrain, bg trees, and a character

Anthony Brigante started working on a 2D sandbox game. Two devlogs were released this month:

Weegames 

Weegames
Click to see a demo video

Weegames is a fast-paced minigame collection. There are 23 odd games all made using free images and sounds. The more minigames you beat the faster they get.

The source code is available here.

blub 

Fluid demo

blub is a WIP 3D fluid simulation playground build with wgpu-rs and imgui-rs. It focuses primarily on hybrid approaches lagrangian/eularian approaches (PIC/FLIP/APIC..). Check the project’s README for more details.

Learning Material Updates 

Hypervis: 4D Physics Visualization 

Screenshot of the talk

This month, Tyler Zhang gave a talk at London Virtual Talks about the theory and implementation of 4D physics visualization. The demo’s source code could be found here.

Boids in Rust 

Boids demo
Click to watch the video demo

@twitu has published a three-part blog series about simulating a group of virtual agents (boids) that will swim around an enclosed space behaving like a school of fish.

This is a beautiful application of procedural graphics generation, where simple rules create complex patterns. It’s almost entirely inspired by Sebastian Lague’s Coding Adventure with boids.

  1. A fistful of boids - Setting up the scene and basic animation
  2. For a few boids more - Generating boids and obstacle avoidance
  3. The school, the boid and the Rusty - Simulating a flock, parallelism and benchmarking performance

The source code with tagged stages is available here.

Discussions: /r/rust

DOOM Fire 

The fire effect itself

doomfire by @r-marques is Rust implementations of the DOOM fire effect (based on Fabien Sanglard’s blog post) using different 2d graphics libraries: minifb, pixels, sdl2, wasm-bindgen + Canvas API.

This could be helpful for someone new to rust and trying to get into game development and looking for the right libraries to use.

Discussions: /r/rust

Library & Tooling Updates 

rust-psp 

demo-gif

Just what everyone’s always wanted, Rust on the Sony PSP! 😆

This project is a port and improvement of the unofficial C/C++ PSPSDK from 2005 It does not require a custom GCC toolchain to be installed. Only Rust nightly and a cargo subcommand.

The psp crate provides a psp::sys submodule that houses the entire Sony PSP API. The authors are working to have these interfaces merged into the libc crate. The PSP, unfortunately, uses non-standard dynamic linking, (and some libraries are statically linked!), so function definitions marked extern are not enough. Eventually, this sys lib will be wrapped with a more rust-friendly library.

Rather than patching LLVM or rustc, the rust-psp team has also merged a mipsel-sony-psp target upstream, and published cargo-psp. This is a subcommand that works exactly like cargo build, except it also builds the crate into a PSP-specific executable format called PRX and packages that into an EBOOT.PBP, the standard format for a PSP Homebrew.

The crate has reached full user-mode parity with the unofficial C/C++ SDK. Kernel-mode support still needs to be worked on. Aside from library imports, there is also support for PSP-specific custom assembly instructions via the vfpu_asm! macro, with no need for a custom compiler toolchain. There is also optional embedded-graphics support and a function to benchmark or time your code.

The next major milestone for rust-psp is std support. If you are interested in helping out, please feel free to join the rust-psp channel in the PSP Homebrew discord server.

glam 

glam is a simple and fast linear algebra crate for games and graphics.

This month glam 0.9 was published to crates.io. This update is a breaking change from 0.8.

In 0.9 the Vec3 type was changed from being a 128 byte SIMD vector type to a tuple of three floats. This changes the size of Vec3 from 16 bytes to 12 bytes and the alignment from 16 bytes to 4 bytes. This might not affect all users but if Vec3 was used in a context where the size or alignment mattered, such as in FFI or as input to shaders, this could cause breakage.

The SIMD parts of Vec3 were moved to a new type, Vec3A (A for Aligned) which is 16 byte aligned and thus 16 bytes in size. The Vec3A type is still there for users who want the performance benefits of the SIMD implementation.

The motivation for this change was that it is potentially surprising and confusing for new users that the Vec3 type was not 12 bytes. Also, it’s common that users needed a Vec3 that was just 12 bytes.

While glam is reasonably stable it has not yet reached a 1.0 release so it seemed like now is the time to address such issues in the API.

This Month in Mun 

Language Server Diagnostics in action
Mun language server diagnostics in action

Mun is a scripting language for gamedev focused on quick iteration times that is written in Rust.

After the dust of the Mun v0.2 release settled, this month’s focus has been on fixing several issues found by community members, improving the overall quality of the code base and working towards the next release: Mun v0.3.

Their June updates include:

  • Make It or Break It contest;
  • several fixes for issues that arose thanks to the contest;
  • the foundation for Mun projects;
  • an initial language server setup;

GameLisp 

logo

GameLisp (glisp) is a scripting language built for and in Rust and utilizes syntax from the LISP family of programming languages. It provides a fast and efficient garbage collector that runs every frame instead of freezing a thread.

GameLisp also provides a playground to experiment with different projects. A reference guide is also available as well as API documentation for integration into Rust.

The crate has had its initial release, a roadmap and ways to contribute are available on GameLisp’s GitHub Respository.

safe_arch v0.5 

safe_arch is a crate by @lokathor that safely exposes CPU arch intrinsics via #[cfg()]. This month v0.4 and v0.5 versions were released. The main improvements are:

  • 256 bit supports
  • Almost all the API was reworked for better naming consistency

yaks 

yaks is a minimalistic framework for automatic multithreading of hecs ECS library using Rayon data-parallelism library.

While the project itself started earlier this year, with this month’s release yaks gained an overhauled API, further leaning into the promise of simplicity:

  • systems are any functions or closures of a specific signature,
  • Executor is a container for one or more systems,
  • system execution order can be defined when building an Executor to create concurrent chains of systems,
  • resources used by systems (any data that is not associated with an entity) are now borrowed for the duration of execution, instead of being owned by the framework.

All items in the library are exhaustively documented, and the repository contains a fully annotated example.

Enabled-by-default parallel cargo feature can be disabled to force everything in yaks to become single-threaded, which allows using code written with the framework on platforms without threading - notably, web.

macroquad 

macroquad by @fedor_games is cross-platform (Windows/Linux/macOS/Android/WASM) game framework build on top of miniquad.

The project now has a Discord community server (Matrix bridge) with channels for all the quad-family projects: miniquad, macroquad, good-web-game, and nanoserde.

Also, two new examples came from the awesome macroquad community:


megaui is macroquad’s imgui-like UI system. Recently, megaui got decent input widgets: input fields, editboxes, and sliders. All of them support copy-pasting back and forth from the browser. Check out the web demo (source):

ui


nanoserde by @fedor_games is a fork of makepad-tinyserde with syn/quote/proc_macro2 dependencies removed. It attempts to solve a serde’s problems of long clean compilation time, increased incremental build time, and build artifacts size. nanoserde may be useful when the whole game has less than a minute clean build time and spending ~40s on serde is unreasonable.

> cargo tree
nanoserde v0.1.0 (/../nanoserde)
└── nanoserde-derive v0.1.0 (/../nanoserde/derive)

Some benchmarks and tiled map deserializing example could be found here.

Tetra 0.4 

Tetra is a simple 2D game framework, inspired by XNA and Raylib. This month, version 0.4 was released, featuring:

  • A rework of the text rendering API, which improves performance and fixes a number of long-standing bugs
  • Functions for capturing the player’s mouse
  • Various tweaks and bug fixes under the hood

Also, a new guide has been added to Tetra’s website, listing some things to consider when distributing your game to the public. This guide is still a work in progress, so contributions are welcomed!

NodeFX 

NodeFX

Project “NodeFX” by Christian Vallentin (@MrVallentin) is an unnamed node-based tool for creating GLSL shaders in real-time, entirely written in Rust.

This month added support for both 2D and 3D SDF nodes. The above screenshot is a meta example of creating a node using some of the 2D SDF primitives and operations. An example of some 3D SDFs can be found on Twitter.

Next month is all about adding more UI, to make the application more user-friendly and fully-fledged. After UI has been added, there is a planned release of the application. More information can be found on Twitter.

Göld 

Chumtoad

Göld is a WIP game engine for hacking together 3D games using old tech. It uses wgpu-rs and is based on the simple mental model of PyGame or Löve, but for Goldsrc/Quake-era tech.

The ultimate goal of the project is to have a simple engine that can do basically everything that many simplistic 3D games will need, without making an attempt at being too general.

Current features:

  • Quake 2 maps loading (although not Quake/Goldsrc maps yet) and rendering with proper BSP culling and frustum culling.
  • Loading and rendering of HL1 models.
  • Simple dynamic lighting system.

Discussions: /r/rust_gamedev

Arsenal Game Engine 

Arsenal is the concept for a 2D and 3D game engine that is fully integrated with Blender and built on a Rust core. The engine will be built around an entity component system ( probably Shipyard ) for its performance and game design advantages. The vision of Arsenal is to build an Open Source game engine that is suitable for games of any scale and that is easily approachable by a wide audience of both complete beginners and seasoned experts.

Arsenal currently has a POC working, but there is no support for adding custom game logic. The next major step for Arsenal is to get initial scripting support in Shipyard. The scripting plan for Arsenal borrows heavily from the Amethyst scripting RFC with the first target scripting language being Python. Other languages that are candidates for being added later are be Mun, Lua, and maybe other languages written in Rust such as Gluon.

More information on the Arsenal development direction can be found in the latest Arsenal development blog post.

Katharos Technology has gone live on GitHub Sponsors as a means to fund development of the development of the Arsenal game engine and supporting Rust gamedev libraries and tools such as GFX, and WGPU.

Vimnail - a Mouseless Image Editor 

Demo of transforming Ferris

Vimnail is a WIP mode-based image editor inspired by Vim. The goal of the project is to be able to compose images without using the mouse.

TanTan also released a devlog video about the project.

GC NES Emulator 

screenshot of the web version: main area, scaling settings and drag-n-drop area

This month Garett Cooper released GC NES Emulator that allows you to play classic Nintendo Entertainment System games in the browser.

The core of the GC NES Emulator is implemented in the Rust programming language, which supports Web Assembly as a compilation target. With a WASM version of the emulator, I’ve written a javascript wrapper that takes the frame rendered with the Rust code and displays it on an HTML 5 canvas. At present, this is done completely synchronously, though I would like to move it into a worker at some point in the future

The source code is available here.

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 screenshot of the first slide

During RustConf 2018, Catherine West gave a keynote talk “Using Rust For Game Development” that introduced a lot of people to the concept of ECS and is now considered a classic. You can watch the recording here (slides).

A few months later an extended text version was released.

Discussions: /r/rust, /r/programming


That’s all news for today, thanks for reading!

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.