working on game engine for examples

The game engine now renders and handles updates and input and passes the
data to the objects to handle.