Skip to content

N43: Cvars #1306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added content/news/043/cvars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions content/news/043/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,37 @@ for more details, check out our [release notes].
[taffy]: https://github.com/dioxuslabs/taffy
[release notes]: https://github.com/DioxusLabs/taffy/blob/main/RELEASES.md#030

### [Cvars]

![cvars used in the RustCycles game - showcasing a console for the Fyrox engine](cvars.png)
_Cvars and the Fyrox in-game console as used in RustCycles_

[Cvars] ([GitHub][cvars-github], [Discord][cvars-discord]) by [@martin-t]
are a simple way to store settings you want to change at runtime
without restarting your game.

They offer a way to change struct fields based on their name.
This means games can store their config in a plain old struct
and use its statically typed fields with no overhead.
[Cvars] provide a derive macro to also allow changing each field
dynamically at runtime from a TUI.

The cvars project includes in-game consoles [for macroquad][cvars-macroquad]
and [for Fyrox][cvars-fyrox].

In addition to reading and setting cvars,
they support history and offer a help message for new users.
More advanced features such as autocomplete are planned for the next release.

_Discussions: [/r/rust_gamedev](https://reddit.com/r/rust_gamedev/comments/10wfe9p/announcing_cvars)_

[Cvars]: https://crates.io/crates/cvars
[cvars-github]: https://github.com/martin-t/cvars
[cvars-discord]: https://discord.gg/aA7hCFvYh9
[@martin-t]: https://github.com/martin-t
[cvars-macroquad]: https://github.com/martin-t/cvars#macroquad-console
[cvars-fyrox]: https://github.com/martin-t/cvars#fyrox-console

## Popular Workgroup Issues in Github

<!-- Up to 10 links to interesting issues -->
Expand Down