Welcome to the third 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!
Sulis - a Turn-Based RPG
Sulis is a Role Playing Game (RPG) with turn based, tactical combat, deep character customization and an engaging storyline. The game has been built from the ground up with modding and custom content in mind. Currently supported on Windows and Linux platforms.
The game is currently fully playable and includes the first act of The Twin Expanse, an old school RPG campaign in the vein of classic games such as Baldur's Gate, but mixing in modern elements from titles like Divinity: Original Sin and Pillars of Eternity.
The core game engine as well as the campaign are still under heavy development. Users are encouraged to file issues with bugs, feature requests, or any other feedback.
- Cross platform native binaries, currently built for Windows and Linux
- Multiple campaigns with over 8 hours of playtime, featuring both handcrafted and procedural content.
- A detailed and fully realized world and story - check out the Lore page.
- Designed with modding in mind - although more work still needs to be done in this area.
- A powerful 2D graphics engine with zoom, scalable UI, HiDPI support, and a swappable graphics backend.
- Runs on very modest hardware - even software renderers (although at a reduced frame rate).
The GPLv3-licensed source code is hosted on GitHub. Sulis is written in Rust, with scripting in Lua and most data files in the YAML format.
Veloren is an open-world, open-source multiplayer voxel RPG. The game is in an early stage of development, but is playable.
Some of October's improvements:
- lots of bugfixes and optimizations;
- improved erosion, rivers and water flow physics;
- user interface improvements;
- improved game lore;
- RFC procedure for 0.5 development.
Also, check out /r/veloren subreddit, it's pretty active.
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:
- #6 "Items And Inventory";
- #7 "Grubbnet";
- #8 "The Editor";
- #9 "The Editor, Pt. 2";
- #10 "Terrain Sync".
It's a lightweight TCP client/server for writing networked applications and games. It abstracts socket code, keeps track of connections, and delivers everything back to the developer in a nice list of events. In addition to handling network events (such as client connects and disconnects), handling incoming packets is as easy as grabbing an iterator over the incoming packet queue.
It's the same networking crate that the Antorum game server uses under the hood.
Ferris Fencing is a live tournament in which player-programmed bots combat each other on a RISC-V virtual machine. It is a showcase of CKB-VM, a simple implementation of the RISC-V instruction set, written in the Rust programming language.
The Ferris Fencing tournament is not yet live, but fencers may begin building their bots and testing them locally. Instructions are in the GitHub repo.
Tennis Academy v0.03 & v0.0.4
- 🏘️ improved reception area queueing
- 🎆 timed effects when players disappear
- ⛹️ click to collect coins from player
- 👟 4 courts on screen
- ⛹️ matching t-shirts for players
- 💯 money is now score
- 🚥 court + t-shirt colour matching logic
- 📊 score multipliers
piano-rs is a multiplayer piano using UDP sockets that can be played using computer keyboard, in the terminal.
Garden is an upcoming game centered around growing realistic plants.
The following changes were made since the last devlog:
- Improved flowers were added.
- The plant simulation code is almost finalized, and developers will be able to start adding new species soon.
- The procedural ruin generation was improved: no more floating concrete chunks.
Also, a new design plan was created:
- The main objective is to restore the luscious ecosystem in a polluted wasteland. The player will have to continuously figure out how to handle different environmental constraints to keep trees growing, collect enough fruit and figure out what to do with them, and unlock new goals and flora.
- But for players who are interested in wild, goalless plant growth, there’ll also be a sandbox mode. As one progresses in the main game and “unlocks” more trees, playing around with creating flourishing jungle troves will be possible.
To stay informed of smaller updates, screenshots, and new devlogs, follow @logicsoup on Twitter.
EVE Aether Wars Backend Optimization
To double the tick rate to 30Hz, our underlying @rustlang layer from last time needed...a two line bugfix and some metrics support. Nice proof point for reliable software in Rust!
Godot and Rust
"Rendering a 2D game in 3D" - Tom Leys is working on a “The Recall Singularity” Godot/Rust game about designing autonomous factory ships and stations and this month they published a post about evolution of the game's rendering.
@ardawanizadi shared a short text report and a video demo of their progress with a project of an OpenWorld game this month: character physics, weapon system, cameras, animations system, dynamic damage system.
"Pong Clone in Godot Using 'gdnative' Rust Bindings" - @you-win couldn't find any full game examples that used godot-rust so they made their own [source code].
Ludum Dare 45
Ludum Dare is a regular game jam event, during which developers create games from scratch in a weekend based on a theme suggested by the community.
LD45's theme was "Start with nothing". Here are some of the games made with Rust:
Experience a work in progress.
Play through the development process of a 2D platformer game, and watch your environment transform as you progress... The further you get, the more features are added, including menacing enemies, destructive spikes, and adaptive music.
A small and unhurried story about devious passages of the trapped human mind. Begin in the middle of oblivion as shadow and take a walk through every chamber of this place to find all shards of lost personality. Can you find the way out?!
With nothing, not even memories, you find yourself maneuvering some kind of craft in strange caves.
Check out the devlog post: "Tools and tech for my game written in Rust".
See the "Working Title" LD45 game above.
Read the announcement post: "Showcase game #4: Grumpy Visitors".
Current game features:
- Cooperative multiplayer;
- Spawning monsters with basic AI;
- Sprite animations and custom shaders (health HUD).
It's a mini role-playing/adventure game. The goal? Walk through the streets of Arrakis to find the fabled Wizard of Arrakis, that can teach you arcane powers you've only dreamt of!
@webshinra finished porting their hexagonal game to Amethyst and is now preparing to build gameplay.
Library & Tooling updates
In a 45k LOC / 102-crate workspace, moving tests from member crates into a single workspace_tests crate achieved the following improvements:
- Build and test duration in release mode reduced from 23 minutes to 13 minutes.
- Debug artifact disk usage reduced from 20 G to 7 G (65% reduction, fresh build), or 230 G to 50 G (78% reduction, ongoing development).
🛈 Tip: Speed Up Iteration Time By Using LLD Linker
Takeaways from an interesting tweet from VladZhukov0 and a /r/rust thread "Is the rust compiler really THAT slow?":
Try switching to LLD linker:
RUSTFLAGS="-C link-arg=-fuse-ld=lld" cargo run # Alternatively, you can set `rustflags` in your `.cargo/config`
Depending on your project structure, OS, and toolchain this can potentially speed up the incremental compilation a few times.
Also, try disabling debug information (if you don't need it):
# in your `Cargo.toml` [profile.dev] debug = 0
Now the linking only takes around one second, compared to 10 seconds previously.
Reduced my average compilation time from 10-20s (which is a bit crazyness for gamedev iteration) to 5-7s. Wonder why haven't I tried this before?🤔
Also, see this GameDev WG tracker/complaint issue: #50 "Linking Time".
RLSL: a Rust to SPIR-V Compiler
^ a simple fragment shader that renders a red circle (temporary syntax)
- Supports cargo;
- Multiple entry points can be defined in the same SPIR-V module;
- Currently supports Vertex, Fragment and Compute shaders;
- Shader code can run on the CPU because rlsl is a subset of Rust.
Also, check out older posts:
^ a screenshot from Yatekii/sailor - a wgpu-based sailing navigation application
That version adds support for stroke Bézier interpolation,
which is a Bézier interpolation but allows you to break the handles
(instead of the regular 180° angle formed
by the handle with the
spline-editor got a patch to allows you to try stroke Bézier.
Mun is a scripting language for gamedev focused on quick iteration times that is written in Rust.
The Mun Team started October with the launch of the mun-lang.org website, Discord server, and OpenCollective and processing the feedback from a larger audience. Now the team is moving towards v0.1 release.
Also, check out /r/rust "The Mun programming language is going live!" post.
<...> To do this, it uses an "SoA" (Structure of Arrays) architecture such that each Wec (wide-vec) actually contains the data for 4 Vecs and will do any operation on all 4 of the vector 'lanes' at the same time. Doing this is potentially much (factor of 10) faster than an "AoS" (Array of Structs) layout, as all current Rust linear algebra libraries do, depending on your work load. However, algorithms must be carefully architected to take full advantage of this, and doing so can be easier said than done, especially if your algorithm involves significant branching.
salva.rs - two new crates for fluid simulation: salva2d and salva3d!
Salva is a new project dedicated to fluid simulation. The goal of salva is to provide CPU-based, particle-based, 2D and 3D, fluid simulation libraries that can be used for interactive and offline application like animation. It could be used, to some extents, for video games (especially the 2D version), as long as the number of particles is kept small.
Watch a "Fluid simulation with salva 0.1 and nphysics 0.13" video or play with the online 2D or 3D WASM demos yourself.
nphysics 0.13 brings: some support of breakable joint constraints, and more improvements on the integration with ECS.
^ a little demo of "particle" simulation
It's based on Vulkano and consists of three repos:
- re-ll - low level abstractions for Vulkano's command buffers and windows.
- render-engine - Vulkan abstraction.
- test-render-engine - various little programs created with render-engine. "pretty" is the one shown in the video, "base" shows the basic functionality.
Some of the October's updates:
- traps and doors;
- mapgen algorithms including Waveform Collapse;
- prefab levels and sections;
- guided procgen for towns.
All chapters have links to WASM demos.
Also, 0.5 version of rltk-rs brings abstraction between back-ends, better compile time, web version improvements, and more examples.
Nannou is a creative coding framework that aims to make it easy for artists to express themselves with simple, fast, reliable code.
Nannou has been awarded 10K USD in funding as a part of the MOSS Mission Partners track. The proposed work is aimed towards improving the state of some foundational crates within the Rust audio ecosystem over the next three to four months.
Key areas of our work will include:
- Addressing some long-standing issues in CPAL.
- Review and improve CPAL's web audio support.
- Implement a simple web app and guide demonstrating CPAL's web audio support.
- Design, develop and document a standard audio graph abstraction and crate, reflecting on lessons learned and limitations of prior efforts, and the requirements of the wider rust audio community.
amethyst_physics v0.1.1 was released: now it's possible to fetch Rigid body contacts events.
@_AndreaCatania published two video tutorials:
Popular Workgroup Issues in Github
Requests for Contribution
- /r/rust: "Need help porting steam libraries to rust";
- 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;
Just an interesting Rust gamedev link from the past. :)
That's all news for today, thanks for reading!
Want something mentioned in the next newsletter? Send us a pull request. Feel free to send PRs about your own projects!