Voxel game - is it hard to make?
Voxel game - is it hard to make?
I'm planning to make Voxel game similar to minecraft. None stuff like crafting though, as I want it to be like classic, but extended so you can add your own block textures. There will not be also world generator - only fixed-size flat map (size will be defined by user in block units).
So it'll be simpler than even classic which had world generator.
The hardest part there will be saving - I have yet to figure how to write 3d arrays to file (it'll be array of records, for start with only one field - blockid).
After I'll learn enough out of that, I'll probably move to interactive stuff like doors or wires (I know this is hard, so won't be in first version).
So it'll be simpler than even classic which had world generator.
The hardest part there will be saving - I have yet to figure how to write 3d arrays to file (it'll be array of records, for start with only one field - blockid).
After I'll learn enough out of that, I'll probably move to interactive stuff like doors or wires (I know this is hard, so won't be in first version).
For a more minecraft look:
http://www.freebasic.net/forum/viewtopic.php?t=17129
http://www.freebasic.net/forum/viewtopic.php?t=17129
Angros, Ken's engine is nice but it's way too old and therefore is "bah". It was written for old computers without acceleration (there wasn't even Voodoo when engine came out) and uses much assembly that may not be compatible whith systems other than Windows and dos. I'm rather looking for making clear OGL solution.
@Aave, yes I know about fbcraft, was even tester at some point, and while I'd appreciate help from Gonzo and maybe even sharing some code (if he'll agree), we have different goals. My game will be pointed towards creativity, which means flatlands and simple gui for adding blocks into game (for failsafe when user open map when there are blocks block id which is not used on user's side, they won't be displayed).
@Aave, yes I know about fbcraft, was even tester at some point, and while I'd appreciate help from Gonzo and maybe even sharing some code (if he'll agree), we have different goals. My game will be pointed towards creativity, which means flatlands and simple gui for adding blocks into game (for failsafe when user open map when there are blocks block id which is not used on user's side, they won't be displayed).
@darkhog, I would not mention "voxel" unless you mean voxel rendering (think Delta Force games).
It will most likely confuse people. I think "minecraft like" is a better way to indicate the type of engine you want to duplicate.
In any case, it is probably most rewarding to code the entire thing yourself, if you have time. :)
As far as saving voxel data, it's just like saving pixel data, you simply just loop through your array and write out the bytes. Instead of two loops (x,y), you have a third one. Piece of cake.
It will most likely confuse people. I think "minecraft like" is a better way to indicate the type of engine you want to duplicate.
In any case, it is probably most rewarding to code the entire thing yourself, if you have time. :)
As far as saving voxel data, it's just like saving pixel data, you simply just loop through your array and write out the bytes. Instead of two loops (x,y), you have a third one. Piece of cake.
i like block world =) or block engine..The Car wrote: It will most likely confuse people. I think "minecraft like" is a better way to indicate the type of engine you want to duplicate.
how about put # , , blockdata ?The Car wrote: As far as saving voxel data, it's just like saving pixel data, you simply just loop through your array and write out the bytes. Instead of two loops (x,y), you have a third one. Piece of cake.
Gonzo, would mind to share some FBCraft code? I won't be any concurence, as I aiming to more creative thing (like minecraft classic with flatlands) and you aiming for more adventure/exploration game (advanced world generator, even more advanced than in mc 1.8).
My main concern now (after settling up save problem) is performance as I never programmed 3d games from scratch before (I did some in Blender Game Engine though) and I heard voxel/block games are quite expensive for performance.
My main concern now (after settling up save problem) is performance as I never programmed 3d games from scratch before (I did some in Blender Game Engine though) and I heard voxel/block games are quite expensive for performance.
i have 12 years of programming experience, and i find this project really really hard to do =)
start with a cube, then many, then make sectors of cubes
then implement culling invisible faces
add some fake lighting to make it okish, and all that
i dont think theres anything you can learn by seeing my very complex code :)
some parts arent very complex... like opengl states and what not
start with a cube, then many, then make sectors of cubes
then implement culling invisible faces
add some fake lighting to make it okish, and all that
i dont think theres anything you can learn by seeing my very complex code :)
some parts arent very complex... like opengl states and what not
Yes, block world is good =).Gonzo wrote:
i like block world =) or block engine..
That works for smaller data sets, but x*y*z adds up quickly. For a big world you will likely want to store it compressed (simple run length encoding perhaps) since a large chunk of voxels will all be a single value.Gonzo wrote:how about put # , , blockdata ?The Car wrote: As far as saving voxel data..
As it turns out, I am also making a 'Minecraft like' Block/voxel game in FreeBASIC at the moment.
http://vast3d.com/~athomson/exe/VRTS/Wine16.png
My current program generates a simple 1024x40x1024 map using a non random terrain generator, and renders 64x20x64 sections of that map using texture mapped opengl faces. The map is a simple 3 dimensional byte array and works much like a pallet-ized 3D bitmap. Each byte indexes a simple look up table that contains all the attributes for each block type.
I use a simple 512x512 texture that contains 256 32x32 blocks to texture the blocks, which I load using the fbpng library.
One issue that you might have is that I use a simple overhead perspective instead of a first person perspective. (Zooming to minimum allowed distance creates an almost 1st person view.) Static views run at very high frame rate, although panning the view position causes the faces to be regenerated slowing the frame rate quite a bit, but it is still consistently over 20FPS.
My program is fairly complex, and contains code for a smoothing effect, water depth effect, and a fog of war system. However given a little time, I should be able to separate out some example code you can use from the rest of my game.
It takes quite some effort to set up 3D graphics programs/engines from scratch but is well worth the effort. I wish you luck in your project.
http://vast3d.com/~athomson/exe/VRTS/Wine16.png
My current program generates a simple 1024x40x1024 map using a non random terrain generator, and renders 64x20x64 sections of that map using texture mapped opengl faces. The map is a simple 3 dimensional byte array and works much like a pallet-ized 3D bitmap. Each byte indexes a simple look up table that contains all the attributes for each block type.
I use a simple 512x512 texture that contains 256 32x32 blocks to texture the blocks, which I load using the fbpng library.
One issue that you might have is that I use a simple overhead perspective instead of a first person perspective. (Zooming to minimum allowed distance creates an almost 1st person view.) Static views run at very high frame rate, although panning the view position causes the faces to be regenerated slowing the frame rate quite a bit, but it is still consistently over 20FPS.
My program is fairly complex, and contains code for a smoothing effect, water depth effect, and a fog of war system. However given a little time, I should be able to separate out some example code you can use from the rest of my game.
It takes quite some effort to set up 3D graphics programs/engines from scratch but is well worth the effort. I wish you luck in your project.
Reading through the evolution of how minecraft stored its levels is rather interesting.
http://www.minecraftwiki.net/wiki/Devel ... ile_Format
Should give you some good ideas..
http://www.minecraftwiki.net/wiki/Devel ... ile_Format
Should give you some good ideas..
http://fbcraft.fwsnet.net/makingspheres.png
making an object gun so i can more easily test out new ways to make objects...
not that its easy or anything :P
making an object gun so i can more easily test out new ways to make objects...
not that its easy or anything :P
well, not really... but i did work out a way to make raindrop like stuff
http://fbcraft.fwsnet.net/raindropawesome.png
rainbow drop!
http://fbcraft.fwsnet.net/raindropawesome.png
rainbow drop!
That is one big rainbow drop.
Say, I tried downloading from http://fbcraft.fwsnet.net/fbcraft-test.rar but it gave me a 404. Do you have a link that is working? I'd like to try running your game on my system. Thanks!
Say, I tried downloading from http://fbcraft.fwsnet.net/fbcraft-test.rar but it gave me a 404. Do you have a link that is working? I'd like to try running your game on my system. Thanks!