Celebrating 20+ Years of Cube: An in-depth interview with Aardappel

<swatllama> Thanks for sitting down with us, aard. Do you want to introduce yourself to people, tell us about yourself, your background, what you do?

<aardappel> Yeah, sure. I’m a programmer originally from Holland. I’ve spent most of my life making either game engines or programming languages – I tend to alternate between the two. That’s kind of what I worked on and I guess the Cube games have been my most well-known personal projects on that side.

<swatllama> Speaking of your day job, what have you been doing at Google since you started?

<aardappel> The first years that I was there, I was part of a games team, with my job particularly being to write libraries and other things and other tools to make it easier for people to develop games on Android and beyond. Later on, as part of that team, I got involved with the VR team and helped them with the libraries we’re building as the underpinnings for a lot of the VR work that was happening at Google.

I made a bunch of libraries. The funny thing is that, the simplest of those libraries, or at least one of the earliest ones that I thought was going to be the simplest, which is Flatbuffers,  was also by far the most successful out of the work we’ve done there. That kind of started when I joined Google. And that was supposed to be my initial project, maybe lasting a couple of months and then being done. And, that just kind of blew up. It blew up particularly outside of games as well, with a lot of large companies adopting it for their serialization needs. And because of that, I’ve been working way more on Flatbuffers. 

That was the start of when I was working there, then I got the opportunity to work with the guys making  WebAssembly,  and I just kind of had to jump at that opportunity because I’ve always been such a fan of programming languages and compilers, so I joined the WebAssembly team. I’m still doing flat buffers as well because it’s simply too popular to not work on – but my main task is actually now working on WebAssembly, in particular, on LLVM and other related tools implementing WebAssembly, and that’s been a ton of fun as well, because I do believe WebAssembly is going to be kind of the intermediate format between languages and platforms going forward. So yeah, super excited about that, working on things like LLVM and, in general, compiler stuff is a lot of fun for me, especially since I’ve spent so much time working on games, so alternating these things is a good thing for me.

<swatllama> So is it correct that you started working on the original Cube engine in the late 90’s / early 2000s, after your PhD work was completed while you were teaching at Guild Hall?

<aardappel> Not quite, no. I did a fair bit of the initial work of making my first 3D engine during my PhD. Towards the end of my PhD is when I started working on the Cube engine. And then, I transitioned to working for Crytek, the makers of Far Cry. And actually I think the Cube engine helped me land that job in the sense that the then-CEO of Crytek saw the Cube engine and was particularly excited about the idea of the in-game map editing that it was presenting, and he had all these ideas about how Cryengine was also going to have in-game map editing. And while I was working at Crytek, because I ended up talking to a lot of other game programmers and lots of close friends there, somehow I got inspired for the octree based format that was the basis for Cube 2. So Cube 2 I actually designed and started working on during my time working at Crytek. And then only after leaving Crytek and after Cube 2 was already  released that I started working as a teacher for Guild Hall in Texas.

<swatllama> The first release for Cube on Sourceforge was 2002, and your site has it listed as 2001, but it sounds like you had older releases much earlier than those dates.

<aardappel> Yeah. Releasing it on SourceForge was a relatively late thing. Initially, it was just me hacking on a bit of source code and I did not use source control or SourceForge or any of that stuff. It was just me, and then after a while Lee Salzman – eihrul – came in. The first version of Cube had this really simple TCP/IP based networking. Me and him were already talking a lot about programming languages, so naturally I showed him what I was working on on the engine side, and he was not working on anything like 3D engines at the time. He was like, well, “that’s all very cool, but this TCP/IP based networking really has to go. That is absolutely terrible. You can’t do that in games”, which I agreed to, but I didn’t have time to do anything else. 

That’s when he decided to start making this little library called ENet, which was kind of developed in parallel with Cube, becoming Cube’s networking engine, and he tested it with Cube. I was developing on Windows at the time, he was a big Linux user and also was working on Mac, so he started helping me out with porting. And then, Cube 2 came around. He got more and more involved and even got involved in graphics – and eventually, as you all know, eventually ended up taking over maintenance entirely. As for the timeline initially, I’m not sure exactly when Lee started getting involved and it became a two person project, but for the first half year or so, the sourcecode was just on my hard drive, and that was it.

<swatllama> So then did you release it to SourceForge specifically because you wanted to release it as a game versus just a little engine demo?

<aardappel> I guess we brought it to SourceForge because it was easier for me and him to work to get it that way. With the very first version of Cube, it was mostly a whole bunch of my Quake and DOOM map editing buddies, basically people I used to play with at the time. They were the people that were most interested in playing the game and playing with the engine and making maps for it, so I probably just had a binary on my website. And the thing was at the time, everything about that whole game was incredibly small. I mean, much smaller than the distribution you can still download today., the first binary of Cube could actually fit in only 64k with some compression. The maps were tiny; like the first version of aard1, which is one of the maps I made, was just like three kilobytes or something. I made most of the initial sounds for the game, which were all 8-bit 11KHz sounds. I think textures probably must have taken up the largest amount of space in the first releases, but the first release was only a couple of megabytes in total space.

