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
- Learning Material Updates
- Library & Tooling Updates
- Meeting Minutes
- Requests for Contribution
ochre - 4K Intro
Click to watch the demo on Youtube.
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.
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.
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.
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
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.
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).
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
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.
Nox Futura (Rust Edition)
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.
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.
This month, he started work on the project again after taking a break. Notable changes:
- basic projectiles,
- WIP grab implementation (with some humorous results),
- New animations + attacks,
- and custom shaders.
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 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.
Got any ideas? Leave an issue on github, or add it yourself!
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.
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!
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.
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.
Some of the recent updates:
- The game got a new development roadmap: "Final Push".
- UI updates: widget stretching and more informative "dots".
- A few actions got additional effects.
- The work on adding sounds has begun.
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.
Progress on the particle system
You can read more about some specific topics from July:
- Networking Milestone
- The Case of the Disappearing Entities
- GUID Insights
- Particle System
- Translation Help
- Particle Improvements
- CPU Workloads
- Refactoring WORLD_SIZE
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.
Learning Material Updates
@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.
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.
- 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 🤞).
Click to watch the tutorial.
The source code can be found here.
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.
- Array of Structs vs. Struct of Arrays
- Branching in a hot loop
- Iteration in a vector vs. a linked list
- Monomorphisation vs. Dynamic Dispatch
The full article is available here.
Click to watch the talk.
Library & Tooling Updates
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.
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.
This month v0.8 was released. Highlights include:
- New event types
- Inanimate objects
- Status effects
- Many new examples
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.
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.
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 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!
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
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
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
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
wgpu-rs) will be deployable to the Web,
and viewable from Firefox, Servo, Chrome, and other browsers.
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
- 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.
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.
Graphene - Vulkan Render Graph
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.
Vulkan Renderer (Name TBD)
Click to watch the video demo running on iOS.
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 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 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:
Requests for Contribution
- Embark's open issues (embark.rs).
- winit's "Good first issue" and “help wanted” issues.
- gfx-rs's "contributor-friendly" issues.
- wgpu's "help wanted" issues.
- luminance's "low hanging fruit" issues.
- ggez's "good first issue" issues.
- Veloren's "beginner" issues.
- Amethyst's "good first issue" issues.
- A/B Street's "good first issue" issues.
- Mun's "good first issue" issues.
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.
Just an interesting Rust gamedev link from the past. :)
Click to watch SHAR's Greenlight 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.
During RustFest Zurich 2017, Fedor gave a self-descriptive talk "SHAR: Rust's gamedev experience". You can watch the recording here.
That's all news for today, thanks for reading!