core.mod contains the Kernel and GameService modules. These are used to provide something more flexible than a typical game loop.

Most game loops look something like this:

Repeat handle_input() update_animations() update_entities() draw_everything() Until finished = True

With a kernel based loop, it looks a little like this:

Local kernel:GameKernel = new GameKernel kernel.addService(new InputService) kernel.addService(new EntityService) kernel.addService(new RenderService) Repeat kernel.update(delta); kernel.render(delta); Until kernel.isFinished()

It's a little more code, but the big advantage is that services can be added at runtime without altering the main loop. This is particularly useful when adding debug services.