+++ title = "This Month in Rust GameDev #20 - March 2021" date = 2021-04-06 transparent = true draft = true +++
Welcome to the 20th 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!
- Game Updates
- Learning Material Updates
- Engine Updates
- Library & Tooling Updates
- Popular Workgroup Issues in Github
- Meeting Minutes
- Requests for Contribution
- Jobs
- Bonus
SM64JS (GitHub, Discord) is a rewrite of the decompilation project of Super Mario 64 in JavaScript with a strong focus on massive multiplayer online. The backend recently has been rewritten in Rust by @marior and is now live.
You can find more information about it in this recent blog post, where the developers of a similar mod called Net64 are talking about several decompilation projects.
Some of the most recent additions are:
- Carts and gliders
- Health bars
- More visuals with butterflies and fishes
A stress test is scheduled for 2021-04-17 17:30 UTC and everyone is invited to join.
pGLOWrpg by @Roal_Yr is a Procedurally Generated Living Open World RPG, a long-term project in development, which aims to be a narrative text-based game with maximum portability and accessibility.
Recent updates include:
- Reformatting a print interface, making it very easy to link text UI and code.
- Switching to .ron file format for storing configs and strings.
- Implementing individual strings coloring for better visual perception.
Discussions: Twitter
Orbital Decay by @stevebob is an open-source turn-based tactical roguelike with a focus on ranged combat. Deal enough damage to enemies to get through their armour without breaching the hull of the station, or risk being pulled into the void. It was made for the 7 Day Roguelike 2021 game jam.
Traverse a procedurally-generated space station to reach the fuel bay on the 5th floor. Choose your weapons and upgrades wisely to make it past the station's former crew - now a horde of ravenous undead.
Read more about Orbital Decay on its development blog.
Stellary 2 by @CoffeJunkStudio is a 3D real-time space shooter in which the player has to control his spaceship to colonize each planet in the solar system.
In the last month, the game concept has been overhauled. Most importantly:
- Planets become inhabitable over time, starting with the outermost one in order to bring head-to-head matches to an end eventually.
- Full focus on multiplayer, including AIs
- Players can’t die mid-game anymore. When defeated, they re-spawn and lose a colony for it (if they have one) instead of dying. This prevents long waiting times when playing against friends.
You can follow the development of Stellary 2 on Twitter.
A/B Street by @dabreegster is a traffic simulation game exploring how small changes to roads affect cyclists, transit users, pedestrians, and drivers, with support for any city with OpenStreetMap coverage.
In March, elevation data courtesy of Eldan was imported, letting cycling speeds uphill be adjusted. Importing any area from OpenStreetMap can now be done from the UI with no command-line experience, and custom travel demand models based on UK-wide census data can now be generated. Some important simulation fixes for roundabouts improve gridlock, and Michael and Yuwen helped adjust the UI panel layout for smaller screens.
Egregoria (GitHub, Discord) by @Uriopass is a simulation oriented city builder that tries to replicate modern society as well as possible.
The 8th devlog was published. Updates include:
- Multiplayer based on deterministic lockstep
- Economy revamp inspired by Anno 1800
- Infinite world using procedural generation
- Many more QoL features
See also the YouTube summary video of the past 6 months of development.
Gargoyle's Quest by @ShamylZakariya is an implementation of level one of the 1990 Gameboy platformer built using wgpu.
Theta Wave is an open-source space shooter game by developers @micah_tigley and @carlosupina. It is one of the showcase games for the Amethyst Engine. In the past month, the "Foundations" update was released which included numerous refactors that improved the accessibility of contributing to the game.
They are now working on the "Formations" update which will organize how waves of enemies are spawned into the game.
Notable changes:
- Formations can be defined in a data file
- New
InvasionFormation
phase where formations of enemies are spawned from a pool of formations
Harvest Hero by @bombfuse is an arcade/roguelite where you whack Groobles.
Harvest Hero has undergone a large change, migrating from semi-randomly generated levels to handcrafted levels that are randomly selected throughout your playthrough.
This means using Ogmo to design levels, and using nano-ogmo to import them.
Built on top of Emerald.
Updates:
- General UI update
- Importing ogmo levels via nano-ogmo
- April Fools demo
Tetra is a simple 2D game framework, inspired by XNA, Love2D, and Raylib. This month, versions 0.6.1 and 0.6.2 were released, featuring:
- Support for blend modes and premultiplied alpha
- Scissor rectangles (useful for UI rendering)
- Word wrapping for text
- More events and methods for tracking/controlling the window's state
- Bugfixes and docs improvements
For more details, see the changelog.
Additionally, a template repository has been created, demonstrating some useful patterns for structuring a Tetra project.
Starframe by @moletrooper is a work-in-progress game engine for physics-y sidescrolling 2D games.
This month, its physics engine was revamped once more (for the last time, hopefully), implementing a modern solver method called Extended Position-Based Dynamics. Also, a blog post was published, covering the development of the physics engine so far in a great deal of mathematical detail.
Discussions: twitter (physics update), twitter (blog post)
Emerald by @bombfuse is a 2D game engine focused on being as portable as possible.
The ultimate goal of Emerald is to be a fully featured engine that you can slap onto any device with relative ease. It's currently able to run on WASM, Raspberry Pi, Mac, Windows, and Linux thanks to miniquad.
Features:
New Updates:
- Rendering to textures
- WASM game sample
A blog post describing the process of reverse-engineering the rendering and input-handling logic in the NES version of Tetris, and using a rust embedded domain-specific language to make a patching tool that generates code (6502 machine code) to add hard drop (instantly dropping the current piece) and to render a ghost piece (the dotted outline showing where the current piece will land).
The patching tool uses the crate mos6502_assembler to specify 6502 assembly in rust and generate machine code. Many of the reverse-engineering experiments were done using this rust NES emulator. The result is available as an IPS Patch.
Discussions: Hacker News, /r/rust
Bevy game template by @nikl_me is a template repository for a Bevy game.
The goal is to present a possible structure for Bevy games and at the same time reduce the amount of copy paste when starting a new project. The repository includes a GitHub workflow for Linux, MacOS, and Windows builds (WASM will be supported soon) and comes with a small, opinionated example game.
kira by @tesselode is a game audio library tailored to composers and other people who need expressive audio.
v0.5.0 was released with mixer send tracks, new effects, and playback position tracking for instances, as well as a variety of smaller improvements.
Planck ECS (GitHub, Blog, Patreon) by @jojolepro is a brand new minimalist and safe ECS library.
The 1.0 release happened in the past month, featuring: various fixes, quality of life improvements, removal of unsafe code and completion of tests and documentation.
The library is currently considered completed, which means that all planned features are implemented, tested and benchmarked. Future updates will focus on performance improvements and usability improvements.
Planck ECS is also used in Shotcaller which is featured in this newsletter too.
You can read more about the library on the Blog and on GitHub.
Discussions: /r/rust, Discord: jojolepro#8057
Voxel Bunny rendering with conservative rasterization
wgpu is a WebGPU implementation in Rust. It is safe, efficient, and portable: can target both native (Vulkan/D3D/Metal) and the Web.
Most progress in April was focused around WGSL shaders and validation. naga has seen a lot of improvements in the SPIR-V and WGSL parsing, as well as backend code generation. Most importantly, it now fully validates both statements and expressions. No more accidental foot shots from adding vec2 and vec3 in the shaders!
The last and the biggest (in terms of shader complexity) example - "water" has been successfully ported to WGSL 🎉.
A small addition to our native-only features - conservative rasterization feature - was added by @wumpf and demonstrated on a voxel bunny 🐇
Finally, there is a blog post on Mozilla graphics team blog about the progress using wgpu in Gecko.
Discussions: /r/rust_gamedev
Rafx rendering an example tilemap from LDTK level editor
Rafx is a multi-backend renderer that optionally integrates with the
distill asset pipeline. This month, we introduced a fourth
layer to the library, rafx-renderer
. It provides a plugin system, simplifying
framework setup in a project.
The demo now includes a tilemap renderer that integrates with the LDTK level
editor. The distill
integration processes the level files offline
for very efficient loading/rendering at runtime.
Sprite rendering in general is also much faster now. Scenes with 40k-100k sprites can render at 60fps (measured on M1 mini) depending on transparency/distinct Z values in the scene. New examples demonstrate tilemap and sprite rendering.
Early work was also done to reuse descriptor sets across frames and reduce dynamic memory allocation when working with descriptor sets. Rafx also includes more options for HDR tonemapping.
rkyv is a zero-copy deserialization framework for Rust. It's similar to FlatBuffers and Cap'n Proto and can be used for data storage and messaging.
A benchmark was put together to compare rkyv against other leading serialization solutions and gather feedback and use cases for development. A summary and analysis of the results is also available.
Version 0.5 is hot off the presses and rolls up features from the 0.4 development cycle:
- Derive macros can now implement
PartialEq
andPartialOrd
between archived and unarchived types - Custom type bounds for serialization and deserialization can be added with derive attributes
- Helper types like AlignedVec and Infallible were introduced to improve ergonomics
const_generics
are now enabled by default- Helper functions have been added to make getting root objects easier
- Several bugfixes and performance improvements
A feedback issue is still open for providing feedback on further development.
WhatTheFrame by @JMS55 is a frame-based cpu profiler crate along with a GTK (gtk4-rs) based GUI.
This project aims to answer the question: Which frames of my game are slow, and why?
It aims to be simple to use, consisting of only 3 functions: Call let _r = Profiler::new_frame()
at the start of each frame, let _r = Profiler::new_task("task_name")
whenever you
want to profile a task, and finally Profiler::end_profiling()
once at the end.
You can then open the resulting .wtf
profile in the GUI and analyze the results.
This month was spent designing and implementing both the GUI and profiler crate. The core functionality of both programs are complete, and all that remains is cleanup, tweaks, optimization, and finally packaging the GUI up.
FemtoVG is a 2D canvas like vector graphics library based on nanovg that has been previously featured in this newsletter.
This month, the FemtoVG team has implemented a new rendering backend based on
the wgpu
framework. This work is being done in this fork of
FemtoVG and will be merged into the main repo soon. The team is currently
looking for users to try out the new backend and provide feedback.
Join the FemtoVG Discord channel.
See all meeting issues including full text notes or join the next meeting.
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!