10000 Merge branch 'source' into patch-1 · roalyr/rust-gamedev.github.io@7dd1f7b · GitHub
[go: up one dir, main page]

Skip to content

Commit 7dd1f7b

Browse files
authored
Merge branch 'source' into patch-1
2 parents 3f1e5f3 + 9ef6e7a commit 7dd1f7b

File tree

9 files changed

+292
-0
lines changed

9 files changed

+292
-0
lines changed
231 KB
Loading
416 KB
Loading
Loading
177 KB
Loading
24.3 KB
Loading

content/posts/newsletter-014/index.md

Lines changed: 292 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,54 @@ If needed, a section can be split into subsections with a "------" delimiter.
6262

6363
## Game Updates
6464

65+
### [A/B Street][abstreet]
66+
67+
![Isometric buildings and textured areas](abstreet.png)
68+
69+
[A/B Street][abstreet] is a traffic simulation game exploring how small changes
70+
to roads affect cyclists, transit users, pedestrians, and drivers. Any city
71+
with OpenStreetMap coverage can be used!
72+
73+
Some of this month's updates:
74+
75+
- finished support for driving on the left side of the road;
76+
- isometric buildings and support for textures by [Michael][mkirk];
77+
- a flurry of major UI updates, thanks to the return of the project's UX
78+
designer;
79+
- an option to disable parking simulation, to workaround missing data.
80+
- alleyways imported from OSM;
81+
- more realistic traffic signal timing constraints, thanks to
82+
[Sam][NoSuchThingAsRandom], a new contributor.
83+
84+
[abstreet]: https://abstreet.org
85+
[mkirk]: https://github.com/michaelkirk
86+
[NoSuchThingAsRandom]: https://github.com/NoSuchThingAsRandom/
87+
88+
### [Mimas]
89+
90+
![Mimas screenshot](mimas.png)
91+
92+
[Mimas] is a WIP voxel engine and game, inspired by Minetest and Minecraft.
93+
It's been in development since almost 2 years, and has recently seen a public
94+
prototype release 0.4.0.
95+
96+
Several of the features that have already been implemented as of Oct 1st:
97+
98+
- Procedural map generation with hilly landscape, trees, flowers, water and caves
99+
- Map manipulation (removal/addition of blocks)
100+
- Crafting
101+
- Chests
102+
- Textures (taken from the Minetest project, under CC-BY-SA license)
103+
- Tools
104+
- QUIC based network protocol with SRP based authentication
105+
- Multiplayer: chat, (hardcoded) avatars
106+
- Ability to add custom content (e.g. blocks) using a toml format
107+
108+
Imgur screenshot [gallery].
109+
110+
[Mimas]: https://github.com/est31/mimas
111+
[gallery]: https://imgur.com/a/vvo7len
112+
65113
### pGLOWrpg
66114

67115
![pGLOWrpg banner](pglowrpg_banner.png)
@@ -94,10 +142,254 @@ For main feature reports and dev blogs follow [@pGLOWrpg] on Twitter.
94142
[@pGLOWrpg]: https://twitter.com/pglowrpg
95143
[pGLOWrpg repo]: https://github.com/roalyr/pglowrpg
96144

145+
### Oh no, Lava!
146+
147+
![shooting water into lava](ohnolava_troligtvis.gif)
148+
149+
"Oh no, Lava!" by [@captainfleppo] is the working title
150+
of a platforming game which take inspiration
151+
from an old iOS game created back in 2014. The game is running with [Bevy][bevy]
152+
as its core. The gameplay isn't there yet, but you as a player need to jump on
153+
furnitures, collect coins and fight lava/fire based enemies with your water gun.
154+
155+
[@captainfleppo]: https://twitter.com/captainfleppo
156+
[bevy]: https://bevyengine.org
157+
158+
### [BUGOUT]
159+
160+
![Play Go against AI and friends on the web](BUGOUT.jpg)
161+
_Playing KataGo AI in 9x9_
162+
163+
[BUGOUT] is a web application which allows you to play Go/Baduk/Weiqi
164+
against a leading AI ([KataGo]).
165+
It provides a multiplayer mode so that you can play other humans,
166+
either by joining a public queue or sharing a private URL to your friend.
167+
168+
The user interface is lifted from [Sabaki].
169+
170+
The initial installation's AI is powered by an energy-efficient
171+
[dev board][nv-devboard].
172+
173+
BUGOUT is marching actively toward production, at which point the
174+
team will publish the website address and invite users.
175+
The author anticipates being finished with the production release
176+
prior to Jan 1, 2021.
177+
178+
[BUGOUT]: https://github.com/Terkwood/BUGOUT
179+
[KataGo]: https://github.com/lightvector/KataGo
180+
[Sabaki]: https://github.com/SabakiHQ/Sabaki
181+
[nv-devboard]: https://developer.nvidia.com/embedded/jetson-nano-developer-kit
182+
97183
## Learning Material Updates
98184

