-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoverview.html
More file actions
480 lines (445 loc) · 16.3 KB
/
Copy pathoverview.html
File metadata and controls
480 lines (445 loc) · 16.3 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Planet Blupi — Game Overview — Planet Blupi Docs</title>
<style>
:root {
--bg: #0d1117;
--sidebar-bg:#161b22;
--border: #30363d;
--text: #c9d1d9;
--heading: #e6edf3;
--link: #58a6ff;
--link-hover:#79c0ff;
--code-bg: #161b22;
--code-text: #f0f6fc;
--pre-bg: #161b22;
--table-hd: #21262d;
--table-alt: #161b22;
--accent: #f78166;
--sidebar-w: 280px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.65;
display: flex;
min-height: 100vh;
}
/* ── Sidebar ─────────────────────────────────────────── */
#sidebar {
width: var(--sidebar-w);
min-width: var(--sidebar-w);
background: var(--sidebar-bg);
border-right: 1px solid var(--border);
position: sticky;
top: 0;
height: 100vh;
overflow-y: auto;
padding: 0 0 2rem 0;
flex-shrink: 0;
}
#sidebar .logo {
display: block;
padding: 1rem 1rem 0.75rem 1rem;
border-bottom: 1px solid var(--border);
text-decoration: none;
font-weight: 700;
font-size: 0.95rem;
color: var(--heading);
letter-spacing: 0.02em;
}
#sidebar .logo span { color: var(--accent); }
#sidebar nav { padding: 0.5rem 0; }
#sidebar .section-title {
display: block;
font-size: 0.7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: #6e7681;
padding: 0.85rem 1rem 0.2rem 1rem;
}
#sidebar a.nav-link {
display: block;
padding: 0.28rem 1rem 0.28rem 1.3rem;
font-size: 0.83rem;
color: #8b949e;
text-decoration: none;
border-left: 2px solid transparent;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: color 0.15s, border-color 0.15s, background 0.15s;
}
#sidebar a.nav-link:hover {
color: var(--link-hover);
background: rgba(88,166,255,0.06);
border-left-color: var(--link);
}
#sidebar a.nav-link.active {
color: var(--link);
border-left-color: var(--accent);
background: rgba(247,129,102,0.08);
font-weight: 600;
}
#sidebar a.nav-link.top-link {
font-size: 0.85rem;
color: #adbac7;
padding-left: 1rem;
font-weight: 600;
}
/* ── Main content ────────────────────────────────────── */
#main {
flex: 1;
min-width: 0;
padding: 2.5rem 3rem 4rem 3rem;
max-width: 960px;
}
/* ── Breadcrumb ──────────────────────────────────────── */
.breadcrumb {
font-size: 0.78rem;
color: #6e7681;
margin-bottom: 1.5rem;
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
align-items: center;
}
.breadcrumb a { color: var(--link); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: #6e7681; }
/* ── Typography ──────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
color: var(--heading);
font-weight: 600;
line-height: 1.3;
margin-top: 1.8em;
margin-bottom: 0.6em;
border-bottom: 1px solid var(--border);
padding-bottom: 0.3em;
}
h1 { font-size: 1.9rem; margin-top: 0; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; border-bottom: none; }
h4 { font-size: 1rem; border-bottom: none; color: var(--text); }
p { margin: 0.75em 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--link-hover); }
ul, ol { padding-left: 1.5em; margin: 0.5em 0; }
li { margin: 0.25em 0; }
/* ── Code ────────────────────────────────────────────── */
code {
background: var(--code-bg);
color: var(--code-text);
padding: 0.15em 0.45em;
border-radius: 4px;
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
font-size: 0.85em;
border: 1px solid var(--border);
}
pre {
background: var(--pre-bg);
border: 1px solid var(--border);
border-radius: 6px;
padding: 1em 1.2em;
overflow-x: auto;
margin: 1em 0;
line-height: 1.55;
}
pre code {
background: transparent;
border: none;
padding: 0;
font-size: 0.83rem;
color: #e6edf3;
}
/* ── Tables ──────────────────────────────────────────── */
table {
border-collapse: collapse;
width: 100%;
margin: 1em 0;
font-size: 0.88rem;
overflow-x: auto;
display: block;
}
thead tr { background: var(--table-hd); }
th {
border: 1px solid var(--border);
padding: 0.5em 0.85em;
text-align: left;
color: var(--heading);
font-weight: 600;
white-space: nowrap;
}
td {
border: 1px solid var(--border);
padding: 0.45em 0.85em;
vertical-align: top;
}
tbody tr:nth-child(even) { background: var(--table-alt); }
tbody tr:hover { background: #1c2128; }
/* ── Blockquote ──────────────────────────────────────── */
blockquote {
border-left: 3px solid var(--accent);
margin: 1em 0;
padding: 0.5em 1em;
background: rgba(247,129,102,0.07);
border-radius: 0 4px 4px 0;
color: #adbac7;
font-style: italic;
}
/* ── HR ──────────────────────────────────────────────── */
hr {
border: none;
border-top: 1px solid var(--border);
margin: 2em 0;
}
/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
body { flex-direction: column; }
#sidebar {
width: 100%;
height: auto;
position: relative;
border-right: none;
border-bottom: 1px solid var(--border);
}
#main { padding: 1.5rem 1.2rem 3rem 1.2rem; }
}
/* ── Scroll ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }
</style>
</head>
<body>
<aside id="sidebar">
<a class="logo" href="index.html">
<span>●</span> Planet Blupi Docs
</a>
<nav>
<a class="nav-link top-link" href="index.html">⌂ Index</a>
<span class="section-title">Overview</span>
<a class="nav-link active" href="overview.html">Overview</a>
<a class="nav-link " href="history.html">History & Speedy Blupi</a>
<span class="section-title">Architecture</span>
<a class="nav-link " href="architecture/overview.html">System Architecture</a>
<a class="nav-link " href="architecture/source-files.html">Source Files Reference</a>
<span class="section-title">Engine Internals</span>
<a class="nav-link " href="engine/data-structures.html">Data Structures</a>
<a class="nav-link " href="engine/game-phases.html">Game Phases</a>
<a class="nav-link " href="engine/rendering.html">Rendering</a>
<a class="nav-link " href="engine/pathfinding.html">Pathfinding (A*)</a>
<a class="nav-link " href="engine/fog-of-war.html">Fog of War</a>
<a class="nav-link " href="engine/minimap.html">Minimap</a>
<a class="nav-link " href="engine/demo.html">Demo Recording</a>
<a class="nav-link " href="engine/undo.html">Undo System</a>
<span class="section-title">World (Map)</span>
<a class="nav-link " href="world/file-format.html">World File Format</a>
<a class="nav-link " href="world/grid.html">World Grid</a>
<a class="nav-link " href="world/terrain.html">Terrain & Auto-tiling</a>
<a class="nav-link " href="world/objects.html">Object Layer</a>
<span class="section-title">Characters</span>
<a class="nav-link " href="characters/overview.html">Character Overview</a>
<a class="nav-link " href="characters/blupi.html">Player (Blupi)</a>
<a class="nav-link " href="characters/enemies.html">Enemies</a>
<a class="nav-link " href="characters/vehicles.html">Vehicles</a>
<a class="nav-link " href="characters/actions.html">ACTION_* Codes</a>
<a class="nav-link " href="characters/goals.html">GOAL_* Interpreter</a>
<span class="section-title">Gameplay</span>
<a class="nav-link " href="gameplay/win-conditions.html">Win Conditions</a>
<a class="nav-link " href="gameplay/toolbar.html">Toolbar Buttons</a>
<a class="nav-link " href="gameplay/directions.html">Directions</a>
<a class="nav-link " href="gameplay/skill-levels.html">Skill Levels</a>
<a class="nav-link " href="gameplay/regions.html">Regions / Themes</a>
<a class="nav-link " href="gameplay/cheat-codes.html">Cheat Codes</a>
<span class="section-title">Assets</span>
<a class="nav-link " href="assets/images.html">Image Assets</a>
<a class="nav-link " href="assets/sounds.html">Sound Effects</a>
<a class="nav-link " href="assets/music.html">Music Tracks</a>
<a class="nav-link " href="assets/data-files.html">Data Files</a>
<a class="nav-link " href="assets/movies.html">Movies</a>
<span class="section-title">User Interface</span>
<a class="nav-link " href="ui/messages.html">Windows Messages</a>
<a class="nav-link " href="ui/cursor-sprites.html">Cursor Sprites</a>
<a class="nav-link " href="ui/statistics.html">Statistics Panel</a>
<a class="nav-link " href="ui/error-codes.html">Error Codes</a>
<span class="section-title">Platforms</span>
<a class="nav-link " href="platform/build.html">Build System</a>
<a class="nav-link " href="platform/config.html">Configuration</a>
<a class="nav-link " href="platform/localisation.html">Localisation</a>
<a class="nav-link " href="platform/web.html">Web / Emscripten</a>
<span class="section-title">Speedy Blupi Reference</span>
<a class="nav-link " href="speedy-blupi/overview.html">Relation to Speedy Blupi</a>
<a class="nav-link " href="speedy-blupi/actions-h.html">actions.h Reference</a>
</nav>
</aside>
<main id="main">
<div class="breadcrumb"><a href="index.html">Home</a></div>
<h1 id="planet-blupi-game-overview">Planet Blupi — Game Overview</h1>
<h2 id="what-is-planet-blupi">What Is Planet Blupi?</h2>
<p><strong>Planet Blupi</strong> is a real-time strategy / puzzle-adventure game developed by
Swiss company <strong>Epsitec SA</strong>, originally released in <strong>1997</strong> for Windows.
Epsitec later open-sourced the game.</p>
<p>The player controls one or more <strong>Blupi</strong> — small yellow creatures — on a
<strong>200×200 isometric grid</strong>. The goal is to build infrastructure, gather
resources, and satisfy mission-specific win conditions while fending off
enemies (spiders, viruses, robots, tanks, electro towers).</p>
<hr />
<h2 id="gameplay-pillars">Gameplay Pillars</h2>
<table>
<thead>
<tr>
<th>Pillar</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Build</strong></td>
<td>Construct huts, laboratories, factories, fences, towers, boats, jeeps, armour</td>
</tr>
<tr>
<td><strong>Gather</strong></td>
<td>Chop wood, mine stone / iron ore, pick flowers, cultivate crops</td>
</tr>
<tr>
<td><strong>Defend</strong></td>
<td>Fight spiders, viruses, robots, tanks using dynamite, mines, armour</td>
</tr>
<tr>
<td><strong>Complete missions</strong></td>
<td>Each world file embeds a <code>Term</code> struct with win conditions</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="technical-summary">Technical Summary</h2>
<table>
<thead>
<tr>
<th>Property</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Language</strong></td>
<td>C++ (ISO C++98 style, Win32 API)</td>
</tr>
<tr>
<td><strong>Original engine</strong></td>
<td>Win32 / DirectDraw / DirectSound / MCI (AVI)</td>
</tr>
<tr>
<td><strong>Compatibility layer</strong></td>
<td><a href="https://github.com/openeggbert/free-direct">Free Direct</a> (DirectDraw/DirectSound → SDL3), <a href="https://github.com/openeggbert/free-api">Free API</a> (Win32 → cross-platform)</td>
</tr>
<tr>
<td><strong>Platforms</strong></td>
<td>Windows (original), Linux (ported), Web/Emscripten (ported), Android (experimental)</td>
</tr>
<tr>
<td><strong>Resolution</strong></td>
<td>Fixed 640×480 pixels</td>
</tr>
<tr>
<td><strong>Colour depth</strong></td>
<td>8-bit palette (256 colours) on original hardware; 32-bit via SDL3 layer</td>
</tr>
<tr>
<td><strong>Grid</strong></td>
<td>200×200 cells (isometric projection)</td>
</tr>
<tr>
<td><strong>Cell size</strong></td>
<td>60×30 pixels in isometric projection</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="main-game-loop">Main Game Loop</h2>
<pre><code>WinMain()
│
├─ initialise (CEvent, CDecor, CSound, CPixmap, CMovie)
│
└─ Windows message loop
│
├─ WM_TIMER → CEvent::Step()
│ ├─ CDecor::BlupiStep() ← character logic (1 tick = 50 ms)
│ ├─ CDecor::MoveStep() ← decoration animations
│ └─ redraw scene
│
├─ WM_LBUTTONDOWN / WM_MOUSEMOVE / WM_LBUTTONUP
│ └─ CEvent::EventPos() → cell selection, action trigger
│
└─ WM_PHASE_* → CEvent::ChangePhase() → screen switch
</code></pre>
<p>The game tick is driven by a timer with an interval of <strong>50 ms</strong> (configurable via
<code>Timer=</code> in <code>config.def</code>). Each tick calls <code>BlupiStep()</code> and <code>MoveStep()</code> once.</p>
<hr />
<h2 id="coordinate-system">Coordinate System</h2>
<p>The game uses an isometric projection. Relationship between grid and screen coordinates:</p>
<pre><code>Game window: 640×480 px
Drawing surface: 480×450 px, offset (144, 15) from top-left corner
Grid cell (cel.x, cel.y) → screen pixel (px, py):
px = (cel.x - celCoin.x) * DIMCELX/2 - (cel.y - celCoin.y) * DIMCELX/2 + POSDRAWX + DIMDRAWX/2
py = (cel.x - celCoin.x) * DIMCELY/2 + (cel.y - celCoin.y) * DIMCELY/2 + POSDRAWY
Functions:
CDecor::ConvCelToPos(cel) → pixel position
CDecor::ConvPosToCel(pos) → grid cell
</code></pre>
<p><code>m_celCoin</code> holds the cell at the top-left corner of the visible viewport (scroll position).</p>
<hr />
<h2 id="key-constants">Key Constants</h2>
<pre><code class="language-cpp">LXIMAGE = 640 // game window width
LYIMAGE = 480 // game window height
POSDRAWX = 144 // x-offset of game drawing area
POSDRAWY = 15 // y-offset of game drawing area
DIMDRAWX = 480 // width of game drawing area
DIMDRAWY = 450 // height of game drawing area
POSMAPX = 8 // minimap x position
POSMAPY = 15 // minimap y position
DIMMAPX = 128 // minimap width
DIMMAPY = 128 // minimap height
MAXCELX = 200 // grid width (cells)
MAXCELY = 200 // grid height (cells)
DIMCELX = 60 // cell width in pixels
DIMCELY = 30 // cell height in pixels
DIMOBJX = 120 // max object sprite width
DIMOBJY = 120 // max object sprite height
DIMBLUPIX = 60 // Blupi sprite width
DIMBLUPIY = 60 // Blupi sprite height
SHIFTBLUPIY = 5 // Blupi upward shift (z-order correction)
DIMBUTTONX = 40 // toolbar button width
DIMBUTTONY = 40 // toolbar button height
POSSTATX = 12 // statistics panel x position
POSSTATY = 220 // statistics panel y position
MAXBLUPI = 100 // max simultaneous characters (Blupi + all enemies)
MAXMOVE = 100 // max simultaneous animated decorations
MAXBUTTON = 40 // max toolbar buttons
MAXUSED = 50 // max visited cells remembered per character
MAXLIST = 10 // max queued commands per character
MAXENERGY = 4000 // maximum Blupi energy
MAXFIRE = 400 // maximum fire intensity
FOGHIDE = 4 // fog icon threshold below which cell is hidden
</code></pre>
</main>
<script>
// Highlight active nav link also by current URL
(function(){
var links = document.querySelectorAll('#sidebar a.nav-link');
var cur = window.location.pathname.split('/').pop() || 'index.html';
links.forEach(function(a){
if(a.getAttribute('href').split('/').pop() === cur) a.classList.add('active');
});
})();
</script>
</body>
</html>