Skip to content

Commit 92e9c1d

Browse files
committed
change(/wiki): i forgor to commit
1 parent e268104 commit 92e9c1d

File tree

8 files changed

+53
-17
lines changed

8 files changed

+53
-17
lines changed

.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Zola: Watch",
5+
"type": "f5anything",
6+
"request": "launch",
7+
"command": "just dev"
8+
},
9+
{
10+
"name": "Zola: Watch (open browser)",
11+
"type": "f5anything",
12+
"request": "launch",
13+
"command": "just dev-open"
14+
}
15+
]
16+
}

content/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ link = "/wiki/procedural-generation"
3333

3434
[[extra.list]]
3535
title = "Engines"
36-
content = "Don't want to start entirely from scratch? Fear not! There are various <a href='wiki/engines'>Game Engines</a> you can use as basis for your project..."
36+
content = "Don't want to start entirely <a href='wiki/engine-creation'>from scratch</a>? Fear not! There are various <a href='wiki/engines'>Game Engines</a> you can use as basis for your project..."
3737
link = "/wiki/engines"
3838

3939
[[extra.list]]

content/wiki/compression/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ Once we have our data structure of choice in place, we might still want (or outr
1515

1616
To remedy these issues, we'll have to *compress* our voxels, for which there are many methods...
1717

18-
- [Lossy Compression](/wiki/lossy-compression)
19-
- [Palette Compression](/wiki/palette-compression)
2018
- [Run-Length Encoding](/wiki/run-length-encoding)
19+
- [Palette Compression](/wiki/palette-compression)
20+
- [LZW Compression](/wiki/lzw-compression)
21+
- [Lossy Compression](/wiki/lossy-compression)
2122

2223
> **Note:** Compressing voxel data is, of course, also greatly useful for persistence and networking.
2324

content/wiki/datastructures/index.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ categories = ["datastructures"]
77
tags = ["datastructures", "storage", "spatial-acceleration"]
88
+++
99

10-
{% info_notice() %} Note: This section is about *runtime* storage, not [serialization](/wiki/serialization). {% end %}
11-
1210
The simplest way to store voxels is to define a three-dimensional array of elements (be it `struct`s or `integer`s), where each element represents a single voxel:
1311

1412
```c#
@@ -41,7 +39,8 @@ var voxels = new VOXEL[height * depth * width];
4139
// So let's define a function (here a lambda) for it:
4240
var idx = (int x, int y, int z) => (x + z*width + y*width*depth);
4341
// ^ NOTE: You may want to throw an error right here
44-
// if the coordinate components are out of bounds.
42+
// if either the coordinate components
43+
// or the resulting index are out of bounds.
4544
4645
// Set a voxel:
4746
voxels[idx(x,y,z)] = voxel;
@@ -52,7 +51,7 @@ var voxel = voxels[idx(x,y,z)];
5251

5352
Now, storing voxels in a plain array like this is perfectly fine for small scenes...
5453

55-
However, for larger scenes, we'll have to use a data-structure that allows both loading and purging *parts of our volume* (called [Chunks](/wiki/chunking)) from memory, nearly in realtime, without slowing down *accessing* our voxel data.
54+
However, for larger scenes, we'll have to use a data-structure that allows both loading and purging *parts of our volume* (called [Chunks](/wiki/chunking) or Bricks) from memory, nearly in realtime, without slowing down the *access times* of our voxel data too much.
5655

5756
> **Note:** These techniques can often be combined.
5857

content/wiki/engine-creation/index.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ The core of a game engine is (similar to an operating system) an abstraction for
3333
- The Core Lifecycle
3434
- The Task Manager
3535
- The Data/Asset Model
36+
- The User Interface
3637
- The Scene Structure
38+
- The Render Abstraction
39+
- The Streaming Mechanism
3740
- The Extension Mechanism
3841

3942
{% info_notice() %}
4043
**Note:** Since *everything else* is built on top of these, some serious thought should be put into their design.
41-
Rebuilding/replacing them at a later time is considered a Bad Idea™, as they influence every part of the engine.
44+
Rebuilding/replacing them at a later time is considered a Very Bad Idea™, as they influence every part of the engine.
4245
{% end %}
4346

4447
While the following sections will explain each concept on its own, do keep in mind that they're highly intertwined.
@@ -59,10 +62,22 @@ While the following sections will explain each concept on its own, do keep in mi
5962

6063
{{stub_notice(kind="section")}}
6164

65+
### The User Interface
66+
67+
{{stub_notice(kind="section")}}
68+
6269
### The Scene Structure
6370

6471
{{stub_notice(kind="section")}}
6572

73+
### The Render Abstraction
74+
75+
{{stub_notice(kind="section")}}
76+
77+
### The Streaming Mechanism
78+
79+
{{stub_notice(kind="section")}}
80+
6681
### The Extension Mechanism
6782

6883
{{stub_notice(kind="section")}}

content/wiki/engines/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ Following are a few things you must keep in mind and be aware of **before** you
3636
2. It is a *massive* amount of work, potentially spanning over years of your life.
3737
3. Having several years of programming experience is a must; nobody will hold your hand in this endeavour.
3838
4. All the tooling for asset-, level- and gameplay-creation? You'll have to make them.
39-
5. Running into driver bugs will eat a lot of time and cause premature balding.
39+
5. Running into driver bugs and various platform/OS differences will eat a lot of time and cause premature balding.
4040

4141
The above list might make you question *"Why would anyone do this?!"*, to which most of [us](/wiki/community) will say... because it's fun! :D
4242

4343
A more concrete reason is that, by writing both the high- and low-level code, you can gain *a lot* of performance (that'd otherwise be left on the table) *and* the freedom to make some truly awesome things.
4444

45-
{% todo_notice() %} Create an article for game engine creation. {% end %}
45+
But with that said, keep in mind that *creating a game* is still best done with an existing engine.
46+
47+
If you're still here, [let's get started](/wiki/engine-creation), shall we?

content/wiki/palette-compression/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ categories = ["compression"]
66
tags = ["compression", "optimization", "flyweight"]
77
+++
88

9-
> This is a rewrite; the original article can be found here: [https://www.longor.net/articles/voxel-palette-compression-reddit](https://www.longor.net/articles/voxel-palette-compression-reddit)
10-
119
When writing a voxel engine, eventually you will come to realize that storing your voxels as 32-bit integers (or worse: as individual heap-allocated objects!) is eating a lot more memory than you'd like, potentially slowing down your game without any obvious reason as to *why*, and doing [bit-twiddling](https://graphics.stanford.edu/~seander/bithacks.html) to pack your data into a smaller space, is probably giving you quite a headache, so you might be thinking: There *has* to be a better way! *Right*...?
1210

1311
**And there is!**
@@ -91,3 +89,7 @@ Given a 32-bit architecture which aligns allocations on 32-bit/4-byte boundaries
9189
This gives you at minimum ***31 bits*** to encode a voxel type in (*63* bits on a 64-bit CPU!), which should be *way* more than enough for terrain (which tends to make up the majority of a voxel world by sheer volume), thus eliminating a *ton* of allocations and pointers!
9290

9391
{% todo_notice() %} Implementation? {% end %}
92+
93+
## References
94+
95+
This article is a rewrite; the original article can be found here: [https://www.longor.net/articles/voxel-palette-compression-reddit](https://www.longor.net/articles/voxel-palette-compression-reddit)

content/wiki/rendering/index.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ Since there is no way to write about all possible methods, this article will tal
1919
## Hardware Acceleration
2020

2121
Talking about rendering is impossible without talking about hardware acceleration
22-
and thus **GPU**s (*Graphics&nbsp;Processing&nbsp;Unit*); so let's do that real quick!
22+
and thus <abbr title="Graphics Processing Units">GPUs</abbr>; so let's do that real quick!
2323

2424
The primary purpose of a GPU is to calculate/compute/solve a *massive* number of highly similar problems[^embarassinglyparallel] "all at once",
2525
by splitting up large sets of data into smaller groups, which are then worked thru by a large number of tiny processing units[^gpumanycores].
2626

2727
{% info_notice() %}
2828
[Historically](https://en.wikipedia.org/wiki/Graphics_processing_unit#History),
29-
the problem in question was mainly [rasterization](https://en.wikipedia.org/wiki/Rasterisation)
29+
the problem in question was mainly vertex transformation and [rasterization](https://en.wikipedia.org/wiki/Rasterisation)
3030
(and later fragment processing) of triangles via GPUs on dedicated [graphics cards](https://en.wikipedia.org/wiki/Graphics_card).
3131

3232
These days GPUs are much more [general purpose](https://en.wikipedia.org/wiki/General-purpose_computing_on_graphics_processing_units)
3333
and are used in so many applications that we won't bother listing them here.
3434
{% end %}
3535

36-
To hopefully nobodies surprise, rendering voxels *is* such a massively parallel process, that *not* using GPUs would be very (very) silly.
36+
To hopefully nobodies surprise, rendering voxels is *such* a massively parallel process, that *not* using GPUs would be very (very) silly!
3737

3838
How do we gain access to the awesome processing power of GPUs? Well...
3939

@@ -79,8 +79,9 @@ so check out their documentation before rejecting any!
7979

8080
## Windowing Abstraction Libraries
8181

82-
Creating a surface to actually draw into is, due to the many platforms that exist,
83-
terribly annoying, so it's best to leave it to a windowing library...
82+
Creating a surface to actually draw into is *terribly* annoying,
83+
due to the many platforms and operating systems that exist,
84+
so it's best to leave it to a windowing library...
8485

8586
| Name | Language | Platforms |
8687
|------|----------|-----------|

0 commit comments

Comments
 (0)