Hello and welcome to the 14th issue of This Week in Amethyst, a blog bringing to you the latest changes regarding Amethyst, a data-driven game engine written in Rust.

Content of this issue:

Recent changes

Current work

Interesting discussions

Call for participation

Recent changes

Nalgebra migration

Discussions within Amethyst about a migration to nalgebra began in September due to calls by tomaka for the Rust game development ecosystem to standardize on a single library for math and linear algebra in his post "My gamedever wishlist for Rust".

Eminent contributor Ellie completed the migration of Amethyst's internal math library from cgmath to nalgebra in this PR, marking another win for the Rust game development ecosystem and showing Amethyst's commitment to the larger community. Thank you Ellie!

With the migration completed, a number of public APIs will change in Amethyst's next release along with updates to examples and documentation. Expect more details on the API changes in a future post.

Asset loading helper

Thanks to Rhuagh, asset loading is now a bit easier (PR).

This is how it looks outside of a system:

let mesh = world.exec(|loader: AssetLoaderSystemData<Mesh>| { loader.load_from_data( Shape::Sphere(32, 32).generate::<Vec<PosNormTangTex>>(None), (), ) });

And this is an example inside a system:

impl<'a> System<'a> for MySys { type SystemData = ( // .. AssetLoaderSystemData<'a, Texture>, // .. ); fn run(&mut self, ..) { let texture = loader.load("mytexture.png", PngFormat, TextureMetadata::srgb(), ()); } }

Skybox Pass

We finally got a skybox pass! Thank you, photex! It's only a gradient skybox for now, but it looks nice already. This is how you can try it out:

Instead of .with_basic_renderer, use the RenderBundle and build the pipeline yourself. Now, you just need to add

.with_pass(DrawSkybox::new())

to a pipeline stage and you get a skybox. You can tweak it using the SkyboxColor resource.

Here's a screenshot of the game photex and brendanzab are working on (using the new gradient skybox):

Font loading tweaks

Thank you jjedelsky and DoumanAsh for making font loading better:

We can now

fall back to the default system font and

load default font from a path (no need to package it anymore)

Check out the PRs here and here.

Default logger more configurable

Amethyst uses the logging library fern which has really nice builder-based configuration support. A recent PR enables users of Amethyst to configure the default logger with options like level_for() before starting the logger. Check out the example:

let logger = amethyst::Logger::from_config(amethyst::LoggerConfig::default()); logger.get_dispatch() .level_for("gfx_device_gl", log::LevelFilter::Warn) .level_for("gfx_glyph", log::LevelFilter::Error) .apply();

Thank you for helping us keep our logs clean qqwa!

What's being worked on currently?

The fifth Pong tutorial chapter is very close to being merged. Credit goes to Leorii for the amazing PR! If you want to, you can already check out the PR and add some comments in case you notice anything.

There are so many other open PRs, if you're interested, you can check them out yourself here.

Interesting discussions

Although not exactly an Amethyst discussion, there's a thread on internals.rust-lang.org that discusses a working group for Rust game development.

More features, documentation and stability would be a huge help to Amethyst, so we would greatly appreciate such a working group. Make sure to bring in your input!

Call for participation

We love contributions from the community, so if you see something you'd like to work on, don't hesitate! We are going to help you and point you into the right direction if something doesn't work out at first.

We have tasks with different difficulty. Make sure to choose easier ones at first, because hard issues can become quite frustrating, especially if you haven't worked on Amethyst before.

Here are four issues for you to pick from:

Please let us know that you're working on an issue using a short comment, that way we can avoid duplicate work. Contributing to the discussion is also appreciated!

Thank you for helping push the project forward!