Skip to content

Godot: HTML5 export + JavaScriptBridge → Stellar/ZK #36

Description

@leocagli

Objetivo

Exportar el juego como HTML5 y conectar Godot con la capa JS existente (wallet Stellar, StellarGameService, ZK proofs) mediante JavaScriptBridge.

Alcance

  • Exportación Godot 4 → HTML5 con plantilla personalizada que incluye el JS existente
  • Autoload WebBridge.gd con wrappers GDScript para cada llamada JS
  • Funciones puente: connect_wallet(), get_wallet_address(), commit_action(hash), reveal_action(key), export_proof(state)
  • Manejo de respuestas asíncronas de la wallet mediante señales
  • Página HTML shell que carga game.js (capa Web3) antes del runtime de Godot

Skill de referencia

/godot-platform-web

Tareas

  • Crear plantilla HTML5 personalizada godot/web_template/index.html que incluye StellarGameService.js
  • Crear autoloads/WebBridge.gd con func call_js(fn_name: String, args: Array) -> Variant
  • Implementar connect_wallet() que emite EventBus.wallet_connected(address) al resolver
  • Implementar commit_action(hash: String) y reveal_action(key: String) con callback de confirmación TX
  • Implementar export_proof(state: Dictionary) que llama al generador ZK JS y devuelve bytes
  • Manejar errores JS (wallet rechazada, TX fallida) y emitir EventBus.web3_error(msg)

Aceptación

Desde el build HTML5 en Chrome, conectar la wallet Stellar, enviar un commit y recibir la confirmación de transacción sin recargar la página.

Metadata

Metadata

Assignees

Labels

godotPort a Godot 4web3-zkStellar / Soroban / ZK

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions