Edit of asset "Voxel Game Demo" Accepted
Old/Current | New/Edit | |
---|---|---|
Title | Voxel Game Demo | Voxel Game Demo |
Description |
This demo is a minimal first-person voxel game, inspired by others such as Minecraft. How it works: Each chunk is a StaticBody3D with each block having its own CollisionShape3D for collisions. The meshes are created using SurfaceTool which allows specifying vertices, triangles, and UV coordinates for constructing a mesh. See documentation for procedural geometry generation: https://docs.godotengine.org/en/stable/tutorials/3d/procedural_geometry/index.html The chunks and chunk data are stored in dictionaries. New chunks have their meshes drawn in separate Threads but generating the collisions is done in the main thread, since Godot does not support changing physics objects in a separate thread. There are two terrain types, random blocks and flat grass. A more complex terrain generator is out-of-scope for this demo project. See documentation for more information on using multiple threads: https://docs.godotengine.org/en/stable/tutorials/performance/using_multiple_threads.html The player can place and break blocks using the RayCast3D node attached to the camera. It uses the collision information to figure out the block position and change the block data. You can switch the active block using the brackets or with the middle mouse button. There is a settings menu for render distance and toggling the fog. Settings are stored inside of an AutoLoad singleton called "Settings": https://docs.godotengine.org/en/latest/getting_started/step_by_step/singletons_autoload.html This class will automatically save settings, and load them when the game opens, by using the File class. Sticking to GDScript and the built-in Godot tools, as this demo does, can be limiting. If you are making your own voxel game, you should probably use Zylann's voxel module instead: https://github.com/Zylann/godot_voxel Language: GDScript Renderer: Forward+ |
This demo is a minimal first-person voxel game, inspired by others such as Minecraft. How it works: Each chunk is a StaticBody3D with each block having its own CollisionShape3D for collisions. The meshes are created using SurfaceTool which allows specifying vertices, triangles, and UV coordinates for constructing a mesh. See documentation for procedural geometry generation: https://docs.godotengine.org/en/stable/tutorials/3d/procedural_geometry/index.html The chunks and chunk data are stored in dictionaries. New chunks have their meshes drawn in separate Threads but generating the collisions is done in the main thread, since Godot does not support changing physics objects in a separate thread. There are two terrain types, random blocks and flat grass. A more complex terrain generator is out-of-scope for this demo project. See documentation for more information on using multiple threads: https://docs.godotengine.org/en/stable/tutorials/performance/using_multiple_threads.html The player can place and break blocks using the RayCast3D node attached to the camera. It uses the collision information to figure out the block position and change the block data. You can switch the active block using the brackets or with the middle mouse button. There is a settings menu for render distance and toggling the fog. Settings are stored inside of an AutoLoad singleton called "Settings": https://docs.godotengine.org/en/latest/getting_started/step_by_step/singletons_autoload.html This class will automatically save settings, and load them when the game opens, by using the File class. Sticking to GDScript and the built-in Godot tools, as this demo does, can be limiting. If you are making your own voxel game, you should probably use Zylann's voxel module instead: https://github.com/Zylann/godot_voxel Language: GDScript Renderer: Forward+ |
Category | Demos | Demos |
License | MIT | MIT |
Repository Provider | Custom | Custom |
Repository Url | https://github.com/godotengine/godot-demo-projects/tree/4.2-31d1c0c/3d/voxel | https://github.com/godotengine/godot-demo-projects/tree/4.2-31d1c0c/3d/voxel |
Issues Url | https://github.com/godotengine/godot-demo-projects/issues | https://github.com/godotengine/godot-demo-projects/issues |
Godot version | Godot 4.2 | Godot 4.2 |
Version String | 4.2-31d1c0c | 4.2-31d1c0c |
Download Commit | https://github.com/godotengine/godot-demo-projects/releases/download/4.2-31d1c0c/3d_voxel.zip | https://github.com/godotengine/godot-demo-projects/releases/download/4.2-31d1c0c/3d_voxel.zip |
Download Url (Computed) | https://github.com/godotengine/godot-demo-projects/releases/download/4.2-31d1c0c/3d_voxel.zip | https://github.com/godotengine/godot-demo-projects/releases/download/4.2-31d1c0c/3d_voxel.zip |
Icon Url |
https://raw.githubusercontent.com/godotengine/godot-demo-projects/4.2-31d1c0c/3d/voxel/icon.webp
|
https://raw.githubusercontent.com/godotengine/godot-demo-projects/4.2-31d1c0c/3d/voxel/icon.webp
|
Preview Insert | ||
---|---|---|
Type | image | |
Image/Video URL |
https://raw.githubusercontent.com/godotengine/godot-demo-projects/4.2-31d1c0c/3d/voxel/screenshots/blocks.png
|
|
Thumbnail |
|
Preview Insert | ||
---|---|---|
Type | image | |
Image/Video URL |
https://raw.githubusercontent.com/godotengine/godot-demo-projects/4.2-31d1c0c/3d/voxel/screenshots/title.png
|
|
Thumbnail |
|