Welcome to the twelfth 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:

Game Updates 

ochre - 4K Intro 

Youtube preview: mountains & spheres
Click to watch the demo on Youtube.

Jani Peltonen has recently released a 4K intro which is completely written in Rust and GLSL and published an article “Writing a winning 4K intro in Rust”:

A 4K intro is a demo where the entire program (including any data) has to be 4096 bytes or less so it is important that the code is as space efficient as possible. Rust has a bit of a reputation for creating bloated executables so I wanted to find out if is possible to create very space efficient code with it.

Discussions: /r/rust, hacker news

Robo Instructus: 1 Year Later 

game logo + OS logos

One year ago Alex Butler released the “Robo Instructus” puzzle game on Steam & itch.io.

This month Alex released a devlog post “Robo Instructus: 1 Year Later” about how well the game did after the release: sales by platform/country/OS, player feedback & reviews, etc.

People mostly don’t publish sales figures, I guess it makes more business sense to be vague. But maybe these will be helpful or interesting in some way.

Also, Alex continues to maintain and polish the game: 1.29 version brings auto-scrolling improvements, better lang parsing, bugfixes, and dependency updates.

Discussions: /r/rust

Crate Before Attack 

Golf Club in Crate Before Attack
A new weapon: the Golf Club

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 July changes:

  • Gameplay: added a new melee weapon: the Golf Club.
  • Maps: added new map Ruins by Kesha Astafyev
  • Animation: added eye tracking, frogs will track the closest danger with their eyes such as a projectile or a pet.
  • Lobby: it is now possible to observe a match after it was started, added chat, user list with country flags, match details, and map previews.
  • Localization: the game comes in three languages now: English, Spanish, Russian.
  • Numerous bugfixes and tweaks.

Here is a Playable Browser build. More details are on the YouTube channel and in July Update DevLog-entry.

Wonder 

Lines drawn with a ball ready to roll down them

Wonder (source code) is a casual physics puzzle game by @kettlecorn made for the web with WebAssembly, browser APIs, and no game framework. The objective is to collect all the stars on each level by drawing lines for the ball to roll along.

The game was made in 48 hours for the Ludum Dare game jam that occurred in April. @kettlecorn recently published an article going into the technical and creative challenges encountered making the game: “Making a Game in 48 hours with Rust and WebAssembly”.

Wonder can be played in the browser on itch.io.

Vlad Zhukov’s Online RTS Prototype 

gameplay demo

Vlad Zhukov shared a video of a WIP multiplayer online strategy game where you fight with other players for territory. Currently, there are two types of resources and 5 types of buildings. To build on the tile you need to occupy it with your warriors first. The player who occupied all enemies’ tiles win.

The game is written with miniquad and a custom GUI library. Some parts of the game are promised to be open-sourced in the future. Read more about crates used in this project here.

Discussions: twitter, /r/rust_gamedev

A/B Street 

screenshot

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

This month versions v0.2.2..v0.2.5 were released. Some of the updates:

  • A new random traffic scenario generator that makes people go between houses and workplaces.
  • New commute pattern explorer tool.
  • New character art to give cutscenes a bit more personality.
  • Lots of pathfinding and user interface improvements.
  • Bugfixes and improved performance (especially startup time on large maps).

Tennis Academy Dash 

gameplay

@oliviff released Tennis Academy Dash v0.2:

This release features:

  • a layering/scene management system
  • transitioning between UI scenes and game scenes
  • improving the level loading to work with string config files
  • adding a 5th level

protochess 

demo

protochess (source) is an online multiplayer chess website that lets you build custom pieces/boards.

Want a piece that can move like a knight + queen? Sure. Want to play on a 16x16 sized board? Impractical but you can do it!

The frontend is written in Svelte with routing from Routify and styling with the Bulma CSS framework. All the chess logic is written in Rust, and compiled to WebAssembly to run singleplayer. The multiplayer websocket server uses Warp and is modeled after this project.

