Closed acs closed 4 years ago
The first step is to install godot engine and after that, to play with the demos at:
https://github.com/godotengine/godot-demo-projects/tree/master/3d/physics_tests
Probably it won't cover voxels but we can extend it to do it. Let's mature the idea.
The first step is to install godot engine and after that, to play with the demos at:
https://github.com/godotengine/godot-demo-projects/tree/master/3d/physics_tests
Probably it won't cover voxels but we can extend it to do it. Let's mature the idea.
Ok, let's create our first Godot project following: https://docs.godotengine.org/en/stable/index.html
The demos are Godot projects also.
Let's download the Standard version of Godot from https://godotengine.org/download/linux for 64 bits.
Wow, the first time you start Godot you can download the demo projects, including the physics one and execute it.
In order to create a binary for linux, I need to install the export templates. With them , it seems you can export your Godot projects to Linux, Windows, Web, Android ... cool! But you need to download a 440 MB template.
For a Linux binary ... what will be the size for a minimal project? Probably the 40MB of Godot Engine (a bit less because the editor is not needed?) and the extra stuff implementing the project.
And the result is:
HelloWorld]$ du -sh HelloWorld-linux.x86_64
41M HelloWorld-linux.x86_64
and if I execute it:
[HelloWorld]$ ./HelloWorld-linux.x86_64
Godot Engine v3.2.2.stable.official - https://godotengine.org
OpenGL ES 3.0 Renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
and this is amazing:
Creating an executable for the game is so easy! And it is just a binary file ready to be executed with all included in it.
At this point I understand why some people are proposing Godot as a general purpose framework for creating multiplatform applications: https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b
And probably it is the same for generating a Windows binary, an Android apk, a HTML5 app ... it is wonderful.
Interesting Open Source game using latest Godot: https://github.com/EdmarDev/Wind-Up-Racer
Ok, I have completed the https://docs.godotengine.org/en/stable/getting_started/step_by_step/your_first_game.html and now I have a much clearer vision and knowledge about howto create games with Godot. It has been a really nice experience. And physics are used in this simple games. So it seems it is core for the development of any serious game with these engines (and probably from scratch also).
The next step is to learn a bit about 3D in Godot. My idea is that voxels are groups of 3D objects. The collision of groups is something tricky AFAIK reading, so let's focus in learning 3D in Godot, let's create two groups of two cubes, and let's collide them.
Godot 3D tutorial: https://docs.godotengine.org/en/stable/tutorials/3d/introduction_to_3d.html#spatial-node
Starting to learn with it!
This tutorial does not cover the basics pretty well. Let's find others:
https://www.reddit.com/r/godot/comments/an0iq5/godot_tutorials_list_of_video_and_written/
Godot and MagicaVoxel: https://www.reddit.com/r/godot/comments/9497gz/how_to_3d_voxels_to_pixel_art_with_viewports/
The 3D tutorials are not as complete as the 2D ones (https://godotforums.org/discussion/15767/request-beginner-3d-step-by-step-tutorial) and most of them are inside videos.
For example:
https://www.youtube.com/watch?v=VeCrE-ge8xM
Let's take a look to this eBook: https://godottutorials.pro/free-ebook-godot-game-development/ link
This tutorial seems to be a good reference: https://godottutorials.pro/fps-godot-tutorial/ (the same than the one included in the book).
And this article bout Godot tutorials for Beginners is also pretty interesting, pointing to 3D resources: https://conceptartempire.com/godot-tutorials/
I would focus in this youtube tutorial:
https://www.youtube.com/watch?v=VeCrE-ge8xM Godot 3.1: Creating a Simple 3D Game: Part 1 (Intro, Nodes & 3D Physics) #GodotEngine
https://github.com/acs/numbers_attack my first repo about godot. I don't know how far I will get with this educational game for practising number operations. But at least in my mind it is promising. In <1h I have modified the game from the Godot tutorial to adapt it to a new theme: eduactional.
Ok, let's focus in Godot in implementing physics collisions. Once we know how to do it, it is just doing it with voxels.
So let's do it step by step. Let's go with a simple scene with two objects that collide.
https://github.com/acs/godot-samples/tree/master/HelloCollision
Ok, I am trying to understand the limits of the physics engine. For example, the final position for this rectangle is wrong according to my intuition. The final position of the rectangle should not be with the vertex up but totally over the ground.
Configuring "Gravity Scale" to 1.5 fixes the problem:
A lot to learn yet about the physics engines.
Let's read more about how physics work to understand it with more deep.
https://docs.godotengine.org/en/stable/tutorials/physics/index.html
Will be done in: https://github.com/Voxelers/3d/issues/1
Based on this effort:
https://github.com/godotengine/godot-demo-projects/pull/473
Implement in this test bed a voxel collisions demo in Godot. The ideal engine is PhysX (used by Unreal, Unity and others) but it could be enough to do it with Bullet.
Pretty related to the effort in #122 and #125