Coding 'till the morning light

On an alien world, a spaceport is built on a desert area bordering a mountain edge. The port is used to transport resources to space and allow workers to travel back and forth between the mine colonies and their homeworlds. The stone-cold desert ground consists of a hard, sandy floor. At night, the thin atmosphere freezes over and forms an ice layer on the sand.

This is a shader effect I made as part of a multitexture shader for the terrain. The shader takes 6 textures: ground (the sand), ground overlay (the ice) and ground mask (for blending ice on sand). Same for the walls. What happens is when the time value (0.0 to 1.0) hits night (1.0), the ice is completely covering the sand. During day (0.0), the ice is not visible at all. A straight blending would result into a fading transition between sand and ice, which is rather boring. Inspired by this tutorial on melting snow, I decided to spice it up.

The code for melting is really simple and requires only two lines. First, we need to determine whether or not to melt at all based on the time value. Then, we blend the ice with the ground by the mask value (as we would using normal multitexturing):

You can now use groundColor to draw with gl_FragColor, or apply it with further multitexture mixing (e.g. by determining whether you're drawing on a wall or a flat surface). The edge of the ice in the example is rather hard. If you want to apply smoothing, you can use smoothstep to do that. The code will be:

With some creativity, you can create many different environments that look alive and in motion: growing vegetation, filling water channels, solidifying lava streams, glowing runes appearing on the floor, your imagination is the limit ;).

As long as I breathe, I wont give up on my child project! Spaceport Exo has been reincarnated many times on many different platforms and visualisations. I think this is the best attempt so far on Android. Although the 2D version I did earlier this year advanced pretty far as well, the new 3D approach works rather smooth and feels quite natural. In the screenshot here are different shaders at work: multitexturing on the terrain, skycube, and default phong shading all combined with distance fog to make seamless transition into the skycube backdrop. There is a day-night cycle on the fog, but this is not yet implemented on the models.

Been pondering around with shaders in LibGDX, and I'm getting the hang of it!The fire model has a distortion shader on it in 3D space. Around the fire model is a heat cone which functions as a mask for post-processing the rendered scene with another distortion shader. Works well on desktop but it still need optimisation for Android, it's not functioning too well. A few other glitches are also yet unfixed: alpha of the fire model and heatcone masking when obscured by other models.

In addition, I added a virtual reality option including gyroscope controls: rotating the camera with your head. Works very nicely.Next up: LeapMotion to designate targets and fire missiles by waving your hands? :-)

The Shellworlds project got stuck. It became too complex at some point and I wanted to take a simpler approach for a game. I was looking for a concept that was easy at the core but very scaleable in assets. After watching a Minecraft SimCity-esque mod called Simburbia I decided to try and make a building game. Strategy games are amongst the hardest to create, but that is mainly in balancing, not in the complexity of the code. Choose buildings, place 'em down and watch the effect. If things go poor, start optimising. The interaction is simple enough.

The scaleability lays in the variety of buildings. Buildings can unlock other buildings and influence the environment (polution, happiness, land value, traffic, ...). I decided to split the building gameplay in two parts: placing buildings on plots, and placing "lanes" with trees, roads, railroads or rivers around the plots. This way the player can lay out the city with the plots, and optimise with the lanes to try and get the most efficient city. It also adds a welcoming level of detail in the visuals.

Started developing a small new game based upon the Profit One Trillion game I posted earlier.This game is about starsystem management. You are in charge of the interplanetary infrastructure, and must try to optimise the distribution of resources harvested from planets as well as you can. Due to the limitations of spacerift channelers, shellworlds can only transport large amount of resources and people to other shellworlds when they are in range. It is your job to determine which planets get a shellworld, and what function it will perform (industrial, commercial or residential).

Here is a nice picture showing a random star system with planets and their range indicator circle, and active spacerift lanes.