Discussions: /r/rust

Nox Futura (Rust Edition) 

SSAO demo

Herbert Wolverson (the author of bracket-lib and the Rust Roguelike Tutorial) continues porting their old “Nox Futura” project to Rust. The game uses wgpu, Legion, and Dear ImGui.

Some of this month’s updates:

  • The project’s repo is now public;
  • Voxel-friendly SSAO;
  • The render pipeline is now about 75% done;
  • Jobs board, buildings creation, and lumberjacking;
  • 3D cursor and mouse picking;
  • Voxelized Vegetation and growing trees;
  • Improved A* pathfinding and performance in general.

Check out Sharing Saturday devlogs for more detailed reports: #1, #2, #3, #4.

🏕 Textcamp! 

gameplay

@peat released a simple multiplayer demo of Textcamp, a text-based adventure game.

The goal of Textcamp is to build a modern MUD platform that can be played by anyone, anywhere. It’s very early in development, so please say hello if you’re interested in contributing code or stories!

This demo features:

  • Basic scene, mob, and item templating, with spawning and combat.
  • Multiplayer authentication and support for hundreds of players.

Canon Collision 

Basic Projectiles

Canon Collision by @rukai is an Undertale + Homestuck fan-made platform fighter with powerful tools for modding.

This month, he started work on the project again after taking a break. Notable changes:

pGLOWrpg 

Improved river pathfinding, paths respect topography

The @pGLOWrpg (Procedurally Generated Living Open World RPG) is a long-term project in development by @Roal_Yr, which aims to be a text-based game with maximum portability and accessibility and focus on interactions and emergent narrative.

For the past month(s) the main focus of the development was on the river generation system in the worldgen. Main features of the river generator are:

  • High robustness with most edge cases covered;
  • Single-pass with subsequent iterations generation, with numerous options to tweak the process for either precision of the pattern or speed of generation;
  • Rivers are sorted upon intersections, their widths are adjusted, waterfalls are formed when necessary;
  • Inflow and outflow directions are recorded for each cell, which allows following the river upstream or downstream;
  • Simple yet effective erosion model implemented, which ensures no upwards flows are allowed;
  • Each stream has its unique ID, which will later be linked to the stream data;
  • Streams have 12 orders of magnitude from smallest brooks to major rivers;
  • All the options are available to user under “General”, “Advanced” and “Very advanced” sections for any level of fine-tuning.

Further development will involve re-factoring of the code and making it ready to be published prior to implementing new features. For small dev reports follow @pGLOWrpg on Twitter.

Sandbox 

Sandbox screenshot

Sandbox is a falling sand game by JMS55 that provides a variety of fun particle types to place, and then you get to watch the resulting interactions!

As they didn’t make it in time for last month’s newsletter, this month’s edition covers the work they did in June and July:

  • Released version 1.0 and 1.1, created a flatpak package and associated metadata, and published it to Flathub.
  • Several new particles such as Fire, Mirror, Glitch, and some hidden ones, and tweaked or overhalled almost every other particle!
  • A fancy new glow post process effect for Acid/Fire/Electricity, created using wgpu-rs compute shaders.
    • As a precursor to this, they made a PR to the pixels crate that removes the old RenderPass approach in favor of giving the user direct access to wgpu.
  • Made a slick new icon and background for the game.
  • Added a video recording feature using gstreamer-rs and x264enc, and then later removed it (for now).
    • Moving from recording the raw texture generated for pixels to the post-processed texture from wgpu involved a major overhaul, and it proved too glitchy and slow. Hopefully, it will be revived later, in the form of recording user inputs.
  • Many structural improvements, such as less glitchy particle placement with Bresenham’s line algorithm, better error handling, and ensuring particles are only ever stored on the heap.
  • Performance improvements, including generating noise in a separate thread.
  • Currently WIP: UI using imgui.

Sandbox icon

Got any ideas? Leave an issue on github, or add it yourself!

Pushin’ Boxes 

