[−][src]Trait romy_core::Game
The core trait used by Romy, games need to implement this. Romy will use these methods to run the game.
Required methods
fn step(&mut self, arguments: &StepArguments)
fn draw(&self, arguments: &DrawArguments) -> Image
Renders an image for Romy to display, can be called many times per step.
This function can return any image.
Arguments
arguments
- Info, such as the width of the frame Romy is rendering too, to be used in this step
fn render_audio(&self, arguments: &RenderAudioArguments) -> Sound
Renders some audio for Romy to play, called once per step.
The sound returned currently needs to be at a sample rate of 44100hz, and have enough samples to cover the amount of time between calls to step.