Skip to contents

The RAM needs several things to be set every time the gameloop starts:

  • RAM$time needs to be set to the current time.sec() for the gameloop's timing to work properly (see vignette("timing")).

  • RAM$began should be set to c(time.sec(), RAM$ticks) for inputs to be converted to the correct frame for processing (in inputs.get; see also vignette("inputs"))

Usage

ram.resume(RAM, start_at = NULL)

Arguments

RAM

RAM object.

start_at

Optional parameter to set the exact time.sec() when the RAM should start the gameloop; may be useful for syncing online play.

Examples

#only used internally. To resume gameplay, use RAM = ram.run(RAM).