Pushin’ Boxes gameplay

Pushin’ Boxes (itch) is a Sokoban clone made with ggez by @septum. It features 16 levels of puzzling box-pushin’ action where the player controls a little robot (named プシン). Check out a blog post about the game’s release.

The source code is available on GitLab.

Don’t Stop 

gameplay sample

Don’t Stop by @superahtoms is a rhythm game written using Rust and SDL2 for the GMTK 2020 jam.

Ever just wanted to keep dancing but the fuzz wants you to stop? Well now you can! Just keep on dancing, don’t let the bouncers grab you while you’re doing it or your fun stops! Keep being the life of the party because you are Party Pat!

Be like wind, be fast, dance and don’t get caught!

Discussions: /r/rust_gamedev

shotcaller 

shotcaller is a WIP quick (~7mins) ASCII-rendered RTS/MOBA game.

In the way “MOBA” games such as DOTA2 or LoL are usually played, the captain of the team is the default shotcaller.

The shotcaller needs to be unbiased and not have tunnel vision. You need to be able to think in the future and tell what would happen if you did this or that. This becomes crucial when deciding to base-race or teleport back to defend. ~reddit-user

Everyone on the team can play the part of Shotcaller on occasion. The act of shotcalling is not typically the most prevalent activity of any player, even for a captain — after all, they also need to play their hero.

But in this game, all you do is shotcalling and big-picture strategizing. The game plays as if you were controlling the 6th-person-in-the-booth “coach” player, and your team (of AI-played bots) actually follows your instructions to the letter, within their designed constraints.

The game is in an early stage of development, check out the design document for details and plans.

On FPS Game Progress #2 

fps-game-screenshot
Click to watch footage from the game’s current state.

On this update, @pingFromHeaven talks about the lighting implementation that sets the tone for the game, how Rust is good at shortening the debugging times, which is especially valuable when working directly with OpenGL and why he doesn’t describe what the game is about.

The next update is going to be about establishing the mood further, which includes a more elaborate environment with more details, basic SFX and particles.

Zemeroth 

new agent info panel

Zemeroth by @ozkriff is a minimalistic 2D turn-based tactical game.

Some of the recent updates:

Veloren 

Sunrise
Sunrise

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

In July, Veloren reached its 1000th merge! Lots of work has been done towards the 0.7 release. The release date has been pushed from the beginning of August to mid-August. A loot table system was added to item drops. Lots of work has been done on animations and quadrupeds. Networking has switched to a new system. Significant improvements have been made to pathfinding system to improve fast quadruped movement. Particle systems are being implemented and optimized. A crafting GUI has been added. Translations have stabilized significantly, and there is a framework for translators to know what needs to be done.

Fire particles
Progress on the particle system

You can read more about some specific topics from July:

July’s full weekly devlogs: “This Week In Veloren…”: #75, #76, #77, #78.

In August, 0.7 will be released. Work will continue on castle and cave generation. The inaugural episode of the Rust Game Dev podcast will be released, which features an interview by Veloren developers.

Quadrupeds
Quadruped overhaul

Learning Material Updates 

Rust on iOS with SDL2 

Rust on iOS with SDL2 demo

@aclysma published a tutorial that describes setting up Rust/SDL2 on iOS. The resulting app can run in the simulator as well as on physical devices. SDL2 is a mature library providing basic rendering, audio, and input support. It can also be used to set up an opengl or vulkan surface. This demo is using Rust-SDL2 for bindings.

Rust Sokoban Tutorial 

sokoban update

The Rust Sokoban tutorial is an online book aimed at Rust gamedev beginners which walks through making a simple Sokoban game using ggez and ECS (with specs). It tries to teach the basics of architecting in ECS and basic Rust concepts through a hands-on approach.

This month:

  • the book was officially released on July 10th;
  • the project received 3 external contributions;
  • a few text edits were done, including fixing an issue with code snippets not appearing correctly;
  • work on translations has started (🇨🇳 translation coming soon 🤞).

