• Register

Strategy Mill has been an innovative designer and developer of PC-based strategy games. We love gaming and focus on creating well-designed, highly enjoyable entertainment experiences.

Post news Report RSS Design Table: 5. The Swedish Lagom

Interested in learning about new tech? What about talking with our developers about the details behind our game design and creative direction? Perhaps you're more interested about what the devs have hanging in the studio walls? Well, we'll be launching a game development series called "Design Table" where all of these questions will be answered!

Posted by on

In this edition of Design Table, we will be exploring Swedish programming philosophy. Presented by lead designer Gellert Keresztes, we are leaping into the world of Soft Coding!

I received a lengthy email from a programmer about three weeks ago, asking about Hard Coding vs Soft Coding and so I've decided to make the segment part of our series. Many programmers and developers consider Hard Coding to be something written purely by novice “newbie” programmers or by people too lazy to create an elegant solution. There are also those that would tell you - “you need to embrace the fear of change and just update the code” as if Hard Coding was an all excluding philosophy. I would argue for, that the answer is not Hard Coding vs Soft Coding but ultimately just the right amount. Sounds vague? In Sweden we have a term, “lagom”. It means something that is just about right and perfect. Like the atmosphere in a lovely Scandinavian office. Not too hot, not too cold, not too moist, not too dry, not too bright, not too dark, not too quiet and not too loud, simply; lagom.

71f0e8cf85 Lagom

The Polar Opposites

Before we delve into the ins and outs of the Swedish language any further, let me just define the extreme of Hard Coding as the method of “embedding everything directly into the source code regardless if it should belong there or not”. Usually, this causes a nightmare with providing too few mechanisms for the users denying the ability to customize. To return to our analogy, wouldn’t you want the ability to customize at least the heating or cooling to preference? Some of us northern Scandinavians have a hard time understanding the preferences of southerners, who for odd reasons, insist on bringing the heating above freezing. Have they never heard the expression “to keep a cool head”?

Soft Coding is the opposite of the hard coding practice. It essentially is the “externalizing of everything from the source code into some external resource, regardless if it should belong there or not”. Providing too many decisions and a complex variety of options can easily overwhelm the users. Imagine if you were handed a gigantic remote control controlling every aspect of an office’s atmosphere mechanism. The likelihood is that you would leave most setting on default (arctic fresh) and just do minor tweaks because complexity in of itself does not equal functionality. Enabling each separate sensor chip and selecting power source and sequence of startup is something you most likely will not fiddle with when you just want some of that awesome, wintery, Viking temperature.

Readability and Performance

When working with game development, especially when developing a game engine, it can become tempting to only see the benefits in using Soft Coding by not having to create custom versions of the software. It might seem like an easy solution to just provide generalized functionality and provide guidance, training and perhaps documentation. The truth though is that customization should serve to meet the needs of its users. It is imperative to recognize that all projects need lagom amount of both Hard Coding and Soft Coding to become well-functioning and that the two are not opposites where one needs to eliminate the other. Instead, the relation between the two are more often a complementary balance between readability and performance.

That's it for today’s edition of Design Table. Next week, we will focus on the topic of Character Creation. If you would like to send in questions or write us feedback on today’s session, you can either do it via Twitter, Facebook or email and we will possibly make them part of the next series.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: