toger5toger5 Posts: 39Member
edited September 2016 in Projects

Project Overview
In this project i tried to program minecraft and thought about multiple systems how to make a voxel game with a game engine like Godot. I tested a lot and made huge process with understanding the systems of mesh generation, and the basics of a voxel system with Godot.
To achive a decent performance and as a consequence a decent rendering distance of the world I only generate the top surface of the terrain (so the surface is created out of one single plane and not by multiple cubes (as I did it in the minecraft blender game engine project on my git hub page)) Therefore I used the godot datatool to manipulate and create single face and UV maps.

In the last days this project got pushed in the background because i was busy creating this website. But I will continue working on it.

To get some further Informations feel free to visit my github. There you also can download the poject and have a look at it's source.

If you want to download the Zip file click here:

Tags :


  • PlanetKillerPlanetKiller Posts: 25Member
    I was thinking about doing something similar with blocks, but just in two dimensions. Like a 3D version of terraria. Hope it work for you, but I think digging, multiple block types, and falling blocks might be troublesome.
  • toger5toger5 Posts: 39Member
    I think in a 2d version all that should be realativly easy. There you don't have to bother with performance so you can just create a node for every block. (I needed to do a much harder approch wehere I only have one meshInstance node and modify the mesh to fit my needs... This is really hard when It comes to mining... But I'm on a good path right now ;D)<br />with 2d you should try the easy approch with just using a tilemap.<br />use this Function: [tt]void set_cell( int x, int y, int tile, bool flip_x=false, bool flip_y=false, bool transpose=false )[/tt]<br />and you should be good to go. Just need a map generator.  And you have your infinite terrain.<br />This is great because you can configure tiles with collision shapes so every kind of tiles will be usable for you (stairs hills water...) you than also can use ray casts to check which tile is clicked. And all that shouldn't hurt the performance much.<br /><br />I cant use raycasts (which is verry sad) because i only have physics shapes generated on the fly only next to the player. (this is the only way i could get decent performance...)<br />Hope that helps you.<br />And I'm really looking forward for your project if you are deciding to start it.
  • PlanetKillerPlanetKiller Posts: 25Member
    Thanks, I tried just blocks (64x512) but I was also thinking about tilemaps (it would make water much easier). Hard-coding a default chunk to copy to all chunks would be useful for me, then I just need to edit them with the terrain generator (I wrote one in blender once). I was going to create a hidden game in the menu of something I'm making now, but I haven't got a name for this. I'll probably check to see how big I can make a tilemap (grid-map, grid-nac, rock?) before proceeding, but the loop is going to be the most costly thing. Might do it per chunk and figure something out. <br /><br />Why don't you use tile/grid maps and just limit the size of the world? I've often wished you could change the world size in Minecraft(PC) to something smaller since I hardly travel more than a thousand blocks. But you can't have Finity, I'm claiming it right meow (I know it is a name of a health management thing, but hopefully they won't mind the use of a common word, not the other dozen groups that use it).<br /><br />I'll make it accessible through the menu of what I'm working on around version 1.0, but I'll have to post a thread first. Thanks for the idea and good luck.<br /><br />Hey, multiple 2D gridmaps that you can swap between like biomes. Just a random idea.
  • WombatTurkeyWombatTurkey Posts: 14Member
      I'm learning so much with Godot with this project. Especially the 3d camera rotation, etc. (I'm horrible at Math) and GDScript's easy syntax along with other peoples projects really help me. Thanks for sharing this.  Game is a bit choppy / laggy too, but probably my crappy PC :P
  • toger5toger5 Posts: 39Member
    @WombatTurkey I'm really happy that my project helps you.  ::)<br />Its not only your pc. The performance also is not optimized at all. I never programmed any voxel game before and just played around with different options to get it working.<br />You can check this project:<br />http://godotdevelopers.org/index.php?topic=15449.msg16208#msg16208<br />It is based on a C++ and the creator seems to have a lot of experience with voxel games and I gues he uses better systems I did. As I said before I did it without research about Voxel engines or any experience.<br /><br />So with Zylann's module you will get much better performace. (And it is the way how things are meant to be done: high performace tasks in c++ and the rest in gdscript for easy access)<br />
Sign In or Register to comment.