You can follow the release discussion on Twitter, provide feedback on github and read the book at sokoban.iolivia.me.

Make Pong with Rust 

youtube preview
Click to [watch the tutorial][tantan-video].

TanTan released a video tutorial that guides you through all the step of making a pong game in Rust using the GGEZ framework.

The source code can be found here.

An Introduction to Data-Oriented Design in Rust 

vector vs linked list perf

Data-Oriented Design is an approach to program optimization focused on considering the features and limitations of the target hardware, and carefully controlling the memory layout of data to take advantage of those.

In this article, jamesmcm provides benchmarks and code for four example scenarios:

The full article is available here.

“Rust’N’Games” Talk 

youtube preview: a slide with Tower Rangers game
Click to watch the talk.

During the recent “Rust and Tell” online event Stephan @extrawurst Dilly gave a “Rust’N’Games” talk about their experience of using Rust in games at Gameroasters.

Library & Tooling Updates 

A Servo Browser Plugin for Unity 

Functional scheme

Servo for Unity is a Unity native plugin and a set of Unity C# script components allow third parties to incorporate Servo browser windows into Unity scenes.

A blog post about the project gives a good overview of the project goals, capabilities, architecture, challenges, and future development plans.

big-brain 

big-brain by Kat Marchán is a utility AI library for games, built on the specs ECS.

It lets you define complex, intricate AI behaviors for your entities based on their perception of the world. Definitions are almost entirely data-driven, using plain .ron files, and you only need to program considerations (entities that look at your game world), and actions (entities that perform actual behaviors upon the world). No other code is needed for actual AI behavior.

weasel v0.8 

weasel by @Trisfald is a customizable battle system for turn-based games.

This month v0.8 was released. Highlights include:

  • New event types
  • Inanimate objects
  • Status effects
  • Many new examples

naia 

naia (networking architecture for interactive applications) is a cross-platform (currently WebAssembly & Linux) networking engine that intends to make multiplayer game development in Rust dead simple and lightning fast.

At the highest level, you register Event and Entity implementations in a module shared by Client & Server. Then, naia will facilitate sending/receiving those Events between Client & Server, and also keep a pool of tracked Entities synced with each Client for whom they are “in-scope”. Entities are “scoped” to Clients with whom they share the same Room, as well as being sufficiently customizable to, for example, only keep Entities persisted & synced while within a Client’s viewport or according to some other criteria.

Discussions: /r/rust

voronator 

Voronoi diagram example

voronator by Felipe Santos is … a Rust port of the d3-delaunay and delaunator libraries that provide delaunay triangulation and Voronoi diagram generation.

Discussions: /r/rust

This Month in Mun 

Mun logo

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

Rustacean Station released a podcast about Mun in which the Mun Core Team sat down with host Jeremy to talk about why they chose Rust to develop Mun. If you are interested in having an inside look into Mun’s origins and evolution, we recommend you check it out - or any of Rustacean Station’s other podcasts for that matter!

Their additional July updates include:

  • initial support for the Language Server Protocol;
  • a community entry for the Make It or Break It content of Spaceship recreated with Mun & Rust;
  • CLI support for creating Mun projects;
  • performance benchmarks and improvements;
  • bugfixes and improved documentation.

ash(-window) 

ash-window, an interoperability library for ash and raw-window-handle, is now part of the ash repository and will be updated more closely with new ash releases.

grr 0.8 

grr is a modern OpenGL 4.5+ wrapper. It provides a cleaned up API built around Vulkan’s naming scheme. The latest release further pushes the crate towards full compatibility with the core features.

Most notable changes:

  • Added support for a bunch of Formats
  • Extended transfer operations (Attachment <-> Host <-> Buffer <-> Image)
  • Raw context access
  • Shader & Pipeline log control
  • Device submission control

Special thanks to @masonium for contributing a lot of these features and fixes!

miniquad 

miniquad ios

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

