Night falls on the forest

The biggest inspiration for Trollskog, at least where the visual style is concerned, is the work of swedish artist John Bauer, whose work has informed much of the popular conception of swedish folklore.

The past few weeks, I’ve been thinking about the mood of John Bauers works, and the technology needed to try and convey it in the medium of a game.
A common element in his paintings is darkness. Whether set in a cave or a deep forest at twilight, the tales depicted are filled with mystery and wonder, and this feeling simply isn’t communicated effectively in bright, sunlit environments.

As counterintuitive as it sounds, to depict a scene at night convincingly requires more lighting than depicting the same scene during daytime. This is because there’s only one light source that matters during the day: the sun. You might think that transforming day to night is as simple as dimming the lights, but there are a lot of light sources that make themselves known when they’re no longer being drowned out by the sun. Especially in the work of John Bauer, there are many light sources of varying subtlety; important characters and objects light up the environment and create a feeling of magic.

The graphics engine of Trollskog was not equipped to deal with multiple light sources - a traditional “forward renderer”, every new light added to the scene increased the complexity: the scene needed to be redrawn for every light source, which quickly led to performance issues when rendering detailed environments. Fortunately, the technology to achieve high performance with many light sources has been around for a while, in the form of a “deferred renderer”.

There are a lot of online resources that describe this rendering technique, so I won’t dwell on the implementation details here. But here are three pictures that show the core concept: the geometry buffer:

Above: The screen-space normals - Here, we have normals for every visible surface. That is, the X, Y and Z component of the vector that points away from the surface, encoded as R, G, B colors.

Above: The albedo map - Simply, the color (or albedo) of each visible surface, as yet unaffected by lighting.

Above: The lighting map - Using the above two images, and the depth buffer, we can generate the light map independent of scene complexity.

And the final result - the combination of the above.

Finally, you can see the dynamic lighting effects in motion here:

Back to homepage

More posts from the development blog of Trollskog...

The roadmap to v0.9

Since the early access release, I've had my nose buried in my keyboard, fixing bugs and not posting too much about upcoming updates and features - in part because there's been a major backlog of bugs to work through, and because future features have a tendency to change. Now, with the game rapidly approaching a stable state, and with a clearer view of the updates ahead, it's time to share the future roadmap with you.

Pathfinding fix

I'd say the bulk of my development efforts since the early access release has been iterating on the pathfinding, but at last, it is just around the corner. In the dev branch (and in a few days, on the steam build), units no longer get stuck on terrain or buildings. I’m still dissatisfied with group steering, especially in combat - fighting units tend to trip over each other and struggle to get into melee range. I'm looking to resolve this before releasing the next patch.

Improved AI - Attacking, expanding, trading

This is being worked on. As far as rabbit holes go, this one is deep. I’ll be making incremental improvements rather and releasing them together with other new features. Expect the AI to become a little more competent and engaging with every new patch.

New units

There’s some new combat mechanics waiting in the wings, such as buffs and debuffs, auras, armor and damage types. I’ll be unrolling these together with new units that make use of these mechanics in interesting ways. The new units in the pipe are the Slinger (a tier 1 ranged status caster), as well as the Seider, Skalder and Noaidi (Tier 2 and 3 aura-casters)

Food rework

As I’ve mentioned in a few other places, the food mechanic needs some love. I’ll be adding more food engines (rather than the dummy simple “put grain in bakery”) and adding a survival mechanic.

Tier 3 rework

It’s no secret that the last tier is a bit of a placeholder still. This will be fleshed out with more resources, buildings and units.

Harvesting rework

The current harvesting mechanic - specifically, the dotted line around each city - was not really intended to be in the game for this long. The new design will revolve around building specific structures to collect different resource types, such as granaries and lumber mills. I’m not entirely finished with the design on this one, so the dotted harvest radius line will remain for a while longer.

Main Quest Chain

Not going to spoil the plans for this one, but there will be group of procedurally generated “main quests” that can be completed to achieve sweet victory.

Save rework

Currently, every patch breaks existing save games, and each save file is on the order of several megabytes. This makes autosaves an unappealing concept. To fix this, I’ll be replacing the current serialization layer (Protobuf) with flatpak, and separate the serialized gamestate from the data-model that’s used in-game.

Future roadmap from 0.9 to 1.0

With the above features in place, the game will be in a good spot to be taken from Early Access to released. It's too early to give specific details here, but in all likelihood, when we get past 0.9, I’ll start marketing the game again, focusing on a Mac and Linux build, as well as the holy grail - Multiplayer. The big roadblock for this one (on a technical level) is the “Save rework” bullet point mentioned above. As it looks today, the serialized gamestate is a bit too cumbersome to be transmitted over the wire. Hopefully those pieces will fall into place as the patches roll out.

Want to share your thoughts? There's a discussion thread on the steam forums or you can hit me up via any of the social media links in the page header.

Early access on August 19!

For the first time, Trollskog is swinging open its doors and inviting you to share in the experience. On August 19th, the game will be available world-wide on Steam for Windows PC.
This is an early access release, which means the game is not yet content complete, but it is in a stable and playable state.
If you would like to participate in the community as the game continues to grow, you are welcome to join us!

Unit showcase - The berserker

The berserker is a new addition to the earlygame, capable of quickly engaging ranged enemies and delivering solid damage.
Equip him with a blunt club for an immobilizing stun, or an axe for maximum damage.

Steam store page opens up!

Some time ago, Trollskog was greenlit on steam. Finally, the store page has been published.

There'll be more details to come on this site, but we're open for wishlisting!
Additionally, the next test release will be moving on to the Steam platform, so the alpha accounts on this site will be replaced by steam beta keys.
If you registered an account here previously, you should be expecting an email within a few weeks.
If you didn't register, well, it's not too late...

To the walls

Walls and towers are a staple of real-time-strategy games, and Trollskog wouldn't be complete without them.
Here's a sneak preview of this latest feature:
(Click the image for full-res)

Placing archers on the walls will help keep those frontier settlements well-defended.