3 releases
Uses old Rust 2015
0.1.2 | Oct 15, 2017 |
---|---|
0.1.1 | Oct 12, 2017 |
0.1.0 | Oct 9, 2017 |
#25 in #second
5KB
55 lines
FrameTimer
A rust drop in frame timer
BETA VERSION
This is a frame timer for rust, meant to be used to insure that game loops stay to a certain rate
It is meant to be as simple as can be First create it like this
let mut frame_timer: FrameTimer = FrameTimer::new();
At the start of your game loop call
frame_timer.frame_start();
At the end of your game loop call
frame_timer.frame_end();
and that will limit your game to 60 frames a second
Future features
- Add in a delta frame calculation and varible
- Make the frame timer smarter so that it may account for inconsistent sleep times
- Open to suggestions