31a88f3c55
- CMakeLists.txt - app.md - appicon.ico Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
75 lines
2.6 KiB
Markdown
75 lines
2.6 KiB
Markdown
---
|
|
name: runtime_test
|
|
lang: cpp
|
|
domain: gamedev
|
|
description: "Exerciser end-to-end del runtime nucleo gamedev (issue 0072b). Inicializa sokol_gfx + audio (miniaudio) + input unificado + sprite_batch + camera 2D + game loop. Modo `--self-test` corre 60 frames y sale exit 0; sin args entra modo interactivo (3 sprites en gradient)."
|
|
tags: [imgui, sdl3, sokol, gamedev, smoke, runtime]
|
|
uses_functions:
|
|
- sokol_setup_cpp_gfx
|
|
- sprite_batch_cpp_gfx
|
|
- audio_engine_cpp_gamedev
|
|
- audio_play_cpp_gamedev
|
|
- input_unified_cpp_gamedev
|
|
- game_loop_cpp_gamedev
|
|
- camera_2d_cpp_gamedev
|
|
uses_types:
|
|
- Vec2_cpp_core
|
|
- Rect_cpp_core
|
|
- Color_cpp_core
|
|
framework: "imgui"
|
|
entry_point: "main.cpp"
|
|
dir_path: "apps/runtime_test"
|
|
repo_url: ""
|
|
e2e_checks:
|
|
- id: build_pc
|
|
cmd: "cmake --build build --target runtime_test -j"
|
|
timeout_s: 300
|
|
- id: self_test_pc
|
|
cmd: "./build/apps/runtime_test/runtime_test --self-test"
|
|
timeout_s: 30
|
|
severity: warning # requires display in CI
|
|
- id: build_wasm
|
|
cmd: "bash bash/functions/infra/build_wasm_cpp_app.sh runtime_test"
|
|
timeout_s: 600
|
|
severity: warning
|
|
- id: wasm_size_budget
|
|
cmd: "test -f build/wasm/runtime_test/runtime_test.wasm.gz && test $(stat -c%s build/wasm/runtime_test/runtime_test.wasm.gz) -lt 2097152"
|
|
severity: warning
|
|
---
|
|
|
|
# runtime_test
|
|
|
|
Test integrado del runtime nucleo gamedev. Si compila y corre, el stack 0072b esta verde.
|
|
|
|
## Modo --self-test
|
|
|
|
Corre 60 frames con audio init no-fatal (CI sin device de audio sigue pasando), 3 sprites animados, input procesando eventos vacios, salida exit 0.
|
|
|
|
```bash
|
|
./build/apps/runtime_test/runtime_test --self-test
|
|
```
|
|
|
|
## Modo interactivo
|
|
|
|
```bash
|
|
./build/apps/runtime_test/runtime_test
|
|
```
|
|
|
|
Pulsa Esc o Back (gamepad) para salir.
|
|
|
|
## Que ejercita
|
|
|
|
- `sokol_setup_cpp_gfx` — make_environment + make_swapchain.
|
|
- `sprite_batch_cpp_gfx` — 3 sprites por frame con tint distinto.
|
|
- `audio_engine_cpp_gamedev` — engine_init / engine_shutdown.
|
|
- `input_unified_cpp_gamedev` — input_begin_frame / input_process_event con SDL_Events.
|
|
- `camera_2d_cpp_gamedev` — view_proj_matrix.
|
|
- `game_loop_cpp_gamedev` — loop_run con fixed timestep + emscripten branch.
|
|
- Tipos `Vec2`, `Rect`, `Color` de `cpp/functions/core/math2d.h`.
|
|
|
|
## Notas
|
|
|
|
- NO carga assets de disco. Crea textura 2x2 blanca en GPU para alimentar `sprite_batch`. Asi el self-test es asset-free.
|
|
- Audio init es no-fatal: si no hay device, registra error y sigue. Permite correr en CI / WSL sin audio.
|
|
- Sin ImGui en este test (a diferencia de `engine_smoke`). Reduce binary size y aisla la validacion del runtime puro.
|