This month opengl backend of miniquad was successfully ported to iOS. With this update macroquad, good-web-game and all the games build directly with miniquad can be run on IOS, Android, WASM, Linux, macOS and Windows!

wgpu 

procgen dynamic "grass field"
@MacTuitui’s everyday nannou experiment #1274

The work is ongoing to validate all the incoming commands and guarantee API safety. Special thanks to @GabrielMajeri for helping to convert assertions into errors at wgpu level. The wgpu devs are also introspecting shader requirements and matching them against the pipelines, but this will take more effort before it will become universally available.

@cwfitzgerald has been busy adding a few handy native-only extensions, such as descriptor indexing and push constants. They have also converted the project’s logging to tracing, setting up the infrastructure for CPU profiling.

In the past 2 months, the API for descriptor structures in wgpu-rs have been undergoing a turbulent period. First, non-exhaustive semantics led to introduction of constructors. Then, efforts to reduce code duplication inside wgpu project has led to the bovine invasion on wgpu-rs API side. The devs are figuring out the plan to address that with a builder pattern now, which will address both the Cows and non-exhaustives, hopefully putting an end to the turbulence.

In the meantime, wgpu-rs ecosystem is flourishing with applications and libraries. The showcase gallery was updated with a few shiny images.


Finally, @kunalmohan has been busy implementing WebGPU in Servo, based on wgpu. Thanks to this work, Servo is currently ahead of Gecko in terms of API being up-to-date and covered 🎉. It’s already capable of rendering most of the examples, and the devs are looking forward to the day when the same Rust code (rendering with wgpu-rs) will be deployable to the Web, and viewable from Firefox, Servo, Chrome, and other browsers.

luminance v0.40 

logo

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

This month luminance v0.40 got released. Some of the highlights:

  • The complete backend/architecture redesign.
  • A new platform crate has appeared: luminance-sdl2, which adds support for the sdl2 crate.
  • luminance-webgl and luminance-web-sys, to support the Web!
  • A luminance-examples-web crate is available to test with yarn easily.
  • luminance-front, which is a front crate to ease working with luminance types.
  • The type system experience has been greatly improved. Most of the time, you will not have to annotate types anymore — like Program or Tess.
  • About Tess, a BIG update has landed, has it’s now heavily typed (vertex type, index type, vertex instance data type, memory interleaving type).
  • More render states features, such as the possibility to enable or disable depth writes, separate RGB/alpha blending, etc. etc.
  • Also, the luminance book got updated.

A complete changes list and a migration guide can be found in the CHANGELOG.

luminance-0.41 got released a few days after to fix some type design problems with the gates, and to enhance the error flow in graphics pipelines, revisited to be more flexible and seamless.

Also, check out the “The compile-time deinterleaving interface” blog post that delves deep into this new feature.

Discussions: /r/rust

Graphene - Vulkan Render Graph 

execution flow example

Graphene is a Vulkan render graph. Still heavily a work in progress, it is built to be a simpler abstraction over Vulkan, with long-term ambitions to serve as a graphics test-bench.

Currently, it implements a mesh render pass followed by a chromatic aberration post-process in less than 250 lines of Rust code. Current features include easy Vulkan initialization, automatic swapchain resizing, glTF mesh loading, and shader hot-reloading. Check out a “Render graphs” blog post for a more in-depth introduction to the project.

chromatic aberration demo

You can follow progress on GitHub or on Twitter.

Vulkan Renderer (Name TBD) 

Vulkan renderer on iOS prototype
Click to watch [the video demo][vulkan-renderer-prototype-video] running on iOS.

@aclysma published a new vulkan-based renderer that uses atelier-assets to load 3D scenes exported from blender.

The objective of this repo is to build a scalable, flexible, data driven renderer. Scalable in the sense of performance as well as suitability for use in large, real-world projects. This means streaming, LODs, visibility systems, and multi-threaded draw call submission need to be possible. Additionally it means thinking through how an asset pipeline would work for a team with dedicated artists and supporting workflow-friendly features like hot reloading assets, possibly on remote devices.

