Montandalar fdae025495 Add full license information for Voxel demo textures (#1113) | 2 ماه پیش | |
---|---|---|
.. | ||
menu | 3 ماه پیش | |
player | 6 ماه پیش | |
screenshots | 4 سال پیش | |
world | 5 ماه پیش | |
README.md | 2 ماه پیش | |
default_bus_layout.tres | 1 سال پیش | |
default_env.tres | 2 سال پیش | |
icon.webp | 1 سال پیش | |
icon.webp.import | 1 سال پیش | |
project.godot | 3 ماه پیش | |
settings.gd | 6 ماه پیش |
This demo is a minimal first-person voxel game, inspired by others such as Minecraft.
Language: GDScript
Renderer: Forward+
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/2755
Each chunk is a
StaticBody3D
with each block having its own
CollisionShape
for collisions. The meshes are created using
SurfaceTool
which allows specifying vertices, triangles, and UV coordinates
for constructing a mesh.
The chunks and chunk data are stored in
Dictionary
objects. New chunks have their meshes drawn in separate
Thread
s,
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.
The player can place and break blocks using the
RayCast
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". 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, is quite limiting. If you are making your own voxel game, you should probably use Zylann's voxel module instead: https://github.com/Zylann/godot_voxel
Textures are from Minetest Game.
Some textures Copyright © 2010-2018 Minetest contributors, CC BY-SA 3.0 Unported (Attribution-ShareAlike) http://creativecommons.org/licenses/by-sa/3.0/
Some textures Copyright © 2010-2018 Minetest contributors, CC0 1.0 "No rights reserved" https://creativecommons.org/publicdomain/zero/1.0/
Font is "TinyUnicode" by DuffsDevice. Copyright © DuffsDevice, CC-BY (Attribution) http://www.pentacom.jp/pentacom/bitfontmaker2/gallery/?id=468
While most textures are under CC BY-SA 3.0, some are under CC0 1.0
Cisoun's texture pack (CC BY-SA 3.0):
celeron55, Perttu Ahola celeron55@gmail.com (CC BY-SA 3.0)
VanessaE (CC BY-SA 3.0):
Calinou (CC BY-SA 3.0):
PilzAdam (CC BY-SA 3.0):
jojoa1997 (CC BY-SA 3.0):
InfinityProject (CC BY-SA 3.0):
Zeg9 (CC BY-SA 3.0):
paramat (CC BY-SA 3.0):
TumeniNodes (CC BY-SA 3.0):
Blockmen (CC BY-SA 3.0):
sofar (CC0 1.0):
Neuromancer (CC BY-SA 3.0):
Gambit (CC BY-SA 3.0):
kilbith (CC BY-SA 3.0):
Mossmanikin (CC BY-SA 3.0):
random-geek (CC BY-SA 3.0):
Krock (CC0 1.0):