Support native C++ scripting #16

Open
opened 2026-09-26 02:04:56 -07:00 by burkkyy · 0 comments
Owner

Add a ScriptComponent so game logic can be written as native C++ scripts attached to entities.

  • Script base class with onCreate, onUpdate(dt) and onDestroy hooks
  • Scene runs the hooks each frame through an EnTT view
  • Scripts can access their entity and its components

Keep the script interface independent of the language behind it, so an embedded language (Lua, or our own language, Soap) can plug into the same hooks later.

Add a `ScriptComponent` so game logic can be written as native C++ scripts attached to entities. - Script base class with `onCreate`, `onUpdate(dt)` and `onDestroy` hooks - Scene runs the hooks each frame through an EnTT view - Scripts can access their entity and its components Keep the script interface independent of the language behind it, so an embedded language (Lua, or our own language, Soap) can plug into the same hooks later.
burkkyy added the enhancement label 2026-09-26 02:04:56 -07:00
burkkyy changed title from Support scripting to Support native C++ scripting 2026-09-26 02:09:46 -07:00
burkkyy added this to the sophia project 2026-09-26 02:09:54 -07:00
burkkyy moved this to Blocked / Discussion in sophia on 2026-09-26 02:11:24 -07:00
Sign in to join this conversation.