185+
### [OpenGL Preprocessor for Rust]
186+
187+
With the full power of Cargo build scripts and [Tera], you can create an advanced
188+
GLSL preprocessor which can generate code conditionally, in loops, and even
189+
inherit code from other templates.
190+
191+
![An OpenGL preprocessor for Rust](opengl_preprocessor.png)
192+
193+
Writing plain GLSL code is uncomfortable, code is quite often is duplicated, libraries
194+
aren't something natural for GLSL (means you can't out of the box do #include "library.glsl").
195+
The last point is especially problematic if some constants actually originate in
196+
your game logic (like the number of player types). Updating these values manually
197+
in your shader code is repetitive and prone to both error and simple forgetfulness.
198+
It's really helpful to build some kind of preprocessor for your GLSL code,
199+
which can include other files, so you can organize your code into manageable chunks.
200+
With the power of [Tera], it's now easy to accomplish.
201+
Because Rust is also often used for web projects, which need a lot of templated
202+
web-pages preprocessing, we can borrow such technology for our needs,
203+
combine it with cargo build scripts and create a compile-time preprocessing tool.
204+
205+
[tera]: https://tera.netlify.app
206+
[OpenGL Preprocessor for Rust]: https://codecrash.me/an-opengl-preprocessor-for-rust
207+
208+
### Rust, Gamedev, ECS, and Bevy
209+
210+
![Bevy hello world code snippet and two game screenshots, one displaying two
211+
blue spheres in a grey canvas and another one displaying a gameboy colored tile
212+
game](ecs-bevy-tutorial.png)
213+
214+
[@hugopeixoto] released a couple of blog posts on ECS and Bevy,
215+
including a tutorial on how to get started.
216+
217+
- The [first part][hugopeixoto-p1] gives us an in depth overview of what ECS.
218+
It starts with pseudocode for an object oriented approach
219+
and goes through several iterations until we get to the ECS paradigm.
220+
221+
- The [second part][hugopeixoto-p2] is a tutorial on how to use [bevy],
222+
a data driven game engine built in Rust.
223+
It goes over the basic features of the engine,
224+
using the example presented in the first part.
225+
226+
[@hugopeixoto]: https://twitter.com/hugopeixoto
227+
[hugopeixoto-p1]: https://hugopeixoto.net/articles/rust-gamedev-ecs-bevy.html
228+
[hugopeixoto-p2]: https://hugopeixoto.net/articles/rust-gamedev-ecs-bevy-p2.html
229+
[bevy]: https://bevyengine.org
230+
99231
## Library & Tooling Updates
100232