This video demonstrates the renderer running on iOS and receiving asset updates via wifi. The scene is “sponza” exported from blender. Vulkan is supported on windows and linux natively. Support for macOS and iOS is via the well-established MoltenVK project.

The demo was ported from PC to iOS over a single weekend and out of approximately 300 crate dependencies (including complex, OS-specific ones like tokio), all but a few worked out-of-the-box!

Ludusavi 

Demo of Ludusavi GUI

Ludusavi is a tool written in Rust by @mtkennerly for backing up PC game save data. It has backup info for more than 7,000 games, is cross-platform for Windows, Linux, and Mac, and has a GUI as well as a command line interface. The GUI was created using the Iced crate.

The backup info is sourced from PCGamingWiki so that everyone can help to expand the data, and it’s stored in a documented format so that other backup tools can share the same data set. A plugin for Playnite was also just released.

Langcraft 

Langcraft is the Minecraft LLVM target you’ve never wanted.

Langcraft started as a dare to the #lang-dev channel of the Rust Community Discord to be able to parse Rust code in Minecraft. Naturally, it grew into a full code generator that can translate most LLVM IR to Minecraft data packs, the game’s deliberately-limited in-game scripting language. Langcraft is entirely language independent, so any language with an LLVM-based compiler can (with the right API bindings) run in Minecraft. Currently, bindings to both C and Rust exist. While not as visually impressive as a redstone computer, Langcraft does stretch the bounds of the game quite a bit, using jukeboxes for memory, armor stands to represent pointers, and rearranging compiled code to make it run in the bounds of the data packs’ fixed instruction limit.

This is all, naturally, entirely useless. The project is also still heavily work-in-progress and does not pretend to be stable, but it is usable. A handwritten interpreter for a Rust-like language has already been demonstrated running, and even more complex projects like CHIP-8 emulators function (albeit at extremely slow speed).

You can watch a video of Rust interpreter running Fizzbuzz:

youtube preview

Meeting Minutes 

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

Requests for Contribution 

Jobs 

  • Embark is looking to hire Open Source Engineer specifically to work on Rust projects (Remote or Stockholm, Sweden):

    At Embark, we love the openness and collaborative nature of the quickly growing ecosystem and community around Rust, including its tens of thousands of open source crates. We’re committed to supporting a thriving open source ecosystem for game development in Rust.

    As an Open Source Engineer at Embark, you will work with our community and engineering teams on open source. You’ll help maintain and develop our open source presence, and be a key link between Embark and the greater software ecosystem.

    You can find all of the details on their job offer page.


    Btw, Embark are also looking for Software Engineer interns.

    Embark’s logo

Bonus 

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

youtube preview
Click to watch [SHAR’s Greenlight trailer][shar-trailer]

SHAR (Russian “Шар” - ball) by @fedor_games (author of miniquad/macroquad) is a 3rd-person online action game that aims to create unique experience combining destructible world and team-based ball game.

SHAR is an action combination of tactical and sports game in the destructible world. The rules are extremely simple: two teams, one ball. The team that carries the ball into the opponent’s gates gets a score, the team with the most score at the end of the game is the winner. However, this is where things get interesting! Players have the variety of skills and tricks and destructible environment to fiddle around to slam the opponent and win the game.

Some of the game’s features:

  • A network-synchronized physics engine powered by bullet-rs;
  • A bunch of physics-based player skills;
  • Extensive build-in editors for game maps, skeletal animation, effects & particle systems;
  • Modding support.

The game was built on top of a homegrown game engine using: winit, glium, imgui-rs, tinyecs, awesomium-rs, ears.

A screenshot from the recording

During RustFest Zurich 2017, Fedor gave a self-descriptive talk “SHAR: Rust’s gamedev experience”. You can watch the recording here.

The game was in active development around 2016-2017. In 2017 the game passed Steam Greenlight. During 2018 the project was suspended.


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.