|
| 1 | +# Current outline |
| 2 | +This is subject to change. |
| 3 | +* Introduction |
| 4 | +* How to play Hypermine |
| 5 | + * Controls |
| 6 | + * Config file |
| 7 | + * The save file (with a warning that compatibility between versions of Hypermine are not guaranteed and another warning to back up save files) |
| 8 | + * Setting up multiplayer |
| 9 | +* Background math |
| 10 | + * Linear algebra |
| 11 | + * (This can link to external resources, but readers should be guided on what parts of linear algebra are worth learning, and making these docs self-contained would be a good long-term goal. If we do use external links, we should include a date so that readers know when health of each link was last checked.) |
| 12 | + * Vectors |
| 13 | + * Matrices, matrix-vector multiplication, and its meaning |
| 14 | + * Matrix-matrix multiplication and its meaning |
| 15 | + * (We should likely explain both the "transformation" and "change of basis" interpretations) |
| 16 | + * 3D examples (assuming previous sections have used 2D examples) |
| 17 | + * Dot products |
| 18 | + * Projections, reflections, rotations |
| 19 | + * Homogeneous coordinates and translations |
| 20 | + * Spherical geometry |
| 21 | + * (We want such a section because it's a good segue to problem solving techniques for hyperbolic geometry problems) |
| 22 | + * Representing points as unit vectors |
| 23 | + * Projections, reflections, rotations, translations (which are rotations expressed differently) |
| 24 | + * Hyperbolic geometry |
| 25 | + * Minkowski space (with the "inner product" as the main difference) |
| 26 | + * Representing points as "normalized" vectors |
| 27 | + * Projections, reflections, rotations, translations, horo-rotations |
| 28 | + * A note about floating point precision |
| 29 | + * (Do we put advanced shape-casting math here? Probably not.) |
| 30 | +* Tiling the world |
| 31 | + * Nodes and their coordinate systems (describing the order-4 dodecahedral honeycomb and how Hypermine uses it) |
| 32 | + * Chunks and their coordinate systems (explaining node_to_dual and dual_to_node) |
| 33 | + * Voxels within chunks (Margins should be mentioned here.) |
| 34 | + * The graph (how dodecahedra are organized into the tiling in code. Also mention how NodeId works.) |
| 35 | +* World generation |
| 36 | + * Introduction (explain NodeState and ChunkParams) |
| 37 | + * Environmental factors (how they change from node to node) |
| 38 | + * The surface (explain the flat plane of the world, and how gravity works) |
| 39 | + * Terrain (explain parts of the generate_terrain function that determine void vs non-void, ignoring material for now) |
| 40 | + * Materials of the terrain |
| 41 | + * The road |
| 42 | + * Trees |
| 43 | + * How world generation is driven (wait until this section to describe anything async or anything related to margins) |
| 44 | +* Character physics (May want to mention the word "player" for searchability) |
| 45 | + * The movement algorithm (generally describing character_controller/mod.rs) |
| 46 | + * Constraining movement vectors (describing vector_bounds.rs) |
| 47 | + * Sphere casting (how collisions are actually detected) |
| 48 | +* Block updates (placing and breaking blocks) |
| 49 | +* Entity/Component/System |
| 50 | + * (Note that we use hecs, and point to documentation. Provide some tips on how to discover entities/components in use) |
| 51 | + * (Do not list out all compoenents, as that kind of documentation belongs in code) |
| 52 | +* Netcode |
| 53 | + * Introduction (note that we use quinn, and point to documentation) |
| 54 | + * Syncing character movement |
| 55 | + * Syncing chunk data and block updates |
| 56 | + * Syncing entities |
| 57 | + * Logging on and off |
| 58 | +* Rendering |
| 59 | + * Introduction (note that we use Vulkan with the ash library, and point to documentation) |
| 60 | + * Chunk rendering (Enable reader to trace through all the code involved in rendering a chunk. Include fog.) |
| 61 | + * Surface extraction (including ambient occlusion) |
| 62 | + * Character rendering (with mesh.vert and mesh.frag) |
| 63 | + * Asset loading |
| 64 | + * GUI (note that we use the yakui library, and point to documentation) |
| 65 | +* Miscellaneous |
| 66 | + * (Note important entry points, such as core.rs for starting up Vulkan and window.rs for the event loop) |
| 67 | +* FAQ (placeholder to put questions if they do appear often) |
| 68 | + |
| 69 | +# Design guidelines |
| 70 | +* Docs should live in the repository itself rather than a separate wiki. |
| 71 | + * This helps keep docs in sync with the code and allows the quality of docs to be enforced with pull requests. The wiki has a disadvantage of forcing users to make unilateral edits to it. |
| 72 | +* Docs should have a suggested linear order to read them. |
| 73 | +* We should provide documenting things that are impossible to learn elsewhere. |
| 74 | +* There should be a way for readers to know if it's safe to skip a section. |
| 75 | + * This can for instance be done with "After reading this section, readers should be able to (...). This could be questions they can answer. |
| 76 | +* Since math is heavily involved, exercises can be useful as knowledge checks. |
| 77 | +* While there is a linear order, readers should also be able to tell what parts they can skip if they are reading the docs for a particular purpose. |
| 78 | +* We should be prepared to keep placeholders in the docs, potentially with links to external sources, as this would allow us to separate the tasks of writing and organizing documentation. |
| 79 | +* Since geometry is heavily involved, the docs should contain pictures. |
| 80 | + * Interactive elements would also be helpful. |
| 81 | +* As 3D geometry can be difficult to visualize, we should use a 2D analogy for anything that can be reduced to 2D without loss of generality. For instance, many diagrams that explain concepts can be 2D. |
| 82 | + * It should still be made clear how the analogy extends to 3D. |
| 83 | +* To avoid running up against GitHub limits or making repositories take longer to clone, larger images and videos will need to be generated on the reader's machine. |
| 84 | + * One option would be to add functionality to Hypermine itself for these visualizations. It is not decided what the preferred approach is. |
| 85 | + * Images that don't take up much storage are fine to store with Git LFS. Try to keep the total size of all assets used in the documentation under approximately 1 MiB (subject to change based on feasibility/importance of larger images). It should be possible to use the SVG file format to keep most images very small. Producing such images with code is still recommended. |
| 86 | +* We should try to keep the reader interested/motivated, making the documentation enjoyable to read. |
| 87 | + * Animations and interactive visualizations can help with this a lot (in addition to helping the learning process). |
| 88 | +* If some information in the docs can be made concrete by pointing to source code, we should do that. |
| 89 | + * There could be a desync, but if such a mistake is made, readers can git blame the documentation to see what the code was like when the documentation was written. |
| 90 | + * We can also try to avoid repeated work by referencing code comments, asking readers to check them for further detail. However, we cannot put diagrams in code comments. |
| 91 | + * We should keep this documentation relatively short, especially when diagrams are not needed, as code comments are better. The documentation here should generally just give people less familiar with the codebase somewhere to look. |
0 commit comments