<swatllama> When did Cube transition from this kind of editor you used to a fully fledged game that was played and people tried to actually get good at and what-not?

<aardappel> It didn’t transition. It was pretty much a game from day one in the sense that the absolute first release of Cube had that basic first person shooter game playing there. The thing about it was definitely, the first versions were only multiplayer first person shooter gameplay. The single player gameplay was something that came later. It took quite a while. So initially you just had deathmatch and co-operative editing things you would do with Cube, but that wasn’t there right from the start, like the first version I ever showed to my friends had the first-person shooter game in it. I’m not sure how long it took me to add the single player game play, but that must’ve been the first year as well – it couldn’t have taken too long. That was definitely a very separate thing. I remember having to take some time to do that.

<swatllama> So Sauerbraten pops onto the scene, but Cube still had a release in 2005. How long did it actually take before Cube was basically “dead” – when did Sauer become the Cube game everyone plays?

<aardappel> All the other parts of Cube that were not the world structure – so we’re talking about the gameplay, the networking, sound, single-player, all these other parts – I was fairly happy with. Of course it could be better, but that was no motivation with the initial version of Sauerbraten. I really wanted to only overhaul the world structure.

I just took a copy of Cube 1 and started replacing the world structure stuff with the octree stuff, just incrementally and all the rest of the stuff remained. The initial version of Sauerbraten probably shares at least half the code with Cube 1. We did not start over. It was all about the world structure. I started feeling that the world structure for Cube 1, being essentially 2D, was starting to get a little bit limiting. Particularly, I think that the worst thing for me about the Cube 1 world structure was the lighting. 

It basically had vertical lighting where there was like one light value for the entire range of the entire height of a particular column. Cube 1 has 2D lighting. It basically computes the lighting for any particular point in the world in 2D, and it also does the occlusion in 2D. While it works decently, it is very incorrect in all sorts of ways. All the good mappers from that time really had to work hard to try to make the most out of the lighting system of Cube 1.

It was nice because it’s super quick because doing the lighting in 2D meant that everything recomputed instantly. We even had lights on the rockets that would just recompute as the rocket was flying through the world, because it was so quick and simple.

All very nice, but visually didn’t look quite as pretty as any of the Quake games, mainly because of its very simplistic lighting. So that was the thing I wanted to fix, but the problem was that with the Cube 1 world structure, there was no easy way to do lighting in the third dimension because if you have like the side of a wall, there was no place to store individual lighting values along the wall. It would have greatly complicated the Cube 1 structure and made it way slower..

Sort of thinking about these possible 3D structures, octrees are really one of the simplest possible sort of these spatial structures. But just plain octrees, as in cubes, I wasn’t satisfied with, because Cube 1 already had these nice facilities for being able to make slopes. And if you remember, even the first maps like aard1 had these beautiful arches that were kind of nice and round and stuff like that.

I wanted to keep this ability to have slopes in there, but now things got more complicated, because in 3D, the slopes must be able to be placed in all six directions, basically. So that’s when this system which I call the deformable octree was made, where basically every cube that sits inside an octree has a plane and a plane can be pushed along four edges to shape a cube in any possible shape, and I thought the combination of the octree and these deformable cubes would give mappers a suitable amount of power to make pretty maps while not being too complicated. I also found a way to store those six planes in the cube in a very, very compact way so that maps would not be gigantic. So that’s kind of how that came to be. That seemed like a natural progression from what had been in Cube 1.

 <swatllama> What was your involvement in the Sauerbraten community over the years? We noticed you pop into the community discord during Corona times, but for instance, I’ve never interacted with you before and I’ve been here for almost 12 years.

<aardappel> When I was still involved with it, there was quite an active multiplayer community, but active leagues were something that was a little bit later. I must’ve gotten less involved around 2009 or something like that – that’s just a rough guess.

[Editor’s note: I started playing in 2009, which was around the height of PSL and never saw this homie.]

And of course it was not one particular moment. It was kind of gradual. I got less involved, and Lee became pretty much the sole maintainer. I would say that at least since 2010 or so, Lee’s been the sole maintainer. And even before that, he was way more active than I was.

So, yeah, I’ve missed a lot of the last 10 years of Cube’s community, especially in terms of leagues and multiplayer. I’ve missed a lot of that, I must admit. It’s absolutely awesome that Sauerbraten keeps attracting new people and keeps them continuing. That’s amazing. I absolutely love that.

I think that’s generally the case with games now because the internet and open source, that games don’t ever die; they might shrink a little.

<swatllama> These days, Sauer’s pretty much entirely updated by eihrul with a little help from a few contributors, most notably Quin adding bots 12 or 13 years ago. Who was involved more heavily in the early development of Sauer?

<aardappel> I’d say programming wise, not really, for the longest time it was really just Lee and me. That’s maybe my fault, because I’ve made Cube so much about simplicity that I was at least initially very defensive about people adding or modifying things that I wanted to keep things simple, and Lee was one of the few people that was able to do that, so we never had really a lot of programming contributors – like in the initial, early days at least there were more, but there were a ton of mappers and people making art and models and sound and music. Those were a much wider group of people that were really fun to work with, but programming wise… I personally never interacted with Quin too much. That was mostly Lee doing that. So for me, it’s been mostly just Lee and me for as long as I know.

