itch.io is community of indie game creators and players

Devlogs

Revision 0: World Building

Veil Mirror: Ghost Control
A downloadable game

Hello there!

It’s a me, Chris. I’ll be writing about how we accomplish different things in the game on a technical level. So massive desillusionment (if that’s a word) ahead.

Today, lets talk about how we deal with building play space and what to do to light it up.

I have my game development origins in making maps for a number of Valves games. So for building the house layout there was only one option. I wanted a CSG workflow. A technique long forgotten by many yet extremely powerful.

As it goes with rough layouts, it consists of primitive shapes and some measurement textures only. Those textures are great to get the scale of things right. Everyone surely has come across the games with exceedingly large toilets or chairs you’d have to climb to sit on. Measurement textures are a great way to avoid that from the beginning.

Of course making custom fit assets like the round trim on the ceiling is somewhat more involved but that’s a topic for another day.

So CSG options in Unity. There are two as far as I am concerned. SabreCSG and RealtimeCSG. The latter used to cost about 50 bucks on the Asset Store but it’s now Open Source and you can get yourself a copy on github. And maybe contribute to its development.

I opted for RealtimeCSG because it has an inverted-world workflow in which brushes case out the world rather than adding to it. Sounds weird at first but it’s amazing when creating indoor scenes. A room is nothing but a single brush. Changing its form in any way is a matter of changing the brushes shape.

Now that we have a room to look at, it’s time to light it. In that regard there are two topics that need consideration.

First: The light design. What kinds of lights do we want, which colours should they have and what purpose will they serve?

Second: The technical question of what kind of light model should we use?

But why does it look good like it does? Simply because blue and yellow are complementary colours. It works with any colour you pick. Try it and see your lighting improve. But don’t overdo!

How about the lighting though? We don’t want to require a beefy super computer to run the game. So we decided that realtime lighting isn’t the way to go. Although many are doing it. We went with a technique that comes with Unity called Shadowmasks.

It creates lightmaps (static lighting) in which lights contribute indirect light (that part of the light that is reflected off of surfaces and such) and shadows. Their direct light will be realtime though.

Not bad at all I should think. And you won’t need a super computer to play this at a decent framerate.

Hopefully …

Cheers anyway!

Read comments (1)