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

Want something mentioned in the next newsletter? Send us a pull request. Feel free to send PRs about your own projects!

Ready at Dawn Studios is Hiring 

Ready at Dawn logo

@AndreaPessino have announced that Ready At Dawn Studios is hiring:

See the linked Twitter threads for details.

Rustacean Station: Rust for AAA Game Dev 

Rustacean Station logo

Jake Shadle, a veteran of DICE/Frostbite, was interviewed at RustFest 2019 by the Rustacean Station podcast on using Rust for game development at Embark Studios. Topics/timestamps:

  • [01:25] What is yours (and Embark’s) background in game development?
  • [02:14] What is the relevance of the Frostbite engine and what is your experience with it?
  • [04:15] What makes you think that Rust as a language is suitable for game development?
  • [06:13] How is parallelism employed in a game engine on the scale of Frostbite?
  • [07:07] Where is the Rust library ecosystem lacking for your use case, and what crates are you making use of?
  • [11:13] Why is Embark interested in WebAssembly?
  • [14:20] How can someone get in touch or learn more about Embark?

Listen the eposide here.

Game Updates 

Veloren 

Morning landscape

^ Morning landscape

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

At the end of January, Veloren 0.5 was released! Most of January was spent on preparing for this. It was also the first anniversary of This Week in Veloren! There has been a devblog each week since the end of January last year. Here are some of the big changes in this release:

- Added initial region system implementation
- Added moon and clouds
- Added proper SFX system
- Added changelog
- Added Scrolling Combat Text (SCT) & Settings for it
- Added options to disable clouds and to use cheaper water rendering
- Added client-side character saving
- Added a localization system to provide multi-language support to voxygen
- Added fullscreen and window size to settings so that they can be persisted
- Added coverage based scaling for pixel art 28 new mobs
- Added waypoints
- Added pathfinding to NPCs
- Overhauled NPC AI
- Pets now attack enemies and defend their owners
- Added collars to tame wild animals

You can read more about some specific topics:

Sitting on the edge

In February, the developers hope to push forward to 0.6 with a strong intro meeting. Authentication is slated to be released, as well as the Airshipper GUI beta. Hopefully, we also see controller support and improvements to the sound system as well.

January's full weekly devlogs: "This Week In Veloren...": #49, #50, #51, #52.

Physically Based Temperature Simulation For Games 

Dwarfs, cow and campfire demo

Alexandru Ene is working on a dwarf colony management game. This month, a "Physically Based Temperature Simulation For Games" devlog was released: how to adapt real-world thermodynamics formulas to a game and why you may want to do it?

Micro Entertainment Pack 

itch collection of 12 games

Micro Entertainment Pack is a collection of 12 tiny desktop games by Liam O'Connor.

I like to watch terrible TV shows on my computer, but often they tend to drag so I like to have something else to do at the same time. Thus, I developed the Micro Entertainment Pack --- fun casual games that fit in a fraction of your screen real estate. These games are inspired mostly by the Microsoft Plus! Entertainment packs for Windows, but I am also throwing in some other enjoyable titles from my days as a classic mac user.

All games in the pack are made using Liam's tesserae library for graphics composed out of 8x8 2 colour tiles. All graphics were drawn using the tesseraed editor that comes with the library. All games use a common tileset to do all of their graphical drawing.

The source code for all games is available here.

Scale 

Society scales

Scale is a new open-source project about modern day society simulation from the bottom-up.

Each individual has its own thought model, meaning every action has its importance and influences the environment. Scale is not a video game, but rather a live artwork. The world itself won't be generated or created by the user but is part of the project. That way, the focus is on the world itself and not on the tools to build it.

Also, check out the first devlog about the author's motivation and vision.

Discussions: /r/rust_gamedev

Colony Genesis - ASCII Ant Colony Sandbox 

New colony screenshot

Native Systems is working on a "Colony Genesis" ant colony sandbox game.

Current features:

  • Procedurally generated world
  • Day/night cycle and weather
  • Temperature, humidity, and fluid simulation
  • Food sources including aphid and fungus harvesting
  • 6 castes governing ant behavior and attributes

Watch 5 minutes of initial gameplay here.

Discussions: /r/rust_gamedev

Snake Game With Rust, JavaScript, and WebAssembly 

Final game demo: snake eats red dots

@jeremylikness started publishing a course "Snake Game With Rust, JavaScript, and WebAssembly".

