nova64 0.2.4 โ 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -8
- package/bin/nova64.js +165 -0
- package/dist/assets/console-CY_kygm3.js +14 -0
- package/dist/assets/console-CY_kygm3.js.map +1 -0
- package/dist/assets/main-l0sNRNKZ.js.map +1 -0
- package/dist/assets/sky/studio/nx.png +0 -0
- package/dist/assets/sky/studio/ny.png +0 -0
- package/dist/assets/sky/studio/nz.png +0 -0
- package/dist/assets/sky/studio/px.png +0 -0
- package/dist/assets/sky/studio/py.png +0 -0
- package/dist/assets/sky/studio/pz.png +0 -0
- package/dist/assets/vanilla-Dcuy32gi.js +2 -0
- package/dist/assets/vanilla-Dcuy32gi.js.map +1 -0
- package/dist/console.html +899 -0
- package/dist/docs/BENCHMARK.md +77 -0
- package/dist/docs/CHEATSHEET.md +255 -0
- package/dist/docs/EFFECTS_API_GUIDE.md +577 -0
- package/dist/docs/EFFECTS_QUICK_REFERENCE.md +331 -0
- package/dist/docs/FONT_CHARACTER_REFERENCE.md +219 -0
- package/dist/docs/FREE_GLB_ASSETS.md +330 -0
- package/dist/docs/FULLSCREEN_BUTTON_FEATURE.md +296 -0
- package/dist/docs/GAMEPAD_SUPPORT.md +348 -0
- package/dist/docs/GAME_IMPROVEMENTS.md +278 -0
- package/dist/docs/GAME_QUALITY_STATUS.md +300 -0
- package/dist/docs/MIGRATION_GUIDE.md +553 -0
- package/dist/docs/NOVA64_3D_API.md +356 -0
- package/dist/docs/NOVA64_API_REFERENCE.md +1406 -0
- package/dist/docs/NOVA64_UI_API.md +503 -0
- package/dist/docs/UI_SYSTEM_SUMMARY.md +445 -0
- package/dist/docs/VOXEL_ENGINE_GUIDE.md +662 -0
- package/dist/docs/VOXEL_QUICK_REFERENCE.md +386 -0
- package/dist/docs/api-3d.html +750 -0
- package/dist/docs/api-effects.html +385 -0
- package/dist/docs/api-improvements.md +121 -0
- package/dist/docs/api-skybox.html +407 -0
- package/dist/docs/api-sprites.html +321 -0
- package/dist/docs/api-voxel.html +337 -0
- package/dist/docs/api.html +543 -0
- package/dist/docs/assets.html +306 -0
- package/dist/docs/audio.html +340 -0
- package/dist/docs/blogs.html +286 -0
- package/dist/docs/collision.html +316 -0
- package/dist/docs/console.html +247 -0
- package/dist/docs/editor.html +297 -0
- package/dist/docs/font.html +247 -0
- package/dist/docs/framebuffer.html +247 -0
- package/dist/docs/fullscreen-button.html +297 -0
- package/dist/docs/gpu-systems.html +247 -0
- package/dist/docs/index.html +580 -0
- package/dist/docs/input.html +491 -0
- package/dist/docs/physics.html +311 -0
- package/dist/docs/screens.html +311 -0
- package/dist/docs/storage.html +311 -0
- package/dist/docs/textinput.html +332 -0
- package/dist/docs/ui.html +488 -0
- package/dist/examples/3d-advanced/code.js +695 -0
- package/dist/examples/adventure-comic-3d/code.js +342 -0
- package/dist/examples/audio-lab/code.js +150 -0
- package/dist/examples/boids-flocking/code.js +270 -0
- package/dist/examples/crystal-cathedral-3d/code.js +706 -0
- package/dist/examples/cyberpunk-city-3d/code.js +1383 -0
- package/dist/examples/demoscene/README.md +192 -0
- package/dist/examples/demoscene/code.js +1081 -0
- package/dist/examples/demoscene/meta.json +21 -0
- package/dist/examples/dungeon-crawler-3d/code.js +1117 -0
- package/dist/examples/f-zero-nova-3d/code.js +865 -0
- package/dist/examples/f-zero-nova-3d/code_old.js +1555 -0
- package/dist/examples/fps-demo-3d/code.js +744 -0
- package/dist/examples/game-of-life-3d/code.js +338 -0
- package/dist/examples/generative-art/code.js +632 -0
- package/dist/examples/hello-3d/code.js +325 -0
- package/dist/examples/hello-skybox/code.js +183 -0
- package/dist/examples/hello-world/code.js +19 -0
- package/dist/examples/input-showcase/code.js +109 -0
- package/dist/examples/instancing-demo/code.js +315 -0
- package/dist/examples/minecraft-demo/code.js +387 -0
- package/dist/examples/model-viewer-3d/code.js +114 -0
- package/dist/examples/mystical-realm-3d/code.js +1203 -0
- package/dist/examples/nature-explorer-3d/code.js +1318 -0
- package/dist/examples/particles-demo/code.js +522 -0
- package/dist/examples/pbr-showcase/code.js +140 -0
- package/dist/examples/physics-demo-3d/code.js +948 -0
- package/dist/examples/screen-demo/code.js +267 -0
- package/dist/examples/shooter-demo-3d/code.js +1286 -0
- package/dist/examples/space-combat-3d/IMPLEMENTATION_SUMMARY.md +109 -0
- package/dist/examples/space-combat-3d/README.md +135 -0
- package/dist/examples/space-combat-3d/code.js +1332 -0
- package/dist/examples/space-harrier-3d/code.js +923 -0
- package/dist/examples/star-fox-nova-3d/code.js +1116 -0
- package/dist/examples/star-fox-nova-3d/code_backup.js +410 -0
- package/dist/examples/star-fox-nova-3d/code_broken.js +1821 -0
- package/dist/examples/storage-quest/code.js +209 -0
- package/dist/examples/strider-demo-3d/IMPROVEMENT_OPTIONS.md +285 -0
- package/dist/examples/strider-demo-3d/cache-test.html +132 -0
- package/dist/examples/strider-demo-3d/code-fixed.js +582 -0
- package/dist/examples/strider-demo-3d/code-old.js +1537 -0
- package/dist/examples/strider-demo-3d/code.js +1462 -0
- package/dist/examples/strider-demo-3d/code.js.bak2 +1169 -0
- package/dist/examples/strider-demo-3d/fix-game.sh +53 -0
- package/dist/examples/super-plumber-64/README.md +128 -0
- package/dist/examples/super-plumber-64/code.js +1185 -0
- package/dist/examples/super-plumber-64/index.html +88 -0
- package/dist/examples/test-2d-overlay/code.js +32 -0
- package/dist/examples/test-font/code.js +51 -0
- package/dist/examples/test-minimal/code.js +21 -0
- package/dist/examples/ui-demo/code.js +306 -0
- package/dist/examples/wing-commander-space/README.md +180 -0
- package/dist/examples/wing-commander-space/code.js +1285 -0
- package/dist/examples/wizardry-3d/CHANGELOG.md +366 -0
- package/dist/examples/wizardry-3d/code.js +3928 -0
- package/dist/index.html +666 -0
- package/dist/os9-shell/assets/index-DIHfrTaW.css +1 -0
- package/dist/os9-shell/assets/index-KchE_ngx.js +483 -0
- package/dist/os9-shell/assets/index-KchE_ngx.js.map +1 -0
- package/dist/os9-shell/index.html +23 -0
- package/dist/os9-shell/nova-icon.svg +12 -0
- package/index.html +6 -1
- package/package.json +37 -32
- package/public/assets/sky/studio/nx.png +0 -0
- package/public/assets/sky/studio/ny.png +0 -0
- package/public/assets/sky/studio/nz.png +0 -0
- package/public/assets/sky/studio/px.png +0 -0
- package/public/assets/sky/studio/py.png +0 -0
- package/public/assets/sky/studio/pz.png +0 -0
- package/public/os9-shell/assets/index-KchE_ngx.js +483 -0
- package/public/os9-shell/assets/index-KchE_ngx.js.map +1 -0
- package/public/os9-shell/index.html +10 -1
- package/runtime/api-2d.js +301 -21
- package/runtime/api-3d/pbr.js +45 -1
- package/runtime/api-3d.js +1 -0
- package/runtime/api-effects.js +90 -3
- package/runtime/api-gameutils.js +476 -0
- package/runtime/api-generative.js +610 -0
- package/runtime/api-skybox.js +54 -0
- package/runtime/api-voxel.js +139 -28
- package/runtime/gpu-threejs.js +13 -9
- package/runtime/ui.js +2 -2
- package/src/main.js +24 -1
- package/public/os9-shell/assets/index-B1Uvacma.js +0 -32825
- package/public/os9-shell/assets/index-B1Uvacma.js.map +0 -1
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
# Nova64 Effects Quick Reference
|
|
2
|
+
|
|
3
|
+
## ๐ Quick Start
|
|
4
|
+
|
|
5
|
+
### Enable Bloom (Glow Effects)
|
|
6
|
+
|
|
7
|
+
```javascript
|
|
8
|
+
enableBloom(); // Use defaults
|
|
9
|
+
enableBloom(1.5, 0.5, 0.85); // Custom: strength, radius, threshold
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### Enable Anti-Aliasing
|
|
13
|
+
|
|
14
|
+
```javascript
|
|
15
|
+
enableFXAA(); // Smooth edges
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## ๐จ Custom Shaders
|
|
21
|
+
|
|
22
|
+
### Holographic
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
const holo = createShaderMaterial('holographic', {
|
|
26
|
+
color: new THREE.Color(0x00ffff), // Cyan
|
|
27
|
+
scanlineSpeed: 3.0,
|
|
28
|
+
glitchAmount: 0.15,
|
|
29
|
+
opacity: 0.7,
|
|
30
|
+
});
|
|
31
|
+
const cube = createCube(2, 0xffffff, [0, 0, -5]);
|
|
32
|
+
getMesh(cube).material = holo.material;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Energy Shield
|
|
36
|
+
|
|
37
|
+
```javascript
|
|
38
|
+
const shield = createShaderMaterial('shield', {
|
|
39
|
+
color: new THREE.Color(0x0088ff), // Blue
|
|
40
|
+
opacity: 0.5,
|
|
41
|
+
});
|
|
42
|
+
const sphere = createSphere(3, 0xffffff, [0, 0, 0], 32);
|
|
43
|
+
getMesh(sphere).material = shield.material;
|
|
44
|
+
|
|
45
|
+
// Trigger hit effect
|
|
46
|
+
updateShaderUniform(shield.id, 'hitPosition', new THREE.Vector3(x, y, z));
|
|
47
|
+
updateShaderUniform(shield.id, 'hitStrength', 1.0);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Water
|
|
51
|
+
|
|
52
|
+
```javascript
|
|
53
|
+
const water = createShaderMaterial('water', {
|
|
54
|
+
color: new THREE.Color(0x0088ff),
|
|
55
|
+
waveSpeed: 1.0,
|
|
56
|
+
waveHeight: 0.3,
|
|
57
|
+
transparency: 0.8,
|
|
58
|
+
});
|
|
59
|
+
const plane = createPlane(50, 50, [0, -1, 0]);
|
|
60
|
+
getMesh(plane).material = water.material;
|
|
61
|
+
getMesh(plane).rotation.x = -Math.PI / 2; // Horizontal
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Fire/Plasma
|
|
65
|
+
|
|
66
|
+
```javascript
|
|
67
|
+
const fire = createShaderMaterial('fire', {
|
|
68
|
+
color1: new THREE.Color(0xff4400), // Orange
|
|
69
|
+
color2: new THREE.Color(0xffff00), // Yellow
|
|
70
|
+
intensity: 1.5,
|
|
71
|
+
speed: 2.0,
|
|
72
|
+
});
|
|
73
|
+
const plane = createPlane(2, 3, [0, 1.5, 0]);
|
|
74
|
+
getMesh(plane).material = fire.material;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## ๐ฅ Particles
|
|
80
|
+
|
|
81
|
+
### Explosion
|
|
82
|
+
|
|
83
|
+
```javascript
|
|
84
|
+
const explosion = createParticleSystem(500, {
|
|
85
|
+
color: 0xff4400, // Orange
|
|
86
|
+
size: 0.3,
|
|
87
|
+
speed: 10.0,
|
|
88
|
+
lifetime: 1.5,
|
|
89
|
+
spread: 0.1,
|
|
90
|
+
gravity: -2.0,
|
|
91
|
+
});
|
|
92
|
+
explosion.position.set(x, y, z);
|
|
93
|
+
|
|
94
|
+
export function update(dt) {
|
|
95
|
+
updateParticles(explosion, dt);
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Smoke
|
|
100
|
+
|
|
101
|
+
```javascript
|
|
102
|
+
const smoke = createParticleSystem(500, {
|
|
103
|
+
color: 0x888888, // Gray
|
|
104
|
+
size: 0.5,
|
|
105
|
+
speed: 1.0,
|
|
106
|
+
lifetime: 3.0,
|
|
107
|
+
spread: 0.5,
|
|
108
|
+
gravity: 1.0, // Rises
|
|
109
|
+
});
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Sparks
|
|
113
|
+
|
|
114
|
+
```javascript
|
|
115
|
+
const sparks = createParticleSystem(200, {
|
|
116
|
+
color: 0xffff00, // Yellow
|
|
117
|
+
size: 0.1,
|
|
118
|
+
speed: 8.0,
|
|
119
|
+
lifetime: 0.5,
|
|
120
|
+
spread: 0.2,
|
|
121
|
+
gravity: -5.0, // Falls fast
|
|
122
|
+
});
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Magic Effect
|
|
126
|
+
|
|
127
|
+
```javascript
|
|
128
|
+
const magic = createParticleSystem(300, {
|
|
129
|
+
color: 0xff00ff, // Purple
|
|
130
|
+
size: 0.15,
|
|
131
|
+
speed: 2.0,
|
|
132
|
+
lifetime: 2.5,
|
|
133
|
+
spread: 1.0,
|
|
134
|
+
gravity: 0.5, // Slow rise
|
|
135
|
+
});
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## ๐ฎ Complete Game Template
|
|
141
|
+
|
|
142
|
+
```javascript
|
|
143
|
+
let playerShield, engineTrail, shieldId;
|
|
144
|
+
|
|
145
|
+
export async function init() {
|
|
146
|
+
// Enable effects
|
|
147
|
+
enableBloom(1.5, 0.5, 0.8);
|
|
148
|
+
enableFXAA();
|
|
149
|
+
|
|
150
|
+
// Create shield
|
|
151
|
+
const shield = createShaderMaterial('shield', {
|
|
152
|
+
color: new THREE.Color(0x00ffff),
|
|
153
|
+
opacity: 0.3,
|
|
154
|
+
});
|
|
155
|
+
playerShield = createSphere(2, 0xffffff, [0, 0, 0], 32);
|
|
156
|
+
getMesh(playerShield).material = shield.material;
|
|
157
|
+
shieldId = shield.id;
|
|
158
|
+
|
|
159
|
+
// Engine particles
|
|
160
|
+
engineTrail = createParticleSystem(500, {
|
|
161
|
+
color: 0x0088ff,
|
|
162
|
+
size: 0.1,
|
|
163
|
+
speed: 3.0,
|
|
164
|
+
lifetime: 1.0,
|
|
165
|
+
spread: 0.3,
|
|
166
|
+
gravity: 0,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function update(dt) {
|
|
171
|
+
// Update particles
|
|
172
|
+
updateParticles(engineTrail, dt);
|
|
173
|
+
|
|
174
|
+
// Follow player
|
|
175
|
+
engineTrail.position.set(player.x, player.y, player.z + 2);
|
|
176
|
+
|
|
177
|
+
// Dynamic bloom
|
|
178
|
+
setBloomStrength(1.0 + player.speed * 0.5);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function onHit(position) {
|
|
182
|
+
updateShaderUniform(shieldId, 'hitPosition', position);
|
|
183
|
+
updateShaderUniform(shieldId, 'hitStrength', 1.0);
|
|
184
|
+
|
|
185
|
+
setTimeout(() => {
|
|
186
|
+
updateShaderUniform(shieldId, 'hitStrength', 0.0);
|
|
187
|
+
}, 300);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function createExplosion(pos) {
|
|
191
|
+
const exp = createParticleSystem(300, {
|
|
192
|
+
color: 0xff4400,
|
|
193
|
+
size: 0.3,
|
|
194
|
+
speed: 10.0,
|
|
195
|
+
lifetime: 1.5,
|
|
196
|
+
gravity: 0,
|
|
197
|
+
});
|
|
198
|
+
exp.position.copy(pos);
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## โก Performance Tips
|
|
205
|
+
|
|
206
|
+
### Bloom
|
|
207
|
+
|
|
208
|
+
```javascript
|
|
209
|
+
// Good - only bright objects glow
|
|
210
|
+
setBloomThreshold(0.85);
|
|
211
|
+
|
|
212
|
+
// Bad - performance hit
|
|
213
|
+
setBloomThreshold(0.0);
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Particles
|
|
217
|
+
|
|
218
|
+
```javascript
|
|
219
|
+
// Mobile: 500 max
|
|
220
|
+
const particles = createParticleSystem(500, {...});
|
|
221
|
+
|
|
222
|
+
// Desktop: 2000 max
|
|
223
|
+
const particles = createParticleSystem(2000, {...});
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Shaders
|
|
227
|
+
|
|
228
|
+
```javascript
|
|
229
|
+
// Reuse materials!
|
|
230
|
+
const holoPink = createShaderMaterial('holographic', {
|
|
231
|
+
color: new THREE.Color(0xff00ff),
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
// Use on multiple objects
|
|
235
|
+
getMesh(cube1).material = holoPink.material;
|
|
236
|
+
getMesh(cube2).material = holoPink.material;
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## ๐ Common Issues
|
|
242
|
+
|
|
243
|
+
### No Bloom Visible
|
|
244
|
+
|
|
245
|
+
```javascript
|
|
246
|
+
// Make objects emissive
|
|
247
|
+
const material = createN64Material({
|
|
248
|
+
color: 0xff0000,
|
|
249
|
+
emissive: 0xff0000,
|
|
250
|
+
emissiveIntensity: 1.0,
|
|
251
|
+
});
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Particles Not Moving
|
|
255
|
+
|
|
256
|
+
```javascript
|
|
257
|
+
// Must call every frame!
|
|
258
|
+
export function update(dt) {
|
|
259
|
+
updateParticles(myParticles, dt);
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Shader Too Dark
|
|
264
|
+
|
|
265
|
+
```javascript
|
|
266
|
+
// Increase opacity
|
|
267
|
+
const shader = createShaderMaterial('holographic', {
|
|
268
|
+
opacity: 1.0, // Full opacity
|
|
269
|
+
});
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## ๐ Effect Costs
|
|
275
|
+
|
|
276
|
+
| Effect | FPS Cost | Best For |
|
|
277
|
+
| ---------------- | -------- | ------------------ |
|
|
278
|
+
| Bloom | ~5-10% | Glow, neon, energy |
|
|
279
|
+
| FXAA | ~2% | Always recommended |
|
|
280
|
+
| Holographic | ~2% | UI, holograms |
|
|
281
|
+
| Shield | ~2% | Force fields |
|
|
282
|
+
| Water | ~5% | Oceans, liquids |
|
|
283
|
+
| Fire | ~8% | Fire, explosions |
|
|
284
|
+
| Particles (500) | ~2% | Effects |
|
|
285
|
+
| Particles (2000) | ~10% | Heavy effects |
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## ๐ฏ Use Cases
|
|
290
|
+
|
|
291
|
+
### Sci-Fi
|
|
292
|
+
|
|
293
|
+
```javascript
|
|
294
|
+
enableBloom(2.0, 0.8, 0.6); // Bright neon glow
|
|
295
|
+
enableGlitch(0.3); // Digital distortion
|
|
296
|
+
const holo = createShaderMaterial('holographic', {...});
|
|
297
|
+
const shield = createShaderMaterial('shield', {...});
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Fantasy
|
|
301
|
+
|
|
302
|
+
```javascript
|
|
303
|
+
enableBloom(1.2, 0.5, 0.9); // Subtle magic glow
|
|
304
|
+
const water = createShaderMaterial('water', {...});
|
|
305
|
+
const magic = createParticleSystem(300, {...});
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Damage Feedback
|
|
309
|
+
|
|
310
|
+
```javascript
|
|
311
|
+
// Glitch + shake + chromatic aberration on hit
|
|
312
|
+
enableGlitch(0.5);
|
|
313
|
+
enableChromaticAberration(0.008);
|
|
314
|
+
// Fade out over time in update()
|
|
315
|
+
setGlitchIntensity(glitchTimer * 2.0);
|
|
316
|
+
// When timer expires
|
|
317
|
+
disableGlitch();
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Modern
|
|
321
|
+
|
|
322
|
+
```javascript
|
|
323
|
+
enableFXAA(); // Clean visuals
|
|
324
|
+
const rain = createParticleSystem(2000, {
|
|
325
|
+
gravity: -8.0, // Falling rain
|
|
326
|
+
});
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
For complete docs, see **EFFECTS_API_GUIDE.md**
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# Nova64 Bitmap Font - Character Reference
|
|
2
|
+
|
|
3
|
+
## Complete Character Set (95+ Characters)
|
|
4
|
+
|
|
5
|
+
### Uppercase Letters (A-Z)
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Lowercase Letters (a-z)
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
abcdefghijklmnopqrstuvwxyz
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Numbers (0-9)
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
0123456789
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Basic Punctuation
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
! ? . , : ; ' " - _ /
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Brackets & Parentheses
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
( ) [ ] { } < >
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Mathematical & Logic Symbols
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
= + - * / % ^ ~
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Special Symbols
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
& $ # @ ` | \
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Arrow Characters (Unicode โ ASCII Art)
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
โ โ โ โ โ โ
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Whitespace
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
(space character)
|
|
57
|
+
(newline \n)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Emoji Handling
|
|
61
|
+
|
|
62
|
+
### Automatically Replaced Emojis
|
|
63
|
+
|
|
64
|
+
These emojis are automatically converted when rendering:
|
|
65
|
+
|
|
66
|
+
| Emoji | Replacement | Description |
|
|
67
|
+
| ----- | ----------- | ------------------ |
|
|
68
|
+
| ๐ฎ | (removed) | Game controller |
|
|
69
|
+
| ๐ | (removed) | Rocket |
|
|
70
|
+
| ๐ | (removed) | Checkered flag |
|
|
71
|
+
| ๐๏ธ | (removed) | Classical building |
|
|
72
|
+
| ๐ฐ | (removed) | Castle |
|
|
73
|
+
| ๐ | (removed) | Night cityscape |
|
|
74
|
+
| ๐ก๏ธ | (removed) | Shield |
|
|
75
|
+
| ๐ฑ๏ธ | (removed) | Mouse |
|
|
76
|
+
| ๐ฅ๏ธ | (removed) | Desktop |
|
|
77
|
+
| ๐ฎ | \* | Crystal ball |
|
|
78
|
+
| โก | \* | Lightning |
|
|
79
|
+
| โจ | \* | Sparkles |
|
|
80
|
+
| โ
| + | Check mark |
|
|
81
|
+
| ๐ | o | Radio button |
|
|
82
|
+
| ๐ฏ | o | Target |
|
|
83
|
+
| โ๏ธ | \* | Gear |
|
|
84
|
+
|
|
85
|
+
### Unsupported Characters
|
|
86
|
+
|
|
87
|
+
Any character not in the font will be:
|
|
88
|
+
|
|
89
|
+
- Silently skipped (not rendered)
|
|
90
|
+
- Never shows as "?"
|
|
91
|
+
|
|
92
|
+
## Usage Examples
|
|
93
|
+
|
|
94
|
+
### Print Text
|
|
95
|
+
|
|
96
|
+
```javascript
|
|
97
|
+
// Basic text
|
|
98
|
+
print('Hello World!', 100, 100, rgba8(255, 255, 255, 255));
|
|
99
|
+
|
|
100
|
+
// Uppercase
|
|
101
|
+
print('GAME OVER', 200, 150, rgba8(255, 0, 0, 255));
|
|
102
|
+
|
|
103
|
+
// Lowercase
|
|
104
|
+
print('score: 1234', 50, 50, rgba8(255, 255, 0, 255));
|
|
105
|
+
|
|
106
|
+
// Mixed case
|
|
107
|
+
print('Press Space to Start', 150, 200, rgba8(200, 200, 200, 255));
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### With Arrows
|
|
111
|
+
|
|
112
|
+
```javascript
|
|
113
|
+
// Control instructions
|
|
114
|
+
print('โโ Move โโ Strafe', 20, 340, rgba8(255, 255, 255, 255));
|
|
115
|
+
|
|
116
|
+
// Menu navigation
|
|
117
|
+
print('โ Back Select โ', 200, 300, rgba8(200, 200, 200, 255));
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### With Special Symbols
|
|
121
|
+
|
|
122
|
+
```javascript
|
|
123
|
+
// Game stats
|
|
124
|
+
print('Health: [##########] 100%', 20, 20, rgba8(0, 255, 0, 255));
|
|
125
|
+
print('Score: 1,234,567 pts', 20, 40, rgba8(255, 255, 0, 255));
|
|
126
|
+
print('Ammo: 45/100 rounds', 20, 60, rgba8(255, 150, 0, 255));
|
|
127
|
+
|
|
128
|
+
// Math expressions
|
|
129
|
+
print('Speed: 50% (+10% bonus)', 20, 80, rgba8(100, 200, 255, 255));
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### With Emojis (Auto-cleaned)
|
|
133
|
+
|
|
134
|
+
```javascript
|
|
135
|
+
// These work automatically - emojis are stripped/replaced
|
|
136
|
+
print('๐ STAR FOX', 100, 50, rgba8(255, 255, 255, 255));
|
|
137
|
+
// Renders as: "STAR FOX"
|
|
138
|
+
|
|
139
|
+
print('โก BOOST ACTIVE', 100, 70, rgba8(255, 255, 0, 255));
|
|
140
|
+
// Renders as: "* BOOST ACTIVE"
|
|
141
|
+
|
|
142
|
+
print('๐ฎ Ready Player One', 100, 90, rgba8(0, 255, 0, 255));
|
|
143
|
+
// Renders as: "Ready Player One"
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Font Specifications
|
|
147
|
+
|
|
148
|
+
- **Font Type**: Monospace Bitmap Font
|
|
149
|
+
- **Character Size**: 5ร7 pixels per character
|
|
150
|
+
- **Spacing**: 1 pixel between characters
|
|
151
|
+
- **Format**: ASCII art patterns stored as string arrays
|
|
152
|
+
- **Color**: Supports any RGBA color via rgba8()
|
|
153
|
+
- **Scaling**: Supports integer scaling (1x, 2x, 3x, etc.)
|
|
154
|
+
|
|
155
|
+
## Technical Details
|
|
156
|
+
|
|
157
|
+
### Character Rendering
|
|
158
|
+
|
|
159
|
+
1. Text is cleaned via `cleanText()` function
|
|
160
|
+
2. Unknown emojis are replaced or removed
|
|
161
|
+
3. Each character is looked up in GLYPHS map
|
|
162
|
+
4. Unknown ASCII chars fall back to "?" glyph
|
|
163
|
+
5. Pixels are drawn using framebuffer pset()
|
|
164
|
+
|
|
165
|
+
### Performance
|
|
166
|
+
|
|
167
|
+
- O(n) text cleaning where n = string length
|
|
168
|
+
- O(nรwรh) rendering where n = chars, wรh = 5ร7
|
|
169
|
+
- Extremely fast for typical game text
|
|
170
|
+
- No memory allocation during rendering
|
|
171
|
+
|
|
172
|
+
## Font Limitations
|
|
173
|
+
|
|
174
|
+
### Not Supported
|
|
175
|
+
|
|
176
|
+
- โ Accented characters (รฉ, รฑ, รผ, etc.)
|
|
177
|
+
- โ Non-Latin scripts (Arabic, Chinese, Cyrillic, etc.)
|
|
178
|
+
- โ Proportional spacing
|
|
179
|
+
- โ Kerning
|
|
180
|
+
- โ Ligatures
|
|
181
|
+
- โ Most Unicode symbols beyond what's listed
|
|
182
|
+
|
|
183
|
+
### Workarounds
|
|
184
|
+
|
|
185
|
+
- Use ASCII equivalents when possible
|
|
186
|
+
- Remove unsupported chars (automatic)
|
|
187
|
+
- Use ALL CAPS for emphasis instead of bold
|
|
188
|
+
- Use symbols creatively: \* for stars, + for health, etc.
|
|
189
|
+
|
|
190
|
+
## Best Practices
|
|
191
|
+
|
|
192
|
+
### Do โ
|
|
193
|
+
|
|
194
|
+
```javascript
|
|
195
|
+
print('SCORE: 12345', x, y, color); // Clear and readable
|
|
196
|
+
print('Health: [####------] 40%', x, y, color); // Creative use of chars
|
|
197
|
+
print('Press X to Fire!', x, y, color); // Uppercase for keys
|
|
198
|
+
print('โ Back Continue โ', x, y, color); // Arrow navigation
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Avoid โ
|
|
202
|
+
|
|
203
|
+
```javascript
|
|
204
|
+
print('Pokรฉmon', x, y, color); // Accented chars not supported
|
|
205
|
+
print('ๆฅๆฌ่ช', x, y, color); // Non-Latin scripts not supported
|
|
206
|
+
print(' ', x, y, color); // Won't render properly
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Summary
|
|
210
|
+
|
|
211
|
+
The Nova64 bitmap font provides **95+ characters** covering:
|
|
212
|
+
|
|
213
|
+
- Complete English alphabet (upper & lower case)
|
|
214
|
+
- All numbers and common punctuation
|
|
215
|
+
- Mathematical operators and special symbols
|
|
216
|
+
- Unicode arrows for game controls
|
|
217
|
+
- Smart emoji handling to prevent rendering issues
|
|
218
|
+
|
|
219
|
+
**Result**: No more "?" characters in your games! ๐ฎ
|