Wednesday, 26 February 2014

Improved Noise Generation and more!

So, I spent the last week working on many important core features which I have been meaning to add. Firstly, I implemented a basic threading system which has vastly increased the performance, this has allowed me to add some really intensive noise generation and also increase the loaded range of the world by quite a bit. This underlying system will be one of the main core features what make up the game so I will need to optimize it as much as I can.

I managed to implement a simple cave generation system too. This is probably going to change in the future however I think that it adds a lot more life to the terrain, it breaks it from the boring rolling hills look. I think that the next feature I will be working on is biomes. These are another core feature of any terrain which makes it look a lot more realistic.

Looking below you will see a few results of the new cave system integration with the new terrain system. I hope that it will help make the game look better than it did before and give a lot more life to the world.

Thanks for reading and keep checking the blog for more updates!


Tuesday, 18 February 2014

A Long Break.

Hello guys, as you may have noticed, the blog has been frozen since September last year, the main reason for this is that I had lots of college work to catch up with plus I had to work on my application for University. This is kinda a high priority so I had to do that before I could continue working on The Cube Project. I have had some spare time to be able to rewrite the entire meshing system and implement some long needed improvements and also thought of a way to get around the dreaded block placement system what I have right now.

The meshing system what I had before had to be severely limited because I could not think of a way around the vertex limit with Unity. Unity has a 16 bit vertex limit which means that a mesh cannot have more than 65534 ( 65536 - 2 for triangle strip ending ) vertices in a mesh and any voxel based mesh can easily eat away at this limit with a small chunk. Previously I was using 8x8x8 blocks per chunk ( 512 blocks ) which is quite a small amount of blocks when you look at a voxel game. Comparing that to the new system, I can easily have a chunk made up of 16x32x16 blocks per chunk ( 8192 blocks ) which is 16x larger and runs at the same speed as before. I reworked the entire system, writing it back up from scratch and implemented an adaptive meshing system, it will now create new meshes when it reaches the vertex limit, this means that I can have infinitely sized chunks and never get any out of bounds errors. I tested the system on chunks with a massive scale 16x256x16 blocks per chunk ( 65536 blocks ) which renders very slowly ( due to its large size ) but proves that my meshing works. I would probably never have a chunk this size due to the fact that the render time would leave the player waiting for much longer when loading.

I think that its very important to try and find a balanced chunk size, something what loads at a decent speed but also is not too small. For me, 16x32x16 seems like a pretty decent size for chunks, it is not too small and it renders at quite a fast rate.





Looking at the image above, you can see an example of how a 16x256x16 chunk looks like inside the editor. Notice that it has 4 separate meshes.

I currently have a lot of work to do with the game and I need to rewrite a lot of features before it becomes anything playable.

Thanks for reading and keep checking the blog for more updates.

Thursday, 19 September 2013

Block Placement

Hey guys,

I spent the last few days adding a few important features such as Block Placement, Chunk Notification and used some of the very nice unity pro features to make my game look a lot better. I took two screenshots of a scene, one with unity pro features enabled and one with them disabled, here is the difference:


As you can see, the top one is from the free and the bottom one is the pro version, I used SSAO ( Screen Space Ambient Occlusion, Light rays and real-time shadows to achieve the nice effect of the bottom screenshot, these are pro only features which is why I am trying to get hold of Unity Pro, for now I am using the 30 day Pro Trial.

Anyway guys, Here is a link to the latest build of the game :

https://dl.dropboxusercontent.com/u/177467929/0.0.11/0.0.11.html


Controls:

W S A D = Movement.

Left Click = Break Block.
Right Click = Place Block.
Scroll Wheel = Change Block.

P = Enable Console ( Not very useful at the moment but in the future, I plan to make it programmable ).

As usual, thanks for reading and keep checking the blog for more info!

Friday, 13 September 2013

Recoded Rendering

Hey guys, sorry for the long period of time without an update, but the reason for that is because I have been spending my time to re code the rendering to include custom shaped blocks as well!

The way i do it is similar to the way minecraft does it, I have render types which allow me to base the block off a mesh, this way i can quickly load custom shaped blocks by referring to the mesh files.

Here are a few previews of what i have achieved :

( Transparent Blocks )

( Custom Log Render Type )

( Thin Block Render Type )

I have also managed to activate a trial version of Unity Pro, the reason for this is because the pro version has a script profiling which helps me manage my CPU and Memory usage and find sources of lag, I would get the pro version but its quite hard to raise the kind of money needed to pay for it , ( $1,500 ) which to me is a lot!

Anyway, as always, keep checking the blog for more updates!

Sunday, 25 August 2013

Terrain Updates!

Its been a short while since i last posted so i guess i should notify you guys of my progress. Over the last week, i have been focused on the chunk loading and terrain part of the game, i have managed to overhaul the chunk loading and terrain completely for a much better looking world, i doubled the size of the loaded area, however it still looks too small, i need to think about how i am going to do for long ranged terrain, I might possibly use a simple mesh deformed with the height map data to look like you can see far away.

Here is a preview of how the new terrain looks :





As you can see, it looks much more realistic, more " smoother " and much bigger which allows for much more emphasis on the look of the world, before, the hills were rapid and very repetitive which made the game look very plain and boring, I think this feature lets the game feel much better.

Anyway, thanks for reading and as always, keep checking the blog for more updates!

Saturday, 17 August 2013

Improved chunk loading

Hello again,
The last few days i have been working hard on trying to make the chunk loading work and I finally got it to work! I found out that the issue was due to floating point precision, unity was turning values such as "0" into "0.00000381497" which is pretty much 0, however when your searching for a certain value, it gives null errors everywhere, this was easily solved by rounding / flooring the values to integers.

I also worked on adding basic terrain to the world, it generates at a decent speed with a couple of lag spikes in between loading chunks, this is increased when you move the chunks faster and faster, bringing the FPS down to around 5 if you spam the key, however this wont happen in game because the player wont be able to move that fast.

For any of you who want to try the game, please visit this link :

https://dl.dropboxusercontent.com/u/177467929/build_0.0.1/build_0.0.1.html

There are still rendering issues with chunks, you will still see through a few faces of the chunks, just a little bug i need to fix, but the main focus is on the chunk loading and not rendering for now.

The controls are ( W , S , A , D ) for movement. Please note, there may possibly be some Null Errors still, these are due to the grass blocks trying to spread outside the chunk bounds, this wont affect anything right now.

As always, thanks for reading this entry and keep checking the blog for more updates!


Saturday, 10 August 2013

Chunk Loading

Hello again, For the last few days i have been working on the chunk loading / unloading, and after hours of pulling my hair out, i finally started to get somewhere. I have been reworking my mathematical functions, optimizing them and allowing for the game to run a lot faster. If you want to see how far i have gotten with the chunk loading, please click this link :

https://dl.dropboxusercontent.com/u/177467929/WEB_Output.html

( W S A D to move the chunk loading area around )

This version is still glitchy however, sometimes you cannot move the chunks around ( something i am currently working on fixing ) however apart from that, it runs pretty well.

This blog post is quite short because i have lots of work to do, so as usual, keep checking the blog for more progress!