We will learn how to export API implemented with Rust to JavaScript app. We will get to know canvas rendering, applications of vectors, and basics of game development.

At the moment, the series consists of six articles (of eight planned):

  1. Game Architecture
  2. Creating Game Instance
  3. Rendering the Game
  4. Placing the Food
  5. Game Loop
  6. Moving the Snake

The source code can be found in this repo and you can check out the game itself here.

12 Seconds Awake 

Title screen: click to play

"12 Seconds Awake" by @PsichiX is a small 2D top-down physics-based tank war game with worms-like turn mechanics written using Oxygengine (see "Oxygengine" section below).

The source code is available here.

Discussions: /r/rust_gamedev

Tennis Academy: Dash 

menu, levels, and customers

@oliviff released v0.1.5 version of "Tennis Academy: Dash":

  • 🍜 the puppy has a bowl
  • 🛁 code refactoring and using clippy
  • 💯 UI displaying score and other info

COWs 

COWs screenshot

Another Game Off submission: COWs is a WIP puzzle game about turning complete cows.

Welcome to the Logically Executed Automatic Paddock, or LEAP for short, where we keep our cows. Whoops, did I say cow? I meant to say COW. That stands for "Carry On Walking".

I suppose all of our COWs happen to be cows too. What a coincidence!

Our COWs are bound together to solve puzzles. Some of our COWs are advanced enough that we call them COmputational Workers (COW for short). It's a logical LEAP, but you're BOUND to get it.

The source code is available here.

Noodle Cat 

Debug rendering of Cat's physics parts

@Fryer00 tweeted a bunch of updates about their WIP Box2D physics game prototype:

Urban Myth 

relationships view mode

@cmd_tea tweeted about the progress of their Allegro-based superhero-themed game "Urban Myth" (working title):

Akigi 

Sticks that surround Pookie's house

Akigi is a multiplayer online world where most believe that humans are inferior.

Some of January's updates:

  • Autonomous NPC architecture & movement;
  • New capuchin rigged mesh and animation;
  • Chasing and basic combat system;

Full January's devlogs: #049, #050, #051, #052.

Split 

gameplay screenshot: ships and asteroids

Another entry for the Games Made Quick jam from @Mistodon.

Split is a game about outrunning a supernova and using time travel to improve your chances.

In the middle of using time travel to research a dying star, you find yourself fleeing from a supernova. I know, who would have guessed.

On the route to safety are three When Points - time traveling stations. This means you can retry your journey between them as many times as you like. The faster you move between them, the further from danger you are.

Features:

  • 3 extremely high speed stages
  • Multiple variants of stages, depending on how quickly you reach them
  • 5 different ending epilogues, based on your completion time

Check out a gameplay video here.

Antorum 

Spider NPCs

Antorum is a multiplayer RPG where players build their characters and fight against the growing threats on the isle. The game server is authoritative and written in Rust, while the client is written in Unity/C#.

This month, @dooskington published a bunch of devlogs:

Amethyst Games 

Amethyst logo

Library & Tooling Updates 

Rust 1.41: Profile Overrides are Stable Now! 

Rust 1.41

Though it wasn't mentioned in the official announcement post, Rust 1.41 brings a cargo feature that many gamedevs have been waiting a long time for: profile overrides.

This feature allows you to:

  • Use optimized deps in debug build to reduce incremental build time and get a sane FPS.

    To override the settings for all dependencies (but not any workspace member), use the "*" package name:

    [profile.dev.package."*"]
    opt-level = 2
    
  • Do not optimize build-dependencies (like syn) to increase full release build time:

    [profile.release.build-override]
    opt-level = 0
    

Discussions: /r/rust_gamedev, /r/rust

Adventuring into the World of Games in Rust 

@MontyPatrick shared their initial experience of diving into Rust GameDev in the "Adventuring into the World of Games in Rust" blog post.

Overall, while things are still relatively new in developing games in Rust I believe that Rust can serve as a great alternative to languages such as C++ in the field of game development.

Translating Quake 3 into Rust 

Rusty Q3 main menu

Immunant published an article "Translating Quake 3 into Rust":

The Rust-loving team at Immunant has been hard at work on C2Rust, a migration framework that takes the drudgery out of migrating to Rust. Our goal is to make safety improvements to the translated Rust automatically where we can, and help the programmer do the same where we cannot. First, however, we have to build a rock-solid translator that gets people up and running in Rust. Testing on small CLI programs gets old eventually, so we decided to try translating Quake 3 into Rust. After a couple of days, we were likely the first people to ever play Quake3 in Rust!

