Install
openclaw skills install defoldDevelop games using Defold engine with Lua scripting, including components, GUI, physics, animation, input handling, dynamic objects, and save/load systems.
openclaw skills install defoldhttps://github.com/Insality/druid/archive/refs/tags/1.2.2.zip
https://github.com/subsoap/defsave/archive/refs/tags/v1.2.6.zip
https://github.com/insality/defold-monarch/archive/1.0.zip
main.collection
├── game_manager.go
├── player.go
└── ui.go
msg.post("target#script", "event", { data = value })
function on_message(self, message_id, message, sender)
if message_id == hash("event") then handle(message) end
end
local id = factory.create("#factory", pos, nil, { prop = value })
local ids = collectionfactory.create("#collection_factory")
msg.post("#proxy", "load") -- Wait for proxy_loaded, then init+enable
self.druid = druid.new(self)
self.btn = self.druid:new_button("node", callback)
self.text = self.druid:new_text("node", "text")
physics.apply_force("#collision", force)
physics.set_velocity("#collision", velocity)
function on_message(self, message_id, message, sender)
if message_id == hash("collision_response") then
handle_collision(message.other_id, message.normal)
end
end
sprite.play_flipbook("#sprite", "idle", callback)
go.animate(".", "position.y", go.PLAYBACK_ONCE_FORWARD, 100, go.EASING_OUTQUAD, 1.0)
msg.post(".", "acquire_input_focus")
function on_input(self, action_id, action)
if action_id == hash("jump") and action.pressed then jump() end
end
defsave.load("game")
defsave.set("game", "coins", 100)
local coins = defsave.get("game", "coins")