Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Latest commit

adbd221 · Oct 5, 2020

History

History
545 lines (398 loc) · 19.7 KB

File metadata and controls

545 lines (398 loc) · 19.7 KB

+++ title = "This Month in Rust GameDev #14 - September 2020" date = 2020-10-05 transparent = true draft = true +++

Welcome to the 14th 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

Isometric buildings and textured areas

A/B Street is a traffic simulation game exploring how small changes to roads affect cyclists, transit users, pedestrians, and drivers. Any city with OpenStreetMap coverage can be used!

Some of this month's updates:

  • finished support for driving on the left side of the road;
  • isometric buildings and support for textures by Michael;
  • a flurry of major UI updates, thanks to the return of the project's UX designer;
  • an option to disable parking simulation, to workaround missing data.
  • alleyways imported from OSM;
  • more realistic traffic signal timing constraints, thanks to Sam, a new contributor.

Mimas screenshot

Mimas is a WIP voxel engine and game, inspired by Minetest and Minecraft. It's been in development since almost 2 years, and has recently seen a public prototype release 0.4.0.

Several of the features that have already been implemented as of Oct 1st:

  • Procedural map generation with hilly landscape, trees, flowers, water and caves
  • Map manipulation (removal/addition of blocks)
  • Crafting
  • Chests
  • Textures (taken from the Minetest project, under CC-BY-SA license)
  • Tools
  • QUIC based network protocol with SRP based authentication
  • Multiplayer: chat, (hardcoded) avatars
  • Ability to add custom content (e.g. blocks) using a toml format

Imgur screenshot gallery.

pGLOWrpg

pGLOWrpg banner

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.

The pGLOWrpg meets its first official anniversary on September the 15th and goes public at pGLOWrpg repo!

For the past month the main focus of the development was on:

  • Improving the UI.
  • Major refactoring.
  • Unification of I/O means.
  • Making things ready for publication.

Main features of reported version are:

  • Ability to generate one or many worlds from customizable presets.
  • Ability to have output in both raw (b/w .png) and colorized images.
  • Generated data is as follows: terrain, watermask, biomes, rivers, geological regions, rainfall and temperature.

For main feature reports and dev blogs follow @pGLOWrpg on Twitter.

Oh no, Lava!

shooting water into lava

"Oh no, Lava!" by @captainfleppo is the working title of a platforming game which take inspiration from an old iOS game created back in 2014. The game is running with Bevy as its core. The gameplay isn't there yet, but you as a player need to jump on furnitures, collect coins and fight lava/fire based enemies with your water gun.

Play Go against AI and friends on the web Playing KataGo AI in 9x9

BUGOUT is a web application which allows you to play Go/Baduk/Weiqi against a leading AI (KataGo). It provides a multiplayer mode so that you can play other humans, either by joining a public queue or sharing a private URL to your friend.

The user interface is lifted from Sabaki.

The initial installation's AI is powered by an energy-efficient dev board.

BUGOUT is marching actively toward production, at which point the team will publish the website address and invite users. The author anticipates being finished with the production release prior to Jan 1, 2021.

Project YAWC

Screenshot of an in-progress game of Project YAWC

Project YAWC is an in-progress Advance-Wars style strategy game being developed by junkmail using ggez as a framework. The game is currently in a closed alpha state with working netplay. September saw the release of version A2, including revamped netcode and the full core set of units.

Learning Material Updates

With the full power of Cargo build scripts and Tera, you can create an advanced GLSL preprocessor which can generate code conditionally, in loops, and even inherit code from other templates.

An OpenGL preprocessor for Rust

Writing plain GLSL code is uncomfortable, code is quite often is duplicated, libraries aren't something natural for GLSL (means you can't out of the box do #include "library.glsl"). The last point is especially problematic if some constants actually originate in your game logic (like the number of player types). Updating these values manually in your shader code is repetitive and prone to both error and simple forgetfulness. It's really helpful to build some kind of preprocessor for your GLSL code, which can include other files, so you can organize your code into manageable chunks. With the power of Tera, it's now easy to accomplish. Because Rust is also often used for web projects, which need a lot of templated web-pages preprocessing, we can borrow such technology for our needs, combine it with cargo build scripts and create a compile-time preprocessing tool.

Rust, Gamedev, ECS, and Bevy

Bevy hello world code snippet and two game screenshots, one displaying two blue spheres in a grey canvas and another one displaying a gameboy colored tile game

@hugopeixoto released a couple of blog posts on ECS and Bevy, including a tutorial on how to get started.

  • The first part gives us an in depth overview of what ECS. It starts with pseudocode for an object oriented approach and goes through several iterations until we get to the ECS paradigm.

  • The second part is a tutorial on how to use bevy, a data driven game engine built in Rust. It goes over the basic features of the engine, using the example presented in the first part.

Library & Tooling Updates

Thunderdome is a gladitorial generational arena library inspired by generational-arena, slotmap, and slab. It provides constant time insertion, lookup, and removal via small (8 byte) keys that stay 8 bytes when wrapped in Option<T>.

Data structures like Thunderdome's Arena store values and return keys that can be later used to access those values. These keys are stable across removals and have a generation counter to solve the ABA Problem.

let mut arena = Arena::new();

let foo = arena.insert("Foo");
let bar = arena.insert("Bar");

assert_eq!(arena[foo], "Foo");
assert_eq!(arena[bar], "Bar");