Check out a video of transpiling Q3, loading the game and playing it.

Discussions: /r/rust, /r/programming, Hacker News

Rust Code in Unreal Engine 

A short blog post by @ejmahler about getting Rust code integrated into Unreal Engine.

I’ve written a full writeup here, which includes a full demo project and all the necessary engine changes. You’ll need to be logged into GitHub with an account that has access to the Unreal Engine source code. If not, the link will look like a 404 – but it’s easy to request access.

As a quick summary of features I’ve found to work:

  • Compiling a Rust crate as an Unreal Engine Module
  • C++ Unreal modules linking to our Rust crate
  • Automatic rebuilding C++ and binaries that depend on Rust code when that Rust code changes

Discussions: /r/rust

Writing a 4K Intro in Rust 

Rust OpenGL in 2 Kbytes

Jani Peltonen has published an article "Writing a 4K intro in Rust":

For now I have a simple intro that initializes a modern OpenGL context in Win32 and puts up a relatively simple shader. The compressed size is <2Kbytes which, I think, validates Rust as viable language for writing 4K intros.

The source code is available here.

Discussions: /r/rust

3D Graphics in Your Browser with Rust and WASM 

Slide with table of content

Doug Milford released three tutorial videos:

The source code can be found here.

discord_game_sdk 

discord_game_sdk in an unofficial safe interface to the Discord Game SDK.

The Discord Game SDK provides features such as, but not limited to:

  • Activities (Rich Presence)
  • Users, Avatars and Relationships
  • Lobbies, Matchmaking and Voice communication
  • Faux-P2P Networking on Discord's Infrastructure
  • Cloud Synchronized Storage
  • Store Transactions
  • Achievements

Optimath 

Optimath by @djugei is an experimental const generics based linear algebra library that works without any allocations in no_std and utilizes SIMD. Requires nightly toolchain.

Project goals:

Besides being hopefully useful as a library it is also an exploration of rusts newer advanced type system features. It is therefore an explicit goal to provide feedback to the developers of those features. The insights module contains some of that.

It is also meant to explore the design space of Linear Algebra libraries that utilize those features. As such it may serve as inspiration for how bigger linalg libraries might adopt them.

Check out a detailed v0.3 announcement post.

Discussion: /r/rust

keyframe - Animation Library for Rust 

keyframe is a simple library for animation.

Features:

  • Several easing functions, including user-defined Bézier curves and keyframable curves;
  • Animation sequences;
  • mint integration for 2D/3D/4D support (points, rectangles, colors, etc)

Animation sequences example:

use keyframe::{keyframes, Keyframe, AnimationSequence};

fn example() {
    // (value, time) or (value, time, function)
    let mut sequence = keyframes![
         (0.5, 0.0), // <-- EaseInOut used from 0.0 to 0.3
         (1.5, 0.3, Linear), // <-- Linear used from 0.3 to 1.0
         (2.5, 1.0) // <-- Easing function here is never used, since we're at the end
    ];

    sequence.advance_by(0.65);

    assert_eq!(sequence.now(), 2.0);
    assert_eq!(sequence.duration(), 1.0);
}

rltk_rs v0.6 & Roguelike Tutorial 

Ranged attack demo

The Roguelike Tutorial continues to grow: chapter #70 "Missiles and Ranged Attacks" was added to the book. It adds targeting, ranged weaponry, AI that shoots back, and projectile particles to the mix.

Check out an online demo here.


rltk_rs by @blackfuture is a Rust implementation of C++ Roguelike Toolkit.

This month rltk_rs v0.6 was released. Some of the updates:

  • Breaking changes: usize for indexing, cargo features rename, TryInto in generic functions, and a few more;
  • "sticky" ctrl/alt/shift modifiers;
  • more auto-derived traits;
  • performance optimizations & bugfixes;
  • updated examples.

Implementing a Turn-Based Game in an ECS with SPECS-Task 

@bonsairobo published an article "Implementing a Turn-Based Game in an ECS with SPECS-Task":

I’ve heard from a few people who are just getting started with entity component systems (ECS) that implementing logic for a turn-based game seems more complicated than it should be. I thought that seemed odd, but I just recently ran into this problem myself. While certainly not insurmountable, implementing turn-based logic in an ECS just doesn’t feel great. I think the reason is that no one likes to implement a loop via distributed state machines.

