#console #configuration #debugging #settings #gamedev #game-engine

cvars-console-macroquad

In-game console for the macroquad game engine, using the cvars crate for configuration

3 releases (breaking)

0.3.0 Jul 15, 2023
0.2.0 Jul 1, 2023
0.1.0 Feb 5, 2023

#1811 in Game dev

Download history 3/week @ 2024-02-01 12/week @ 2024-02-15 38/week @ 2024-02-22 11/week @ 2024-02-29 15/week @ 2024-03-07 8/week @ 2024-03-14 5/week @ 2024-03-21 26/week @ 2024-03-28 34/week @ 2024-04-04 17/week @ 2024-04-11 6/week @ 2024-04-18

83 downloads per month
Used in rec-wars

AGPL-3.0-or-later

270KB
348 lines

Macroquad console


A simple and ergonomic way to store and edit configuration in your game at runtime

GitHub Docs.rs Crates.io License (AGPL3) CI Audit Dependency status Discord

In-game console for the macroquad game engine for changing cvars at runtime.

Macroquad console

Usage

  • Add cvars-console-macroquad to your Cargo.toml:
cargo add cvars-console-macroquad
  • Create a MacroquadConsole when initializing your game.

  • Call its update method in your main loop.

Real-world example

See how RecWars uses cvars and the console.

Compatibility

The version of macroquad used by your game has to match the version used by cvars-console-macroquad, otherwise you'll get a segfault. Unlike with cvars-console-fyrox, there is no error at compile time.

You can use cargo tree to debug the issue but in general every time you update the engine after a breaking change, you have to update the console.

This means that there has to be a new major[^major] release of cvars-console-macroquad for each new major release of macroquad even though there are no changes to the console. I will try to release a new version soon after macroquad but since i am the only maintainer, it might not always be possible. If you need to use the latest macroquad and cvars-console-macroquad hasn't caught up yet, feel free to submit a PR.

You can also temporarily make a fork of the console with the macroquad version number updated and add a patch section to your Cargo.toml.

[^major]: Since macroquad's version number is 0.y.z, changing y is considered a major release as per Cargo's flavor of semantic versioning.

License

AGPL-v3 or newer

Dependencies

~19MB
~247K SLoC