iakov.dev

CEGUI vs IMGUI

· 1 min read

This is the code to create a button in CEGUI:

// Create window
wnd = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Button", "JumpPushButton");
wnd->setPosition(CEGUI::UVector2(CEGUI::UDim(0.75,0),CEGUI::UDim(0.50,0)));
wnd->setSize(CEGUI::UVector2(CEGUI::UDim(0,50),CEGUI::UDim(0,50)));
wnd->setText("Jump!");
CEGUI::System::getSingleton().getGUISheet()->addChildWindow(gJumpBtnWindow);

It’s ugly. It reminds me of a joke by Charles Bloom: how to lose game developer love.

Here is how creating and using a button should look:

if ( gui.button("Cancel")  )
   cancel_job();

A Leap Motion controller is on its way

· 1 min read

Video

It looks like I’m going to receive a Leap Motion controller. I applied for a developer unit some time ago and had forgotten about it.

The Leap Motion is a small device that sits in front of the keyboard and tracks your hands and fingers in the air above it, so you can control the computer with gestures without touching anything. The technology looks promising. It reminds me of the interfaces in Minority Report.

Iron Cube vs reality

· 1 min read

Iron Cube vs reality

It turns out the trees from Iron Cube exist.

The photo above is an avenue in a park where the trees are clipped into tall green boxes on bare trunks. They stand in straight rows on both sides of a mown lawn, with a gravel path crossing in front.

In Iron Cube every tree is a brown voxel trunk with a green block on top, which is about the simplest tree a voxel world can have. Someone has grown and trimmed the same shape for real.

6000 animated entities in the Glow engine

· 1 min read

Video

The video above is a stress test of the Glow engine with 6000 animated entities in one frame.

There is no special optimisation in this scene. I haven’t used instancing, the usual way to draw thousands of copies of the same thing cheaply, so every entity goes through the normal rendering path. It can go faster than this.

Iron Cube on Mod DB

· 1 min read

Iron Cube on Mod DB

I’ve made a page on Mod DB for Iron Cube, a multiplayer game in a destructible voxel world. It’s the tank game I’ve been building for the Intel Ultrabook contest. The screenshot at the top is a night scene from it: the tank firing across a lake, with cubic trees all around.

The alpha version is available to download here.

Random screenshot

· 1 min read

Random screenshot

One day left until release.

This screenshot is a small test scene from my tank game for the Intel Ultrabook contest. A single block of voxel terrain floats over the sea, with one cubic tree and the tank parked next to it. The block is cut off at the edges, so you can see the layers of the voxel field: grass and sand on top, dark earth underneath.

My tank game for the Ultrabook contest is nearly done

· 1 min read

My tank game for the Ultrabook contest is nearly done

My game for the Intel Ultrabook contest is close to finished. The screenshot shows where it is now: voxel terrain around a small lake that reflects the clouds, with rows of blocky trees on the hills behind.

One problem is left. I still don’t have a certificate from Symantec to sign the code, and I’ll have to get on without it for now. I’ll write more about the game later.

Greedy meshing with baked ambient lighting

· 1 min read

I’ve upgraded the greedy mesh generation algorithm I described in August. It now supports ambient lighting prerendered into a texture. The voxel world is made of cubes, so there are only so many ways ambient light can fall on the side of a cube, and I can prerender every combination into a texture. That also answers my worry from August that vertex-based ambient occlusion would be hard to apply to the optimised mesh.

Greedy mesh generation should speed up both rendering and physics updates a lot. Voxels go to physics as a mesh, and it’s the same mesh I use for rendering, passed straight to Bullet physics.

Greedy mesh with prerendered ambient lighting and its triangle wireframe; the stats show 112 triangles

The previous, “dumb” mesh generation:

The same scene with the previous mesh generation: 2176 triangles

An Ultrabook from Intel

· 1 min read

I’m taking part in The Windows 8* & Ultrabook™ App Innovation Contest, and after I passed to Round 2 Intel sent me a laptop for free. It’s a brand new Ultrabook on Ivy Bridge with a dual-core CPU with hyper-threading, a 240 GB SSD, a touch screen, a multi-touch touchpad, a compass, an accelerometer and an ambient light sensor. It’s a pre-release reference device and Intel has some disclosure conditions, so I can’t write much about it (and I’m too lazy to write a lot anyway).

Automatic voxelisation of a 3D model

· 1 min read

I’ve been playing with automatic voxelisation of a 3D model, using the tank for my new game as the test.

The original model:

The original polygonal tank model

The model after voxelisation:

The same tank after voxelisation into a 50x50x50 voxel field

I voxelised it into a 50x50x50 voxel field, so the resolution definitely needs to go up. The model is rasterised into the voxel field one polygon at a time, in a similar way to the 2D scanline algorithm.