• Register
Post news RSS Devlog #1: Let's destroy this world!

Soon we will be able to discuss the matter of playtesting with you. For now, we are happy to announce the very first devlog! Grab a bucket of popcorn and enjoy the show! We will teach you how to destroy the Earth!

Posted by on

Hello, my Scouts!

Soon we will be able to discuss the matter of playtesting with you. For now, we are happy to announce the very first devlog! Grab a bucket of popcorn and enjoy the show! We will teach you how to destroy the Earth!

Or you can read, but it will make eating popcorn a bit less comfortable.

What happened to Earth?

Let’s start with a story. You didn’t have an opportunity to explore it yet as we focused more on the technical aspects of the game in our demo.
The overexploitation of natural resources as well as atmospheric pollution, have caused a series of environmental catastrophes. Right now, an ice age prevails on the surface.

Who is the main character?

It depends on which game mode we are discussing! Generally speaking, you are a Scout! A mercenary, member of a group of trained miners, scientists, and soldiers under the arm of PowerCorp.
During story mode, you will get to know Mason Tombstone - a war veteran and leader of a group of Scouts. Hired by PowerCorp to find the earlier expedition, he got lost in the darkness and now has to fight with those things that interfered with earlier operations. You know this type of guy. He is a badass!

Why go underground?

The lack of sunlight and the cold weather has only deepened the energy crisis. The heat of the earth's core is what keeps people alive.
Humanity, however, has found hope. Deep underground, a crystal with enormous energy potential has been found. Lumen is exactly what humans need now.

Now the hard part...

Fully destructible environment - how does it work?
The idea of destructible terrain is nothing new. One of the first popular games to use this concept is Scorched Earth. A game from the days before the Internet. We can say it’s Lumencraft’s grandpa!

ezgif com gif maker 1

Looking at the Gif we can imagine what is happening behind the scenes. For each pixel of the terrain the algorithm checks if there is a pixel missing below if so then moves it down.

The algorithm that handles pixel movement is very simple and it’s called Cellular Automata. Algorithms based on cellular automata have great flexibility but are also extremely slow. Lumencraft uses a custom optimized variation on Cellular Automata to simulate fluids a.k.a. everybody’s favorite lava.

But before we dive into this, we need to explain what the map looks like.

ezgif com gif maker 3

The terrain map is stored as an ordinary image with transparency. In the recording, we are switching between the final view and the no-effects view.
For recording purposes, the materials view displays different types of terrain in different colors, but in reality, they are saved as shades of green. The red value tells us how badly the material is damaged, which in the final view manifests itself as a texture of cracks. There is also the blue channel where fluid-specific information is stored. But that's a story for another time.

Last, but not least there is a channel responsible for the transparency of the texture. And here we hide the information about whether the material should collide with objects in the game or not.

An example material in the game can be represented as a material stored as RGBA.

Example 1.
Red: 127 - half damaged.
Green: 1 - material identifier.
Blue: 0 - not relevant.
Transparency: 255 - collides with in-game objects.

Example 2.
Red: 255 - full red color.
Green: 25 - material identifier.
Blue: 100 - pixel distance from the source.
Transparency: 0 - does not cause a collision with the player.

Note: **the way material data is saved in the image will change as new materials are introduced**.

A sample map might look like this. In fact, this is the map of the first version of the tutorial.


As you can see, without processing the input map, the most visible information is the damage level (red value) of the terrain, and Lumen, which has a high green value (material ID = 27).

Processing the map into what we see in the game happens via the shader. The shader processes the map pixel by pixel and based on green values of the input texture it replaces it with desired material texture, making it look like we see in the game.

ezgif com gif maker 4

This way we have a lot of flexibility in modifying what our terrain looks like.

Fully destructible environment - what it REALLY does?

When we drop this fancy tech talk, we are left with something a bit less elegant, but definitely more fun. DESTRUCTION! Feel free to destroy everything you see. Use your drill, explosive materials, and even the ultimate, destroying force - the boss that digs his way to the player. As a Scout, you control every pixel of the map. You can destroy and modify all of your surroundings. Sounds rad, am I right?

We have watched you doing crazy things in the demo version of Lumencraft! You can even draw using the drill. We are thrilled to see what will you create with Lumencraft after we are done with it.

That’s all we got for you today!
If you have any questions find us in our Discord and we’ll be happy to answer all of them.

And once again we ask you to help us survive in this unwelcoming environment. Wishlist the Lumencraft on Steam⚙️, join our Discord 🎧 server and follow us on Facebook 👍 and Twitter 🐦

Join our fight! We need your drills!
2Dynamic Games

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.