Showing posts with label minecraft. Show all posts
Showing posts with label minecraft. Show all posts

Sunday, February 12, 2012

Flying through ModernCity

The whole "send surfaces only instead of whole chunks" bit now works properly, so I thought I'd show you guys a video.



(Omagosh I'm allowed to embed Youtube videos again? yay!)

It seems the screen recorder didn't only kill the frame rate as per usual, but also messed with the occlusion queries. So you'll see the occasional hole in the terrain. Let's see if I can figure out why this happens...

Edit: Fixed it by changing the occlusion system. We'll leave that for another blog post. In the meantime:



Tuesday, July 26, 2011

New test data

There has been a lot of activity recently around Cubic Chunks, a Minecraft mod that raises the height limit to 4096. Some of the old yMod maps have been dusted off and converted to this new format. Since it is based on McRegion, it isn't difficult to import in Hexa.

One of those maps is ModernCraft. I just wanted to show some screenshots, because it looks awesome.




Saturday, December 18, 2010

Minecraft level reader

Most of the framework consists of modules that can be chained together. One example is the part that reads and writes the game world to some kind of persistent storage. The default module is something that sits on top of the face-meltingly fast sqlite. (Bonus: save games are just one single file, not thousands.) And of course there's the binvox reader. But yesterday I wrote a module that can read Minecraft files, just to have some cool pre-made worlds to test with.

This module reads a Minecraft chunk, slices and dices it in 8 cubes, roughly translates the block types (far from perfect), and passes it to the server. Everything higher than 64 blocks is air, everything below -64 is rock. If the requested chunk is outside the map, it falls through to the "null" module, which does nothing. This triggers the terrain generator, which right now is a simple, infinitely large flat plain.

Today we're going to have a look around the Broville map. It is legen... wait for it... dary:






One of the problems I've encountered here is that windows don't let much light through:



The room is rather dark for several reasons.  One, the walls are 1m thick, so the sides occlude a good part of the sky outside.  Two, there's no radiosity: the light doesn't bounce around the room like it usually does.  I was planning to add a radiosity pass after I've implemented point light sources, and it should be interesting to see how much of a difference this makes.

Even the church with its big windows looks gloomy... (The trees right in front of all the windows don't help either...)



If the radiosity solution doesn't work, I guess people will have to build huge sun-facing windows and place plenty of lanterns. :P

(Minecraft doesn't have this problem; the light is always spread out across 15 blocks in a diamond pattern.)

The next step would be to convert the light map back to the Minecraft files. It would look odd once MC's own light model takes over again, but perhaps it'd be a cool addition for the static parts of a multiplayer map.


Also, check out this blog entry. Very interesting techniques! I've been toying with the idea of using geometry shaders to build the meshes, and this is an excellent demonstration of how to do that.

Tuesday, November 30, 2010

Hey, all the cool kids are doing it

"I'm doing a (free) voxel game framework (just a hobby, won't be big and professional like Minecraft) for 386(486) AT clones." ;)

Oh you have to be kidding me, another Minecraft clone?? Well... sorta. :P  Right now the focus is to create a framework first, and use that for some games later on. I have several ideas, and a good foundation will make it much easier to explore them all. And who knows, maybe this will also be useful to someone else, so it will be open source. (Not yet, but coming soon. I really need to clean up the code a bit first.)

Most importantly, however, it's a learning experience. I have never done any 3-D programming before, and an Infiniminer-esque game is a great way to get your feet wet. :)

It's written in C++, and uses Irrlicht.  The project is still in a very early stage, but there are already a few fun things I can show you. One of my test cases is the famous Stanford dragon:



I've used binvox to generate a 512x512x512 voxel model from the .ply file.  The shadows are computed using ambient occlusion. This is much slower than Minecraft's sunlight algorithm, but I think it looks nicer. (In theory, it is possible to import a Minecraft world, recalculate the light voxels, and export it again. However, MC and Hexahedra are two different beasts, and this is probably easier said than done.)

To be honest, I am amazed at how fast it runs. Sure, I have a nice graphics card (GTX 260), but such an unholy amount of texture mapped cubes in 60 fps? Probably more if I turn off vsync? I'm sure this is old news to everybody else, but this makes me all giddy.

Next time: more about lighting, and showing off the terrain generator.