• News

• Industries

• Learning & Support

• Community

• Marketplace

BrickGame

I’ve been working on a simple Minecraft-style procedural-world and user-building game using UE4. You might have seen it over in the Community Content forum, but now that I have a video I decided to post in WIP!

I’m releasing it under a BSD license (open source); the code and a build from last night are on GitHub: https://github.com/AndrewScheidecker/BrickGame

Awesome, keep it up!

minecraft evolved! Brilliant

Nice going! Is it using real voxels or something else?

everyone tries to make minecraft with better graphics

What do you mean by “real voxels”? It stores a 3D grid of brick materials, which are technically voxels, but I am deliberately using the term “brick” to mean “voxels rendered as faceted cube” to distinguish it from the so-general-as-to-be-meaningless “voxel”.

Minecraft evolved. Looks really nice, keep it going.

I worked on ambient occlusion today. I got it working pretty well, but it needs some tweaking. The biggest problem is that since each brick can affect the ambient occlusion all the way to the bottom of the grid, changing a brick causes a hitch as it recreates the rendering data for a large number of bricks. There’s room to make that more efficient, as well as computing a tighter bounds for what needs to be updated.

Looking good Andrew!

We need a game like Minecraft but you build whole planets.

How did you calculate the ambient occlusion like that? Nice work.

I just trace straight down from the top of the grid, and mark all bricks above the first solid brick as having direct sky visibility (and those below, not). Then I apply a 5x5 box filter in the XY plane to that to get a fractional occlusion value. Finally, I turn it into a per-vertex value by averaging the occlusion of the 8 bricks adjacent to each vertex.

The code is here, but it’s poorly commented at the moment: https://github.com/AndrewScheidecker/BrickGame/blob/master/Plugins/BrickGrid/Source/BrickGrid/Private/BrickAmbientOcclusion.cpp

I posted a new build here with the ambient occlusion, plus a bunch of optimizations: https://github.com/AndrewScheidecker/BrickGame/releases/tag/v0.7

I also made an animated GIF comparing with/without AO!

Andrew, you’ve been impressing me with your code since the days of your Terredit program

Hey Necrophobic! It’s been a long time.

I hacked LPV emissive to work last night, so my emissive bricks now light up the world:

However, the ambient occlusion value I use to prevent the sky ambient from affecting indoor areas also prevents those areas from being lit up by indirect and emissive lighting from the LPVs. I’m trying to figure out if there’s a good way to work around this, or if I just need to do an ambient occlusion style CPU-lighting hack.

This is pretty awesome stuff man, considering I didn’t think a game as dynamic as Minecraft could be done in the Unreal engine. Are you going to get chunk streaming in to do large, random worlds, or are you just messing around with the graphics side?

My psychic powers sense another coming of minecraft clones!

Aside from that great work.

Awesome you worked on some LPV stuff, as the emissive was completely broken and didn’t worked to begin with (;.

Looks awesome, very good Job with that keep it up!

Thanks for the explanation on the ambient occlusion. Very nice work!

Can you repost the AO code? I get a 404.

Hi @TheAgent, you can still access the source directory, and from there you can see that the file was slightly renamed: BrickGame/BrickAmbientOcclusion.inl at master · AndrewScheidecker/BrickGame · GitHub

Cheers!