gb.update

Description

bool gb.update()

You probably want to use gb.waitForUpdate() instead!

gb.update makes sure that the Gamebuino Meta runs at a constant framerate. It will return true whenever a next frame is ready to render. Default framerate: 25FPS, settable via gb.setFrameRate()

It also takes care of updating buttons, sound, sending out the screen, etc.

Parameters

none

Returns

bool: true if it is time to render the next frame

Example

#include <Gamebuino-Meta.h>

void setup() { gb.begin(); }

void loop() { while(!gb.update()); // this code will run at a steady framerate (default: 25 FPS) }