arena[bar] = "Replaced";
assert_eq!(arena[bar], "Replaced");

let foo_value = arena.remove(foo);
assert_eq!(foo_value, Some("Foo"));

// The slot previously used by foo will be reused for baz.
let baz = arena.insert("Baz");
assert_eq!(arena[baz], "Baz");

// foo is no longer a valid key.
assert_eq!(arena.get(foo), None);

Discussions: twitter

Mun logo

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

September updates include:

  • on-going work for multi-file projects;
  • build pipeline improvements;
  • bug fixes in the Mun compiler and C++ bindings;
  • a lot of refactors and quality of life improvements.

audir is a low level audio library supporting Windows (WASAPI), Linux (Pulse) and Android (OpenSLES & AAudio).

It aims at provide a minimal and mostly unsafe but feature-rich API on top of common audio backends with focus on gaming applications. The initial release version 0.1.0 provides basic recording and playback support for all available backends, including a small music player example!

Currently looking into coupling with dasp for dsp audio graphs to provide a higher level entry point.

Crevice is a library that helps define GLSL-compatible (std140) structs for use in uniform and storage buffers. It uses new const fn capabilities stabilized in Rust 1.46.0 to align types with explicitly zeroed padding.

Crevice depends heavily on mint to support almost any Rust math library. It also contains helpers for safely sizing and writing buffers, making dynamic buffer layout a breeze.

#[derive(AsStd140)]
struct MainUniform {
    orientation: mint::ColumnMatrix3<f32>,
    position: mint::Vector3<f32>,
    scale: f32,
}

let value = MainUniform {
    orientation: cgmath::Matrix3::identity().into(),
    position: [1.0, 2.0, 3.0].into(),
    scale: 4.0,
};

upload_data_to_gpu(value.as_std140().as_bytes());

Discussions: twitter

femtovg

FemtoVG is a 2D canvas API in Rust, based on nanovg.

Currently, FemtoVG uses OpenGL as a rendering backend. A Metal backend is 95% done, and a wgpu backend is on the roadmap. The project is definitely looking for contributors.

Unlike NanoVG, FemtoVG has full text-shaping support thanks to harfbuzz.

FemtoVG, just like the original NanoVG, is based on the stencil-then-cover approach presented in GPU-accelerated Path Rendering.

Join the Discord channel or follow FemtoVG on twitter.

gfx-rs logo

gfx-portability is a Vulkan portability implementation based on gfx-rs. It's basically a drop-in implementation of Vulkan on top of Metal and D3D12, useful on platforms that don't have native Vulkan support, or buggy drivers.

It released version 0.8.1 with official support for the new KHR portability extension, as well as a few other extensions, plus a number of correctness fixes.

gfx-rs team asks Rust users of Vulkano, Ash, and other Vulkan-only wrappers to try out the gfx-portability as a solution on macOS and relevant Windows 10 platforms.

In gfx-rs itself, the DX12 backend, and the descriptor indexing feature support got improved. There has been a push to get DX11 backend in a solid shape, and it can now run vange-rs pretty well 🎉.

Riddle is a Rust media library in the vein of SDL, building as far as possible on the most active/standard Rust libraries (winit, wgpu, image, etc). Riddle is deliberately not an engine, or a framework. It is a library devoted to exposing media related features in a unified way while avoiding prescribing program structure. It provides abstractions over windowing, input, audio, image loading/manipulation and provides a basic wgpu based 2D renderer. The docs contain runnable examples for most methods and types.

The goal is to provide a stable foundation, resillient to developments in the Rust gamedev ecosystem, on which games, custom engines, and other media applications can be built.

Discussions: /r/rust_gamedev

Tetra

Tetra is a simple 2D game framework, inspired by XNA and Raylib. This month, version 0.5 was released, featuring:

  • Cargo feature flags, allowing you to remove unused functionality and shrink your build
  • Relative mouse events and infinite mouse movement (allowing for FPS-style control schemes)
  • Extra methods for getting and setting the state of a playing sound

For full details and a list of breaking changes, see the changelog.

Additionally, this month puppetmaster released tetrapack, a set of useful extensions for Tetra. This includes:

  • Helpful timer types
  • Looping background music
  • Custom mouse cursors
  • Input utility functions
  • Tilemaps and tile animations

a scene with lightning and a hi-poly character model Click to watch a video demo of one of the new examples.

rg3d is a game engine that aims to be easy to use and provide large set of out-of-box features. Some of the recent updates:

  • Render to texture - it is possible to render scenes into textures.
  • Added support for scenes made in rusty-editor.
  • Added sprite graph node.
  • Added simple lightmapper (still WIP).
  • Added new UI widgets and features:
    • Message box - classic message box with different combinations of buttons.
    • Wrap panel - arranges its children by rows or columns with wrapping.
    • File browser - a browser for file system.
    • Color picker - classic HSV+RGB+Alpha color picker.
    • "Bring into view" for scroll panel.
    • Replaced font rasterizer by fontdue.
    • Improved hotkeys in text box.
  • Improved performance and documentation.

rusty editor

rusty-editor is a scene editor for the rg3d engine. Some of the recently added features:

  • asset browser + asset previewer,
  • multiselection,
  • improved properties editor,
  • lots of other small improvements and fixes.

Popular Workgroup Issues in Github

Requests for Contribution

Jobs

Bonus


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!