39b951707b
- app.md - appicon.ico Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
99 lines
3.4 KiB
Markdown
99 lines
3.4 KiB
Markdown
---
|
|
name: engine_smoke
|
|
lang: cpp
|
|
domain: gamedev
|
|
version: 0.1.0
|
|
description: "Smoke test del stack gamedev: SDL3 + sokol_gfx + Dear ImGui. Valida que el stack compila y corre en PC (Linux/Windows desktop GL) y WASM (WebGL2 via emscripten) antes de invertir tiempo en runtime real (issue 0072a)."
|
|
tags: [imgui, sdl3, sokol, gamedev, smoke, wasm]
|
|
uses_functions: []
|
|
uses_types: []
|
|
framework: "imgui"
|
|
entry_point: "main.cpp"
|
|
dir_path: "apps/engine_smoke"
|
|
repo_url: ""
|
|
icon:
|
|
phosphor: "game-controller"
|
|
accent: "#16a34a"
|
|
e2e_checks:
|
|
- id: build_pc
|
|
cmd: "cmake --build build --target engine_smoke -j"
|
|
timeout_s: 300
|
|
- id: smoke_self
|
|
cmd: "timeout 5 ./build/cpp/apps/engine_smoke/engine_smoke || test $? = 124"
|
|
timeout_s: 10
|
|
severity: warning # requires display in CI; warning, not critical
|
|
- id: build_wasm
|
|
cmd: "bash bash/functions/pipelines/build_wasm_cpp_app.sh engine_smoke"
|
|
timeout_s: 600
|
|
severity: warning # requires emsdk
|
|
- id: wasm_size_budget
|
|
cmd: "test -f build/wasm/engine_smoke/engine_smoke.wasm.gz && test $(stat -c%s build/wasm/engine_smoke/engine_smoke.wasm.gz) -lt 1572864"
|
|
severity: warning
|
|
---
|
|
|
|
# engine_smoke
|
|
|
|
Primer experimento del stack gamedev (issue [0072a](../../../dev/issues/0072a-gamedev-smoke-sdl3-sokol-imgui.md)).
|
|
|
|
## Que hace
|
|
|
|
1. Abre ventana SDL3 1280x720 con context OpenGL.
|
|
2. Inicializa `sokol_gfx` sobre ese context (GL 3.3 desktop, GLES3 en WASM).
|
|
3. Pinta un fullscreen triangle con un fragment shader animado (gradient time-based).
|
|
4. Pinta sobre eso un panel ImGui con FPS, tamaño de ventana y boton Quit.
|
|
|
|
Sin `fn_framework`, sin `add_imgui_app()`. CMakeLists standalone para evitar contaminar el shell desktop hasta validar el stack.
|
|
|
|
## Build PC (Linux)
|
|
|
|
Desde la raiz del fn_registry:
|
|
|
|
```bash
|
|
cmake -S cpp -B build -DCMAKE_BUILD_TYPE=Release
|
|
cmake --build build --target engine_smoke -j
|
|
./build/cpp/apps/engine_smoke/engine_smoke
|
|
```
|
|
|
|
## Build WASM
|
|
|
|
Requiere `emsdk` instalado y activado en el shell. Ver `cpp/vendor/sokol.VENDORING.md` y `bash/functions/pipelines/build_wasm_cpp_app.sh`.
|
|
|
|
```bash
|
|
bash bash/functions/pipelines/build_wasm_cpp_app.sh engine_smoke
|
|
# Sirve build/wasm/engine_smoke/engine_smoke.html en navegador
|
|
```
|
|
|
|
Budget objetivo: gzip ≤ 1.5 MB.
|
|
|
|
## Stack vendoreado
|
|
|
|
- `cpp/vendor/sdl3/` — SDL3 release-3.4.8
|
|
- `cpp/vendor/sokol/` — sokol_gfx single-header pinned commit
|
|
- `cpp/vendor/imgui/` — ImGui 1.92.7 con backends `imgui_impl_sdl3` + `imgui_impl_opengl3`
|
|
|
|
## Notas de implementacion
|
|
|
|
- Fullscreen tri via `gl_VertexID` (3 vertices, no VBO). Cubre todo el viewport sin atributos.
|
|
- Uniform `u_time` actualizado por frame.
|
|
- Backend ImGui = `imgui_impl_opengl3` (oficial, 0 LoC custom). Compatible WebGL2 emscripten.
|
|
- `SOKOL_GLCORE` desktop / `SOKOL_GLES3` web — selccion compile-time.
|
|
- `setup_gfx` se llama UNA VEZ tras crear el GL context. `sg_setup` toma `sglue_environment()` que lee el contexto activo.
|
|
|
|
## No-objetivos (smoke)
|
|
|
|
- No texturas reales (eso entra en 0072b).
|
|
- No audio.
|
|
- No input game-style.
|
|
- No fn_framework integration.
|
|
- No mobile (Android/iOS son issues 0072g/h).
|
|
|
|
|
|
## Capability growth log
|
|
|
|
Una linea por bump SemVer. Bump-type segun `.claude/commands/version.md`:
|
|
- `major`: breaking observable (CLI args, schema BBDD propia, formato wire).
|
|
- `minor`: feature aditiva (nuevo panel, endpoint, opcion).
|
|
- `patch`: bugfix sin cambio observable.
|
|
|
|
- v0.1.0 (2026-05-18) — baseline.
|