iTranslated by AI
The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
😩
What I learned from building Minecraft from scratch
Conclusion
- There are three walls
- 3D calculation, rendering
- 3D libraries
- Minecraft's own algorithm
- 3D rendering is difficult after all
- High school to university mathematics is essential
- It's difficult even using 3D calculation libraries
- It's tough even using wrappers like Three.js?
- Collision detection
- Polygon and mesh rendering
- In addition to rendering and processing issues, the difficulty of Minecraft's algorithm
- Processing is divided into chunks
- Terrain generation using Perlin noise
- Data storage using chunks
Mainly three walls
Mainly, there are the walls of:
- 3D calculation, rendering
- 3D libraries
- Minecraft's own algorithm
I understood the first two myself, but the last one,
- Minecraft's own algorithm
This was even more difficult.
3D calculation, rendering
It is necessary to use trigonometric functions and rotation matrices to move polygons, apply meshes, apply textures, and consider things like collision detection.
3D Libraries
Even if you use a rendering library like OpenGL or Three.js, 3D rendering is still difficult.
- Creating polygons and meshes
- Point coordinates, polygon rotation direction, and normals
Minecraft's own algorithm
Even if you can implement 3D rendering from scratch or master a library, Minecraft's own algorithm still stands in your way. This is quite tricky:
- Processing and data management for each chunk
- Collision detection
- Terrain generation algorithms
Many elements unique to Minecraft like these appear.
It's a struggle because there's surprisingly little information even when searching online.
Related Pages
Discussion