When Ragnar Svensson and Christian Murray began working on a simple, accessible 2D game engine in 2008, they had no idea that three years later they'd be selling it, and their company to one of the world's biggest casual gaming companies. Nor that, shortly afterwards, they'd be working, albeit vicariously, for Activision as a result.
The engine in question is Defold, a tool which excels at exactly the sort of game which has brought King such success. It's fast, compiles almost instantly and brings a real immediacy to development. Now released by King for free for anyone to use, privately or commercially, Defold actually began as a way for Murray and Svensson to make sure they weren't taking too many shortcuts, hacking away at existing issues.
"Christian had already started making his own game engine at home, I had started making my own game engine at home," Svensson tells me at Nordic Game. "When we just realised that, we just figured we should do something together. When I looked at his that was far superior to mine so I just threw it out, forgot about it and started moving on with his stuff.
"It started by just solving the performance issue, making it perform from the design and architecture rather than manually, that's part of the game development which we were used to. Like putting something on a different thread because there's a core available, all those type of hacks you do. Just to settle that issue, that's all we intended to do but as soon as we saw that working... because the biggest challenge design-wise was how to produce that thing and still have it like something that people could actually understand and use."
"We wanted something for everyone to use, just to both tie them together as a team but also to cut away in terms of dependencies. The artist not having to be dependent on the programmer to produce a build, for instance"
It wasn't long before the prototype started to take shape, turning into a useful and productive tool. However, the pair quickly realised that to fully reach its potential, there was much more to be done, including the production of an editor, one which was integrated into Defold - something which everyone could use.
"We wanted something for everyone to use, just to both tie them together as a team but also to cut away in terms of dependencies. The artist not having to be dependent on the programmer to produce a build, for instance, like putting the art in there and actually managing to get a build out of it without the help of a programmer, things like that. So we of course had two big pieces of software to make, the game engine and the editor. We always wanted to have rapid delivery so we started all of this when working with just the two of us, in our own company, and then the decision to do it as a web service came from the fact that we saw the mobile platform exploding in terms of games.
"There were typically very small teams on it, they typically didn't have any money because they were doing the indie dream, coming from nothing, maybe a few savings, trying to make it big, so we wondered how can we get money from them. So we needed many of them, we needed to scale it up and we charge a little from each. So we were looking at a rate of... I don't remember... I think it was around $20 a month or something like that. Quite cheap but it would accumulate to salaries for us.
"We had two paying customers, ever, so we earned $40 a month, that was the peak of our success. [Laughs] I hadn't saved money going into this and that was a mistake, there was a lot of mistakes being made. We were really naive and just wanted to create something."
But with a team of two, who were also trying to make ends meet with other work at the same time, getting Defold to a state where it could become a commercial success was almost an impossibility. Svensson says it didn't take long to realise how much they'd taken on.
"I spent days in the forums just trying to be really good, giving the best support ever, and then thinking 'fuck, I haven't coded. I need to code and I haven't produced the fucking Facebook page or whatever to try to market it', and it was just a sorry state of affairs. So that led to the idea that Christian came up with: that the big studios have problems with production just like everyone has and I bet they will be interested in what we are doing. We saw ourselves being like 20 times faster working on Defold rather than what we did before. It's not about a particular state of genius in our minds as programmers, it's more about how we produce the software.
"So we just assumed someone would be interested and for that type of company paying two extra salaries to get that production help is really a small thing. It seemed like this might actually work. So that's essentially what we did with King, we worked there as contractors, but it was about them acquiring the game engine at first. Maybe they had that idea the whole time, I don't know, but it was a surprise to me, I didn't see that coming, I wanted to own. But at the same time I really believed in it - it's like my baby - I thought it would be massively useful for a lot of people to use it to make games. But I also felt fucking tired and I have no money and I'm at a different place than I was when I started this. Spending three or four years pushing this stuff, doing releases, so that also made the idea of parting with it in terms of ownership easier. We were also promised that we would still remain in control, keep ownership, as such...Of course you can't trust that fully because you never know what will happen."
So in 2013 King bought the engine tech and brought both Svensson and Murray on board as permanent members of staff. Three years later, the company was giving away the engine for free. And not on the Unity/Unreal/Crytek model either. Just completely free. Why?
"I guess the external availability becomes like a boundary or a constraint you need to live with. You can't do these things any more and that improves the technology"
"The whole push to even do that came from me and Christian originally. It was just something we said from day one when we started with them, 'this is how we see things going'. That purely comes from our experience of doing in-house technology. We don't have any interest in doing that any more because of... you know, you're making it just for the sake of maybe one release of the most important game or something and you need to sort of destroy the technology a bit to make that release happen and it also creates like a...not a laziness, but too much margin for people when planning. They know that you can fix it at the last minute, you don't need to plan for it when you have it... I guess the external availability becomes like a boundary or a constraint you need to live with. You can't do these things any more and that improves the technology. Keeps it safe in a way, protects the technology from these bad short term decisions.
"So that was just a way to make it better, was just a reason. And for it to be interesting as well, I don't think we would stay too long if it just became an in-house technology because you would see it rot. That would be really depressing because we spent so much time making it better than that. So that was the first reason. The second reason was to convince King that it was a good idea. That they were not just paying for it blindly and getting nothing in return. So we needed to think about what's the actual value if we don't charge no money for it what's the actual value for King?
"There's so many different aspects to it that I think are valuable, just for King to give back to the ecosystem in a way because, I mean, the technology that King uses as a requirement for their business are things like Linux and all these other technology that are just free to use, you don't pay anything for them, and they have built their success on that. They could never account for as many users without these type of technologies. So morally or ethically it makes sense to also give back to what caused your success in a sense."
There are some other benefits. Being a lightweight, 2D dedicated engine, Defold has a small footprint, whereas bigger, more capable engines like Unity for such a project ends up with a lot of unnecessary bloat. That might not be a problem on console, PC or even browser, but on mobile, especially in emerging markets where dataplans are tight and on-device storage is at a premium, a small install can make all the difference. Svensson says that those developing markets are very much part of King's strategy, but not so much theirs.
"It's definitely part of the thinking for King in acquiring the technology, because as you say it's such a big market for them. For us however it really wasn't. What we want to do is to make a streamlined engine because that's the best way to do it. Then you're not bound to a particular high-end device or anything, so I think it's really great that it works for the developing countries and all of those kind of different markets where they're on completely different hardware, old versions of Android still, but I think it's more about at all times just looking at how can we as developers and programmers make as good a job as possible: sort of like what Google does with its search, for instance. That's just accessible, it doesn't have a lot of stuff it in, people can use it everywhere and it just becomes a much better thing.
"So I think that's more where we came from, even if we would only focus on a PlayStation 4 we would still try to make the executable as tiny as possible. It just helps everything. It shrinks the compile time for us when we build it, it's just better in every type of way."
"from the moment we started when we quit our jobs - obviously that was really stressful, ending your career in a sense, potentially - we always thought like next month there will be someone who kicks our butts"
All of this begs an obvious question: in an age when mobile games and simplistic puzzlers have become so prevalent, why were they the first people to create a dedicated engine? Svensson is prosaic about potential competition.
"It's a really good question and we always thought, from the moment we started when we quit our jobs - obviously that was really stressful, ending your career in a sense, potentially - we always thought like next month there will be someone who kicks our butts. Who will just make all of our work useless by just providing something better. Since we wanted to provide the best solution that would just make it meaningless for us to keep at it. Maybe we would struggle for a while but if they were fundamentally better than we were we're not here to compete at running the fastest, we're here to just open up new setting bars, or like presenting new ways of doing stuff. That's what we're interested in.
"That never happened, we saw a few things that worried us, like... or not maybe worried but first when we saw them thought like oh this is the one that crushes us. Then when we looked at it deeper no they didn't get this or that, this seems like, I wouldn't say half-baked but they really didn't think or through or we really still have really good value here that no one else does. Up to this day I still haven't seen anything. Of course, maybe there is a far better thing out there but I haven't seen it yet. I thoroughly believe that since we try to just optimise and improve and do this in a very ground up type of way that's just what we're interested in. And as soon as there's a better alternative I quit. [Laughs]. Then I would use it and make games with it."