summaryrefslogtreecommitdiff
path: root/doc/HOWTO.md
blob: 9e32a8645a10adc6d3106173d3c7c8848a340c7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# How To

Quick reference for common tasks.

---

## Building

### Debug Build
```bash
cmake -S . -B build
cmake --build build -j4
./build/demo64k
```
Options: `--fullscreen`, `--resolution WxH`, `--seek TIME`, `--hot-reload`

### Production Builds
```bash
# Size-optimized (development)
cmake -B build -DDEMO_SIZE_OPT=ON && cmake --build build -j4

# 64k target (full checks, no debug)
cmake -B build -DDEMO_STRIP_ALL=ON && cmake --build build -j4

# Final release (no checks, absolute minimum)
./scripts/build_final.sh
```

### Developer Build
```bash
cmake -B build -DDEMO_BUILD_TESTS=ON -DDEMO_BUILD_TOOLS=ON
cmake --build build -j4
```

### Size Measurement
```bash
./scripts/measure_size.sh
```
Measures demo vs external library size. See `doc/SIZE_MEASUREMENT.md`.

---

## Testing

```bash
cmake -B build -DDEMO_BUILD_TESTS=ON
cmake --build build -j4
cd build && ctest
```

---

## Timeline

Edit `assets/demo.seq`:
```text
SEQUENCE 0.0 0
  EFFECT HeptagonEffect 0.0 60.0 0
```
Rebuild to apply. See `doc/SEQUENCE.md`.

---

## Audio

```cpp
#include "audio/audio_engine.h"

audio_init();
static AudioEngine g_audio_engine;
g_audio_engine.init();
g_audio_engine.update(music_time);
g_audio_engine.shutdown();
audio_shutdown();
```
See `doc/TRACKER.md` for music system.

---

## Assets

Edit `assets/final/demo_assets.txt`, then:
```bash
./scripts/gen_assets.sh
```
See `doc/ASSET_SYSTEM.md`.

---

## Additional Documentation

- **Build System:** `doc/BUILD.md` - Multi-platform, size optimization
- **Tools:** `doc/TOOLS_REFERENCE.md` - spectool, coverage, Windows cross-compile
- **Shaders:** `doc/SEQUENCE.md` - Timeline format, shader parameters
- **3D:** `doc/3D.md` - Hybrid rendering, scene format
- **Hot Reload:** `doc/HOT_RELOAD.md` - Debug file watching