<swatllama> So… what do you think of the 2020 release?

<aardappel> Yeah, I downloaded it, and pretty much went through all the maps and checked out all the new ones. And man, it’s amazing. Like, some of the maps, what they are able to get out of this engine is just absolutely gorgeous.

<swatllama> What were your favourite maps from looking at them?

<aardappel> I don’t remember names from my session of going through those maps. I haven’t played a ton. That’s the sad part, I guess. I only tried it in single player. So I’m not actually aware of how it now feels different in multiplayer.

<swatllama> Marc A Pullen has done the Cube and Sauer music forever. How’d you get such a talented dude?
<aardappel> I think I knew him through DOOM. I had as ton of Quake and DOOM mapping friends back then, and I guess he came along with that. But yeah, some pretty cool music he’s made.

<swatllama> Overall, what do you think of your legacy in the open-source game community? Cube, Sauer, and AC have been some of the most popular open source games for years, and all stemmed specifically from your engine.

<aardappel> All this convinces me how valuable it is for games to have fun tools for users to create stuff like user generated content. Content is such an amazing thing that games should make more use of. I mean, the fact that Sauerbraten is not a commercial engine, is an open source game and still has this much content… I think if you go look for games that have custom maps, Sauerbraten is probably one of the games that has the most amount of maps available for it, even though it’s not even a commercial game. It’s pretty amazing to think. 

The other thing I will say is I still love Sauerbraten’s physics the best of almost any game, probably even better than the physics in the Quakes that I play. The feel of running around – I remember when I got the 2020 download and the movement felt so great. It feels so precise for some reason, the ability to kind of like jump from one place to another, land on a thin pole and to be able to keep on jumping from that pole to some other spot, do a difficult jump, that’s always been the best in Cube. So I’m also saying that because I’m actually working on something new right now and I’m totally reusing Cube’s physics because it’s just the best that I’ve ever experienced. 

I’m just going to say, it would be interesting to consider, like if Sauerbraten is going to survive for another 20 years, where it would be worth at some point to get it, to get it on GitHub. The problem with doing everything on GitHub is that it also requires a lot of energy for the head maintainer, so it would not necessarily be any less work for Lee to have it on GitHub because you know, rather than implementing it yourself, you can have someone else implement it, but then you need to do a lot of reviewing

<swatllama> Oh a new project!! What is it?

<aardappel> I’m not going to say it’s another game, because one thing I’ve learned through the ages is to not make promises on what you’re going to make, because then you’ll end up not doing it. So anyway, I’m not promising I’m making a game. That said, I am working on a new 3D game with  graphics that are fully GPU raytraced in pixel shaders. The raytracing is going to happen entirely in pixel shaders. It could be done in compute shaders, but there’s no advantage to using compute shaders for what I’m doing, so I do it just in pixel shaders.

It’s again, made out of an octree, so it’s all very familiar. The graphics rendering side of that is getting somewhere. It’s not complete, but it certainly looks very pretty and interesting, so the next step is to add the physical world and physics. That’s what I’m doing right now, and I’m actually using the Cube physics for that for multiple reasons. First of all, it fits very well because this game is also based around an octree and you’re going to be jumping around on a bunch of cubes. So that works very well. Then the next step is to make sure that things like shooting and other things happen. So then before you know it, you’ll have a very basic shooter game in the engine. Is that going to become a game again? Again, making no promises, but I would certainly like it to go in that direction eventually.

 

<swatllama> This is not a “Cube 3”.

<aardappel> No, this is not called Cube 3, even though there are some similarities between the Cube engines and what I’m making right now. Technically it’s very different though, because like I said, it does raytracing for graphics. No polygons are involved. It’s purely voxel based, and all the gameplay code is written, of course, in Lobster, my own program language. In terms of code structure, it’s very different from the Cube engines, but you know, some people never learn and keep making the same game over and over again. And that probably includes me.


Check out Aardappel’s projects at https://strlen.com/ and https://twitter.com/wvo

The long-form version of this interview with many more questions and discussions is available here!

4 Comments

  1. Marc Pullen

    Thanks for the mention for the music (I’m Marc), people still find me all the time on my youtube page with many fond memories of Cube and Cube 2/Sauerbraten. :)

    Reply
    1. notas

      Cheers Marc! Everyone loves the sauer soundtrack – I know I’ve gotten a ton of mileage out of listening to it when i wanna get away to a sauer state of mind at work or driving or anywhere else. Correct me if i’m getting this memory crossed – you were ‘fanatic’ right? of fanatic_quake and fanatic_complexities

      Reply
    2. swatllama

      Yes, I love your music, Marc, and spam links on the Sauerworld discord to it every now and then! Keep making stuff <3

      Reply

Leave a Reply to notas Cancel Reply

Your email address will not be published.