Skip to contents

Runs one tick (frame) of the RAM. This means calling RAM$ROM$custom() once (see rom.init).

Usage

ram.tick(RAM)

Arguments

RAM

RAM object to update.

Value

The following happens to the RAM object:

  • RAM$ticks increases by one.
    (a new tick has occurred)

  • RAM$time increases by 1/framerate.
    (the RAM is now one frame further in time)

  • RAM = RAM$ROM$custom(RAM) is run.
    (the game code is run once on the RAM)

  • RAM$backup is occasionally updated; see ram.rollback.
    (the game is occasionally backed up)

Examples

if (FALSE) { # \dontrun{
quickload(BadApple)
#^C to pause
RAM = ram.tick(RAM); render.ram(RAM)
} # }