flukejones/ecs_bench 

@flukejones forked an old Rust ECS benchmark set and updated it to show some of the more recent ECS around: tiny_ecs, hecs, and legion: flukejones/ecs_bench.

awesome-wgpu 

awesome-wgpu is a new curated list of wgpu-related links: learning resources, games, app, articles, etc.


Also, check out a new wgpu-rs-based ios app:

Mao Brush logo

Mao Brush realistically simulated the writing effect of Chinese brush + rice paper, the focus is on bringing the traditional Chinese calligraphy art to the digital age.

The WebGPU-based (wgpu-rs) brush engine uses the LBM fluid simulation to achieve the unique expression of the brush. You can use it to experience the splash of Chinese calligraphy anytime, anywhere, and create brush calligraphy works.

crow v0.1 

crow is a simple and efficient pixel based 2D graphics library. It's designed to be easy to use and should allow users to do nearly everything they want without requiring custom renderers or unsafe code.

luminance v0.38 

luminance by @phaazon is a type-safe, type-level and stateless graphics framework.

This month luminance v0.38 got released. Among the changes:

  • The Mode::Patch tessellation primitive.
  • The pipelines can now be customized in deeper ways (besides clear color, one can enable or disable clearing color buffer, depth buffer, sRGB framebuffers, dynamic viewport, etc.).
  • sRGB textures.
  • Framebuffers now accept a Sampler to control how their associated textures will be sampled.
  • A cool displacement mapping example.

A complete changes list can be found in the CHANGELOG.

Also, the luminance book got updated: check it out here.

Discussions: /r/rust


gameplay screenshot: block, space ship, dialog box

Btw, @resinten continues working on a luminance-based game:

  • extra parallax layers,
  • a basic UI with placeholder art,
  • dialog system,
  • updated player movement,
  • music.

Check out a WIP gameplay video here.

SPIR-Q v0.4.1 

Example walking an entry point of a SPIR-V file Example walking an entry point of a SPIR-V file

SPIR-Q is a lightweight SPIR-V query library. This month v0.2..v0.4.1 versions were released:

  • SPIR-Q is now more handy with better and easier reflection information accessors;
  • component number for shared-location interface variables;
  • separable sampler types;
  • descriptor access type query & multibinding for all descriptors;
  • new examples, bugfixes, and significant performance improvements.

glsl v4.0 

glsl is a crate to parse GLSL formatted sources into a typed AST.

glsl-4.0 and glsl-quasiquote got released this month. Some of the updates:

  • support for two backward-compatible keywords: attribute and varying (allows parsing GLSL450);
  • binary operands are now parsed as left-associative.

Discussions: /r/rust

Oxygengine 

Oxygengine logo

This month Oxygengine got JavaScript scripting interface to allow faster prototyping of games.

This prebuilt WASM version would let game devs with JS background to quickly prototype game ideas and then slowly move their logic into Rust implementation, while learning Rust meantime.

Example source code: oxygengine-js/js/index.js.

Also, you can now instantiate entities from prefab assets.

miniquad 

miniquad by @fedor_games is a safe cross-platform rendering library focused on portability and low-end platforms support.

Some of this month's updates:

MuOxi - Modern MUD Engine 

MuOxi cog logo

MuOxi is a modern library for creating online multiplayer text games (MU* family) using the powerful features offered by Rust; backed by Tokio and Diesel.

Current Status:

There is a working TCP server that allows for multiple connections and handles them accordingly. Effort is focused at the moment in designing the database architecture utilizing Diesel with PostgreSQL backend.

Discussions: /r/rust

This Month in Mun - January 2020 

Mun logo

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

January updates include:

  • vscode plugin;
  • use extern functions in dispatch table;
  • add marshalling of structs;
  • add struct as marshallable field type;
  • bugfixes and improved test coverage.

nestur NES Emulator 

NES games

nestur is yet another NES emulator. It's mostly an educational project but it's usable.

  • SDL2 is the only dependency
  • no use of unsafe
  • NTSC timing
  • supports mappers 0-4 which cover ~85% of games

Discussions: /r/rust

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. :)

Module debug output

"A bot for Starcraft in Rust, C or any other language" is an article by Roman @humbug Proskuryakov about writing a dynamic library for Windows that could be loaded into StarCraft's address space to manage units.

Discussions: /r/rust, Hacker News


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.