Skip to content

feat: Lua API for MMO-scale world features#4

Merged
Taure merged 4 commits intomainfrom
feat/mmo-scale-lua-api
Apr 14, 2026
Merged

feat: Lua API for MMO-scale world features#4
Taure merged 4 commits intomainfrom
feat/mmo-scale-lua-api

Conversation

@Taure
Copy link
Copy Markdown
Contributor

@Taure Taure commented Apr 13, 2026

Summary

  • Terrain API: game.terrain.get_chunk, game.terrain.preload, terrain_provider callback
  • Zone lifecycle callbacks: on_zone_loaded, on_zone_unloaded
  • Zone-based spatial queries: game.spatial.query_radius, game.spatial.query_rect
  • Config globals: lazy_zones, zone_idle_timeout, max_active_zones, spatial_grid_cell_size, cold_tick_divisor
  • Updated lua-scripting guide

Test plan

  • Config tests verify new globals parse correctly
  • API tests verify spatial query routing
  • Depends on widgrensit/asobi feat/mmo-scale-world being merged first

Taure added 2 commits April 12, 2026 20:16
Expose the three new asobi features to Lua scripts:

- game.spatial.query_radius/nearest/in_range/distance — spatial queries
  on entity tables with automatic binary-to-atom key conversion
- game.zone.spawn/despawn — template-based entity spawning (world mode)
- spawn_templates(config) callback — define spawn templates from Lua
- on_world_recovered(snapshots, state) callback — handle snapshot recovery
- terrain: game.terrain.get_chunk, game.terrain.preload, terrain_provider callback
- zone lifecycle: on_zone_loaded, on_zone_unloaded callbacks
- spatial queries: game.spatial.query_radius, game.spatial.query_rect (zone-based)
- config: lazy_zones, zone_idle_timeout, max_active_zones, spatial_grid_cell_size, cold_tick_divisor
- docs: updated lua-scripting guide with zone config and terrain sections
@Taure Taure merged commit 3867154 into main Apr 14, 2026
14 of 15 checks passed
@Taure Taure deleted the feat/mmo-scale-lua-api branch April 14, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant