lua.wetgenes.gamecake.toaster
oven=require("wetgenes.gamecake.toaster").bake(opts)
A cut down oven without opengl or even file access intended to be used in a sub process or task.
lua.wetgenes.gamecake.toaster.bake
oven=wetgenes.gamecake.toaster.bake(opts)
Bake creates an instance of a lua module bound to an oven state. Here we are creating the main state that other modules will then bind to.
Modules are then bound together using rebake...
b=oven.rebake(nameb)
c=oven.rebake(namec)
All of these will be connected by the same oven and circular dependencies should work with the caveat that just because you have the table for a baked module does not mean that it has all been filled in yet.
lua.wetgenes.gamecake.toaster.newticks
ticks=require("wetgenes.gamecake.toaster").newticks(rate,jump)
create a ticks time controller for updates.
rate is time between steps , jump is how far behind we should get before giving up ( eg callback takes longer than rate allows ) these values are in seconds and default to 1/60 and 1 respectively.
Then we perform one or more update steps like so
ticks.step( callback ) -- callback may be called zero or more times
After that we should wait a bit (maybe draw a frame) and then call again.