--Hodls global state mod = ... mod.screen_width = 1024 mod.screen_height = 512 mod.layers = am.group! mod.current_level = 0 mod.layer_tbl = {} mod.add_layer = (layer) -> mod.layers\append(layer.node) table.insert(mod.layer_tbl,layer) mod.clear_layers = () -> mod.layers\remove_all! mod.layer_tbl = {} mod.play = (seed) -> mod.layers\action(am.play(seed,false,1,1)) mod