233+
### [Thunderdome]
234+
235+
[Thunderdome] is a ~~gladitorial~~ generational arena library inspired by
236+
[generational-arena], [slotmap], and [slab]. It provides constant time
237+
insertion, lookup, and removal via small (8 byte) keys that stay 8 bytes when
238+
wrapped in `Option<T>`.
239+
240+
Data structures like Thunderdome's `Arena` store values and return keys that can
241+
be later used to access those values. These keys are stable across removals and
242+
have a generation counter to solve the [ABA Problem].
243+
244+
```rust
245+
let mut arena = Arena::new();
246+
247+
let foo = arena.insert("Foo");
248+
let bar = arena.insert("Bar");
249+
250+
assert_eq!(arena[foo], "Foo");
251+
assert_eq!(arena[bar], "Bar");
252+
253+
arena[bar] = "Replaced";
254+
assert_eq!(arena[bar], "Replaced");
255+
256+
let foo_value = arena.remove(foo);
257+
assert_eq!(foo_value, Some("Foo"));
258+
259+
// The slot previously used by foo will be reused for baz.
260+
let baz = arena.insert("Baz");
261+
assert_eq!(arena[baz], "Baz");
262+
263+
// foo is no longer a valid key.
264+
assert_eq!(arena.get(foo), None);
265+
```
266+
267+
_Discussions:
268+
[twitter](https://twitter.com/LPGhatguy/status/1303375906493276160)_
269+
270+
[Thunderdome]: https://github.com/LPGhatguy/thunderdome
271+
[generational-arena]: https://crates.io/crates/generational-arena
272+
[slotmap]: https://crates.io/crates/slotmap
273+
[slab]: https://crates.io/crates/slab
274+
[ABA Problem]: https://en.wikipedia.org/wiki/ABA_problem
275+
276+
### [audir]
277+
278+
[audir] is a low level audio library supporting Windows (WASAPI), Linux (Pulse)
279+
and Android (OpenSLES & AAudio).
280+
281+
It aims at provide a minimal and mostly unsafe but feature-rich API on top of
282+
common audio backends with focus on gaming applications. The initial release
283+
version 0.1.0 provides basic recording and playback support for all available
284+
backends, including a small music player example!
285+
286+
Currently looking into coupling with [dasp] for dsp audio graphs to provide
287+
a higher level entry point.
288+
289+
[audir]: https://github.com/norse-rs/audir
290+
[dasp]: https://github.com/RustAudio/dasp
291+
292+
### [Crevice]
293+
294+
[Crevice] is a library that helps define GLSL-compatible (std140) structs for
295+
use in uniform and storage buffers. It uses new `const fn` capabilities
296+
stabilized in [Rust 1.46.0] to align types with explicitly zeroed padding.
297+
298+
Crevice depends heavily on [mint] to support almost any Rust math library. It
299+
also contains helpers for safely sizing and writing buffers, making dynamic
300+
buffer layout a breeze.
301+
302+
```rust
303+
#[derive(AsStd140)]
304+
struct MainUniform {
305+
orientation: mint::ColumnMatrix3<f32>,
306+
position: mint::Vector3<f32>,
307+
scale: f32,
308+
}
309+
310+
let value = MainUniform {
311+
orientation: cgmath::Matrix3::identity().into(),
312+
position: [1.0, 2.0, 3.0].into(),
313+
scale: 4.0,
314+
};
315+
316+
upload_data_to_gpu(value.as_std140().as_bytes());
317+
```
318+
319+
_Discussions:
320+
[twitter](https://twitter.com/LPGhatguy/status/1308499131212599296)_
321+
322+
[Crevice]: https://github.com/LPGhatguy/crevice
323+
[Rust 1.46.0]: https://blog.rust-lang.org/2020/08/27/Rust-1.46.0.html
324+
[mint]: https://github.com/kvark/mint
325+
326+
### [FemtoVG]
327+
328+
![femtovg](femtovg.png)
329+
330+
[FemtoVG] is a 2D canvas API in Rust, based on [nanovg].
331+
332+
Currently, FemtoVG uses OpenGL as a rendering backend. A Metal backend is 95%
333+
done, and a wgpu backend is on the roadmap. The project is definitely looking
334+
for contributors.
335+
336+
Unlike NanoVG, FemtoVG has full text-shaping support thanks to harfbuzz.
337+
338+
FemtoVG, just like the original NanoVG, is based on the _stencil-then-cover_
339+
approach presented in [GPU-accelerated Path Rendering][gpupathrender.pdf].
340+
341+
Join the [Discord channel](https://discord.gg/V69VdVu)
342+
or follow [FemtoVG on twitter](https://twitter.com/femtovg).
343+
344+
[FemtoVG]: https://github.com/femtovg/femtovg
345+
[nanovg]: https://github.com/memononen/nanovg
346+
[gpupathrender.pdf]: https://github.com/femtovg/femtovg/blob/master/assets/gpupathrender.pdf
347+
348+
### [gfx-rs] and [gfx-portability]
349+
350+
![gfx-rs logo](gfx-logo.png)
351+
352+
[gfx-portability] is a Vulkan portability implementation based on [gfx-rs].
353+
It's basically a drop-in implementation of Vulkan on top of Metal and D3D12,
354+
useful on platforms that don't have native Vulkan support, or buggy drivers.
355+
356+
It released version [0.8.1](https://github.com/gfx-rs/portability/releases/tag/0.8.1)
357+
with official support for the new [KHR portability extension][khr-portability],
358+
as well as a few other extensions, plus a number of correctness fixes.
359+
360+
gfx-rs team asks Rust users of Vulkano, Ash, and other Vulkan-only wrappers to try
361+
out the gfx-portability as a solution on macOS and relevant Windows 10 platforms.
362+
363+
In [gfx-rs] itself, the DX12 backend, and the descriptor indexing feature support
364+
got improved. There has been a push to get DX11 backend in a solid shape,
365+
and it can now run [vange-rs] pretty well 🎉.
366+
367+
[gfx-rs]: https://github.com/gfx-rs/gfx
368+
[gfx-portability]: https://github.com/gfx-rs/portability
369+
[khr-portability]: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_portability_subset.html
370+
[vange-rs]: https://github.com/kvark/vange-rs
371+
372+
### [Riddle]
373+
374+
[Riddle] is a Rust media library in the vein of SDL,
375+
building as far as possible on the most active/standard Rust libraries
376+
(winit, wgpu, image, etc). Riddle is deliberately not an engine, or a framework.
377+
It is a library devoted to exposing media related features in a unified way while
378+
avoiding prescribing program structure. It provides abstractions over windowing,
379+
input, audio, image loading/manipulation and provides a basic wgpu based 2D
380+
renderer.
381+
The [docs][riddle-docs] contain runnable examples for most methods and types.
382+
383+
The goal is to provide a stable foundation, resillient to developments in the Rust
384+
gamedev ecosystem, on which games, custom engines, and other media applications can
385+
be built.
386+
387+
_Discussions:
388+
[/r/rust_gamedev](https://reddit.com/r/rust_gamedev/comments/j0xa3s/riddle_010)_
389+
390+
[Riddle]: https://github.com/vickles/riddle
391+
[riddle-docs]: https://vickles.github.io/riddle/0.1.0/riddle
392+
101393
## Popular Workgroup Issues in Github
102394

103395
## Requests for Contribution
139 KB
Loading
Loading
Loading

0 commit comments

Comments
 (0)
0