#input #windowing #loops #game

win-loop

Windowing (using winit), nice input handling and frame-rate-independent game loop all wrapped up in a neat little package

13 releases (breaking)

0.10.1 Jun 8, 2024
0.9.0 May 19, 2024
0.7.0 Jan 15, 2024

#15 in #loops

Download history 20/week @ 2024-03-28 9/week @ 2024-04-04 4/week @ 2024-04-18 105/week @ 2024-04-25 215/week @ 2024-05-16 136/week @ 2024-05-23 4/week @ 2024-05-30 172/week @ 2024-06-06 7/week @ 2024-06-13

797 downloads per month
Used in pix-win-loop

Zlib license

22KB
455 lines

win-loop

Windowing (using winit1), nice input handling and frame-rate-independent game loop all wrapped up in a neat little package. The game loop is based on https://gafferongames.com/post/fix_your_timestep.

Originally part of pix-win-loop, now moved to a separate crate.

Cargo features

The crate features rwh_04, rwh_05 and rwh_06 enable corresponding winit features. By default winit has all its default features enabled except rwh_06, so you have to specify one of the rwhs in case you need them.

Note: As of version 0.6 and further, all of winit's features are disabled. There is instead a winit-default feature which enables winit's default features, except for rwh_06. You still enable rwh_NN directly from this crate's features. If you need to enable others, add something like:

[dependencies]
# ...
winit = { version = "0.30", features = [ ...whatever you need... ] }

to your Cargo.toml.

Warning

Crate versions 0.3 and lower might fail to compile on web because of a silly mistake. Should be fixed in 0.4.0.

Dependencies

~3–18MB
~259K SLoC