CppCast - ScummVM

Episode Date: April 23, 2021

Rob and Jason are joined by Eugene Sandulenko. They first discuss the announcement of Visual Studio 2022 and Facebook open sourcing a new machine learning library. Then they talk to Eugene Sandulenko ...all about ScummVM, how the project got started and more. News Visual Studio 2022 coming this summer Flashlight - a C++ standalone library for machine learning open sourced by Facebook 2021 Annual C++ Developer Survey "Lite" Links ScummVM Sponsors Incredibuild

Transcript
Discussion (0)
Starting point is 00:00:00 Episode 296 of CppCast with guest Eugene Sandalenko recorded April 21st, 2021. Today's episode is sponsored by Incredibuild. If you're like me and don't like waiting for long C++ builds, tests, and analysis results, then you should check out my friends at Incredibuild, because expert developers don't wait. In this episode, we discuss the next Visual Studio version. Then we talk to Eugene Sandalenko. And Eugene talks to us about ScumVM. Welcome to episode 296 of CppCast, the first podcast for C++ developers by C++ developers. I'm your host, Rob Irving, joined by my co-host, Jason Turner.
Starting point is 00:01:23 Jason, how are you doing today? I'm all right, Rob. How are you doing? Doing okay. Any news you have to share? Anything cool you're working on? Anything like that? No, not really. Okay.
Starting point is 00:01:35 I mean, I keep thinking I wanted to be doing more live streaming on my YouTube channel, so I'll probably be aiming to do that once every other week or so now, looking forward. But that's not a promise or a guarantee of any kind. Any particular things you want to be streaming i want to do some code reviews okay um yeah but uh we'll see okay well at the top episode i'd like to hear a piece of feedback i got uh two youtube comments today actually uh this first one i think these were both on the episode from two weeks ago uh nikolai vutka uh this first one is hey hey, I love the podcast. Can you guys please bring Jonathan Wakely and Christoph Kolhoff to the show?
Starting point is 00:02:11 And I don't think we've had either of them. Christoph, I believe, is the maintainer of Boost ASIO. Oh, okay. And Jonathan, I believe, works for Red Hat. I'm sure they both make excellent guests. Yeah. And this other comment we got, uh, was please talk about C++ in mobile app development.
Starting point is 00:02:28 And we certainly done, uh, shows in the past talking about mobile development. It's probably been a while, but I'm not really sure, you know, what, uh,
Starting point is 00:02:40 specific topic we would cover. I'm not sure like what the latest in tooling or anything like that in C++ mobile app development looks like. I have no idea. Yeah, so you might need more specific suggestions for someone who's actively in that space these days.
Starting point is 00:02:58 Right, yeah. That sounds like a good idea. So comment. Let us know. Yeah, yeah. Definitely. Well, we'd love to hear your thoughts about the show you can always reach out to us on facebook twitter or email us at feedback at cpcast.com and don't forget to leave us a review on itunes or subscribe on youtube joining us today is eugene sandalenko eugene has been with the scrum vm project since 2003 and lives in the netherlands currently his day job is manager of software development in the travel industry, and programming is his evening hobby. Eugene started programming from the
Starting point is 00:03:28 days of Big Iron, such as System 370, PDP-11, and Voxen, and is programming in several programming languages. The coolest part was doing security-related things in Common Lisp. Eugene, welcome to the show. Thank you guys for inviting me. Hi, Rob. Hi, Jason. Hey, Eugene, there's a lot to unpack in your small bio here. Like I don't think we've had anyone else on who talked about programming in the PDP-11 days. Yeah, that was interesting. So I'm originally from Ukraine, so those were the clones, Soviet clones of those machines. And this is where actually I learned C. C++ was not there at the moment.
Starting point is 00:04:05 It was in 1989, I believe. This is where I started. And what is interesting about those things is that for a long while, I was thinking this is a proper development environment because they were so well thought of. Of course, now when looking back and understanding that there were 20 users for 5 megabytes of RAM, that's a difference. Now you can run it on your watch. Right.
Starting point is 00:04:35 I'm also kind of curious, what security-related things in CommonList, what is that about? That was a really nice thing have you ever heard about uh death challenge which was in the 90s when death was cracked for the first time and this is by the way when the distributed compute computing was born probably not rSA was running this challenge. They wanted people to crack DAS, Data Encryption Standard, which was proven to be theoretically weak by that point. And they wanted to demonstrate that it is truly weak. And they encrypted a message and they ran a prize. And there were several companies, not companies, several groups, three groups which were running this. This is when distributed computing was born. But why I'm talking about this, my former boss, he was in
Starting point is 00:05:38 the winning group, Matt Curtin, and later he even produced a book about this. And I was very happy to work with him for six years in his company, which is still operating. It's called Interhack. And it is doing white hat security analysis and privacy analysis. One of the things which the company was working on was Sony Rootkit, if you heard about it. Yes, we were doing this forensic analysis for this. So basically they installed the Rootkit on their audio CDs, so when you put it into your computer it will share like like a
Starting point is 00:06:27 rootkit shadow and a shadow silently install and prevent you from ripping it right and there was a big scandal when people realized that what is happening and we were acting as a security specialist this is one thing what I was doing on common lisp it was um data flow analysis on the website for analyzing is there is a third party link of the personal information to third parties maybe at that point maybe you heard about double click later acquired by google but at the time there was a huge exposure like uh internet was very immature. And for instance, when you were browsing Amazon, then whatever a third party advertisement providers where they saw content,
Starting point is 00:07:15 sometimes given your credit card numbers, content of what you look in what you browse in, and they were collecting it silently. And this is what's the services which I was writing a piece of software and common list for this. I think DoubleClick actually has an office near me, too, or did. Yeah, those were interesting times. Yeah. Yeah. All right. Well, Eugene, we got a couple news articles to discuss to start off.
Starting point is 00:07:39 Feel free to comment on any of these, and we'll start talking more about the work you're doing on Scum, okay? Mm-hmm. All right. So this first one is a blog post on the Visual Studio blog, and this is announcing Visual Studio 2022, and that the preview is going to be available sometime this summer. And kind of the really big headline about Visual Studio 2022 is going to be that it's going to be a 64-bit application. All the previous versions of Visual Studio have been x86, and it should be pretty huge to have more memory available on a big tool like Visual Studio.
Starting point is 00:08:17 To me, the biggest question this raises is, are they then also making the linker by default the 64-bit compile? So, I mean, today, if you make a 64-bit application in Visual Studio, Visual Studio is 32-bit, the compiler is 32-bit, the linker is 32-bit, but it can still, it generates, it cross-compiles the 64-bit binary. One of the projects I work on, we always have to go in whenever we set up the project, go to build the project, configure it in CMake, we have to say explicitly, I need you to use the 64-bit linker, otherwise the linker runs out of memory. So I want to know if this is going to default to making the compiler and linker the
Starting point is 00:08:57 64-bit versions also, which would be, I think, handy for a lot of large projects. We'll have to find out. I mean, I'm sure when we get closer to the release of Visual Studio, we'll have someone on to talk about the new version. Maybe we can find more details on that type of thing. Yeah. The other thing I wanted to point out, specific to C++ in this announcement,
Starting point is 00:09:21 is they are saying C++ 20 is going to be available in visual studio 2022. And they did also say that it's going to be a binary compatible. It looks like with previous versions of C++ runtime, which I guess means they're not doing an ABI break with this version. It appears they are not doing a binary. Yeah. Right. So that part,
Starting point is 00:09:44 I find a little disappointing because I think we were hoping that they might break it because I think the past three versions have all been the same ABI. Yeah. And I've seen some rumblings on Twitter about this because some of the stuff that they've implemented for C++20 already is they need an ABI break
Starting point is 00:10:05 to get proper C++ 20 compatibility with those library features. And so it'll be a question to see whether or not they break at least their C++ 20 parts from Visual Studio 2019 so they can at least have correctness here. Yeah. Eugene, anything you found particularly interesting
Starting point is 00:10:23 in this one? Are you a Visual Studio user? Well, I'm not. I'm not a Windows user in general. I would voice my opinion because I have at this point. Visual Studio, I consider this personally as the best idea for C++. But unfortunately, I consider Visual Studio is not a C++ compiler. We've had it. It is not a C++ compiler. Why?
Starting point is 00:10:53 Because we call it, it's a Windows code compiler and Microsoft Office compiler. We deal with portability. And there is so many quirks they just silently inserted in the behaviors. So when you're writing something which will perfectly work on Windows but will horribly blow up on other platforms and Microsoft Visual Studio will just silently swallow it. You will have no output and only like static analysis tools which could help you potentially. Again, because it's a good thing that they use it, they
Starting point is 00:11:32 use Microsoft using Duckwood and use it in-house for development, but then of course having the access to everything, not the black box but white box, they tailor it to their needs and this is why uh why is this statement i think they've been improving it over the past few years as far as like making the compiler more conformant though absolutely yeah yeah yeah the permissive minus flag right that too yeah but but that's the thing we have unfortunately to talk about about this mar Marvel software as they are improving. So they are getting there, not like they are pushing
Starting point is 00:12:09 forward the standards and everything. It's been a long process. It is true that literally for the entire time that I've been using C++, there's always been a question of, oh, well, Visual Studio allows that thing that's not in the standard. And it has been slowly yeah, slowly chipping
Starting point is 00:12:25 away at these things, but since as far back as my memory goes, 96. Like, it's always some little thing. Well, Jason, it's just five minutes ago we were talking about it. They have deliberately kept the ABI compatibility. So things have to leave.
Starting point is 00:12:42 Bugs have to leave. Which, I mean, it does make some things easier, but it does make some things worse for sure. Yeah. All right. Next thing we have is a new library. It's available on GitHub. And this is from the Facebook AI research team.
Starting point is 00:13:02 And it's called Flashlight. And it's a new flexible machining learning library right in Tyrone C++. Do you have a chance to look at this one, Jason? I did not we I you know, I am so someday I'm going to have to make like a machine learning toy project just so I can talk about it and not sound like a moron. Yeah, I mean, it's certainly something I've not had any reason to use myself, but it certainly sounds interesting, and it's
Starting point is 00:13:29 good to see another library like this being open-sourced for the community. Have you done any mission learning? Yeah, sorry. Not just open-source, but open-source under BSD license. Oh, is it? Yes. So that's a big difference for many purposes. That's great.
Starting point is 00:13:47 And then last thing we have is the C++ Annual Developer Survey for 2021. And this is the light version of the survey. I don't remember if there's a heavy version of the survey, but it's always good to look at this and kind of see what the state of the community is like. I don't know, were there any particular questions you wanted to highlight in this, Jason? I know you added this to the show notes. I did. There's some things that kind of did stand out to me
Starting point is 00:14:16 that like, however these respondents self-selected to fill this thing out, over 35% of them have more than 20 years of programming experience. This is clearly not a survey that's selected for, you know, people right out of college or something like that. So that kind of stood out to me. And then, you know, I did notice that there's a fairly high percentage of game developers that responded here, like 35% also.
Starting point is 00:14:47 I think that was the highest category of like what you're building in C++. It's that question, right? Yeah. And so it kind of matches part of my expectations that you know, like sure gaming game developers is a large community, but is by far not the majority of C++ programmers, because the other 65% makes up all of the other random things, right? Like all of the industries that people never stop and think about. But yeah, I don't know. Something to flip through here. It's also overwhelmingly selected
Starting point is 00:15:16 for Windows developers. Yeah, Windows was the highest. And then I think Linux server followed by Linux desktop. That was interesting. Well, it really correlates with the game, right? Yeah. Right.
Starting point is 00:15:29 That's a good point. Yeah, it makes me wonder. Game console. Okay, yeah. That's like 12% of people said that they do anything that works on a game console. All right. Well, Eugene, could we start off by you telling us a little bit more about what ScummVM is? Absolutely. So ScummVM is a lethal program. 3.1 million lines of code at this moment.
Starting point is 00:15:54 3.1 million? Yeah. All right. This is not the code, this is software lines. This is called software lines of clock, right? Software lines of God. So minus commons minus white space. This is the real meat, 3.1 milli. It started by desire of two guys independently to play Monkey Island on their Linux machines. Okay. It was in 2001, but they quickly met somehow online, and this is how ScumVM was born. And the name is misleading, I would say, because Scum
Starting point is 00:16:36 is coming from LucasArts. Script creation utility for Maniac Mansion, and then virtual machine because inside of it it's a virtual machine with a P code. But at this moment, ScanVM is a collection of 9090 engines. We now work not only with the adventures, point-and-click adventures,
Starting point is 00:17:00 but also text adventures and RPGs. So the project is about taking some game which has interest among somebody, like some capable developer, reverse engineer its engine fully and rewrite it in a portable sequence plus. So it's not an emulator like for a platform like DOSBox. It is not a simulator. It is just an engine being rewritten and ported to the new platform.
Starting point is 00:17:33 Sometimes it's reverse engineered. Sometimes we obtain the source code from the original developers and port that one to our framework. So sometimes it's just one-to-one direct port. And this is how it works. This is what it is about.
Starting point is 00:17:50 That's interesting. How often are you able to actually get the original source code to some of these older games? I can tell you that lately, like more and more often. So first of all, we already, good thing or not, but we already addressed the low-hanging fruits. So the simplest game, simplest engines, I mean, not the game itself, but from this perspective on the internal code, have been already reversed.
Starting point is 00:18:15 What is left? I can split many game engines for this, for adventures, into two big categories, like one of the splits.-coded ones and those which are using scripting. So hard-coded ones, that means that when you have a certain room or location on your screen, that means all the interaction, all the objects you have C code or C++ for assembly, they're responding for this versus scripted when they develop some kind of a intermediate language which is then used by the artist and then you have a compact
Starting point is 00:18:53 virtual machine sometimes even like with as low as 30 different opcodes which just executes those game scripts and that means that the whole thing is small versus huge to give you an example uh scum itself uh it is a virtual machine scum vm and it supports about 30 different games and it is about 90 000 lines of codes while uh starship titanic is, this game which was recently reversed, one single game but fully hard-coded, 110,000 lines of code. It's incomparable by effort. And if you strip down SCUM to the minimal to a single version, it will be like maybe 15,000 lines of code versus 10 times, almost 10 times more.
Starting point is 00:19:43 So that's a difference and when you as a reverse engineer want to take a look at that then if the game has 150 locations you can imagine the reverse and 150 quirky like game logic what to do these days like flags, etc. Of the games that you support in ScumVM, how many of them tend to be the game engines, that is? How many of them tend to be this hard-coded versus scripted game engines? By the way, I haven't answered fully your previous question.
Starting point is 00:20:20 Oh, sorry. Go ahead. The previous question was how often we had the source code, the original source code. The thing is that lately, more and more often, because the project has a reputation, we are going to celebrate 20 years this year. And we are known with our anti-piracy, strong, strict anti-piracy policy. We don't do this, but this from what users don't like it because they prefer to just snatch the loaded legal copy and then play it. But the IP right owners, they do love it because
Starting point is 00:21:01 collaborating with us that means that they can put their old title on steam or good of games gog.com or to dot emu this is french like gog or just start playing by start distributing by themselves but without the risk that we will leak the game or start distributing game assets by ourselves. So I can tell you, maybe by my assessment, maybe 40% of engines which we have, we get the source code. 40%? All parts of it. Wow. That's my guesstimation, 30-40%, like a pretty solid amount. It started from the first source code which we obtained was in 2002,
Starting point is 00:21:48 one year when the project was one year old. It was the source code for Beneath a Steel Sky, which was followed by Broken Sword 1, Broken Sword 2, and it was very good collaboration with Revolution Software until today. And Beneath a Steel Sky, there's a couple of games It was very good collaboration with Revolution Software until today. And it's beneath the steel sky. There's a couple of games that are fully, freely available on your website, right? Yes.
Starting point is 00:22:11 At this moment, we have, I believe, eight titles. I didn't check. Because recently, we had another game, Freeware, which is great. And yeah, it is Nippon Saves. It's a small Italian studio, now defunct, and we added an engine like 12 years ago, I believe, and now the game is freeware.
Starting point is 00:22:32 Then Beneath a Steel Sky, Flight of the Amazon Queen, then the Draskula. You can go to ScumVM games, and then you can see the list of the games, which are really downloadable. So you mentioned see the list of the games which are a lot really downloadable so you mentioned uh that the original authors of scumvm got involved because they wanted to be able to play the monkey island games how did you get involved in the project uh i myself at that time was working on freebsd it was my home machine and in a local shop I purchased a localized version of Full Throttle. I liked
Starting point is 00:23:06 the box, I liked how it looked, the description of the game looked nice, and I was thinking how to run it. Wine was I believe at the time was pretty unstable, so I googled
Starting point is 00:23:22 and I quickly found out there was a ScumVM. I launched it and it didn't work. It was crashing because of the localization. So I fixed that. It was my first patch. I continued of playing the game and if you were playing the game there is a bike fuzz. And when that particular place in the game started there was another pop-up from Scumbag. Hey, this part of the game is not implemented. So we pretend you run it. Here is what
Starting point is 00:23:52 you get from it. Go ahead. You can proceed and complete the game. This doesn't give me the full experience. I would like to see. At that time, I had experience with reverse engineering already. Several years I was into the different the mobile phone reverse engineering like this firmware those games who didn't give yourself themselves in nineties the unlimited lights so you reverse engineer and the patch the
Starting point is 00:24:21 executable and I started and this is what's interesting, because when I thought I would like to reverse engineer it, the team members, my future team members, good luck, Eugene. And then I realized, because it took me over three months, it's 100 kilobytes of code
Starting point is 00:24:40 load. The subsystem codenamed by LucasArts Insane, because it is insane. It is six-state machines. Some of them have over 150 states. Oh, my goodness. Imagine this humongous switch statement, and then different small flag manipulation, basically, between the states.
Starting point is 00:25:04 This was... But I did it, and this is how I got into the project. So were you largely looking at the disassembly, trying to figure out what it was doing in that case? Precisely. We are still using Interactive Disassemble, IDA. And you just launch it, you see assembly, and you start to think, okay, what is this memory block? What is this reference? What is
Starting point is 00:25:29 what program? Okay. It allocates something, apparently 200 bytes, and later it uses it for something with graphics. Oh, maybe this is a palit. And this is how you do it. And then you, okay, this is maybe palit or you are understanding, okay, this is maybe palit,
Starting point is 00:25:49 or you are understanding, okay, these are functions which are referring to the disk. Okay, file something, and then later when you see how they are used, you start naming. It's a tedious process, takes many months usually, and sometimes people just give up. And this is how you do it. Because you understand, right, when you compile the code, and very, very rarely, we had only a few rare occasions
Starting point is 00:26:12 when people forgot to strip debug symbols from executable. So you have nothing, only numbers. And this is how you do it. And at that time, of course, there was no decompilers so you're working only with disassembly only with x86 disassembly and it's difficult i'm curious if dosbox had been well established and wine had been working better or qmu or vmware any of the other free virtualization things had been well-established in 2001, do you think SCUMM VM would have ever really gotten its start?
Starting point is 00:26:48 Or do you think the original developers would have said, oh, that's fine, I can just run it in DOSBox? DOSBox came to maturity pretty quickly after that. Right. But there is a huge difference because DOSBox is an emulator, which means that the CPU requirements are huge. Right. SCAMVM is able to run, and we had old ports,
Starting point is 00:27:11 which were running 25 MHz machine with as low as 2 MB of RAM. Okay. SCAMVM runs there. Of course, not every engine, but it does. DoSbox requires. VM runs there. Of course, not every engine, but it does. Those folks require it. I remember only in the middle of maybe five years ago or so, mobile phones became powerful enough to run those folks, like Android. But SCAN VM was there for over a decade now.
Starting point is 00:27:39 Now, I'm also curious, you said you have lots of publishers that actually want to work with you and they'll give you the source code under agreement. Have you had anyone try to shut down a game engine port saying, you know, claiming patent or copyright issues or anything like that? Yes, we did. And this is, by the way, one of the reasons which we have this strong anti-piracy policy. At the very beginning of the project we had two huge occasions with the LucasArts lawyers sending us disease letters and we were lucky because reverse engineering in Europe is fully legal, especially for the increasing compatibility issues.
Starting point is 00:28:27 And by that time, we were not distributing any of their intellectual property. And we were explaining how to run it from the original media. So one of the things which we still strive to do is to do, even if it requires going an extra mile, to support original media layout. So you just copy files and you can run it. No mangling with the files or renaming or anything. So this is what we tried to do and this is what helped us. I can tell you that this is the biggest thing we had. We had the opposite also, especially with Atari, when they wanted to release one of their humongous entertainment titles on Nintendo Wii.
Starting point is 00:29:13 Unfortunately, Nintendo and Sony consoles, they are not compatible with GPL. They're never compatible because they are very, and Microsoft, by the way, yes, Microsoft, Xbox, they are very protective for their libraries. They don't want people to get any exposure to the console internals. So this is why they are not allowing to publish even the header file names and the method names. So you cannot use calls to their, like, SDKs. And GPL, ScamVM is is under gpos required publishing source code so what was happening atari took scam vm and they put it into nintendo wii and later they were they didn't didn't even know about it because they hired a vendor of doing the job and job went with this and later they
Starting point is 00:30:08 decided to publish the source code nintendo said no you cannot later they decided they wanted to call back the uh the print and put stickers on it and they could not so we ended up with agreement when they donated money to Free Software Foundation. And we led them to sell the game for two years, but not more. Wow. Because they had to do something, right? Since they were using your GPL source in the beginning. It's rare, I feel like, that you hear of a story where someone had their open source code misappropriated.
Starting point is 00:30:43 And then it got some sort of compensation back for it. What was great is that there is this gpl-violations.org which is the lawyers which helped us and we were addressing them in Germany. In Germany, copyright laws are much stronger than in the whole Europe. And since they were selling those games in Germany, copyright laws are much stronger than in the whole Europe. And since they were selling those games in Germany, we went to court in Germany. We wanted
Starting point is 00:31:10 to go to court in Germany. So this is why we were heard. Big thanks to those guys who helped us. And if you don't mind, before I forget, I'd also like to comment that there is one game that I still semi regularly play with ScumVM. And you mentioned that you
Starting point is 00:31:25 support the original file layout. I have an original Jones in the Fast Lane multimedia PC Windows CD, which I have taken an ISO image of and I play that ISO image on ScummVM fairly, well, you know, once every few months or so still pull that out which is like the least known and least popular sierra game ever published but my wife and i still enjoy playing jones in the fast line so thanks for the work i don't know if you were involved in any of that at all but it's fun i was touching the ci much. This is a horrible piece of software. We already fixed... Oh, I was counting. I think it was 600 original bugs in the games.
Starting point is 00:32:15 They just released ship without proper testing. Oh, you're fixing bugs from what the games had bugs, commercially had bugs, and you have fixed them. Yes. Yes, this is one thing, and their development strategy was new game, new clone of the source directory, and then you start modifying. So they have dozens of slightly different behaviors depending on
Starting point is 00:32:40 the game, depending on the month when it was released, and we put it into single engine i had no idea because i know there's like sci 012 or whatever something like that right i think there's three versions that are actually listed on scum vm i didn't realize that even inside those versions there's got to be what dozens hundreds of switches or something like that. Yeah, this is it. This is how it is. That's crazy. This is definitely making me want to go back and play some of those old games. I definitely played a lot of Monkey Island and Indiana Jones as a kid.
Starting point is 00:33:14 I might want to go revisit some of them. Go ahead. I was going to say, you mentioned GOG.com. If I were to go on GOG and buy the old copy of Monkey Island, I think you can do that right now. That's some of those games. It's actually using SCUMM VM.
Starting point is 00:33:29 It just doesn't actually, it doesn't show me that necessarily. Is that the case? Or does it show you? Actually, it does. It does show. And moreover, when you go into game description, in the compatibility section, you will see see works with Windows
Starting point is 00:33:45 Mac Linux and then uses come via they were and they still do a pretty good job on conforming with GPL and we have very good collaborations like it's always a pleasure to work with with them despite like in contrast with some other guys which sometimes I get tired they just really is new game and they forget to publish the source code they forget to mention scam every time every time and this is a pity this is you know like you go in cheap because you you don't do it you don't do testing you don't do development sometimes even it is ridiculous as they doing just the packaging, slapping together the files
Starting point is 00:34:26 and scan VM and then starting to sell it. Okay, be just a little bit don't require much copyright and source code. That's it. Now it's forget. I want to have the discussion for just a moment to bring you word from our sponsor. As C++ coders, I think you can say we've gotten used to waiting, waiting for code to be compiled, tested and even analyzed. My friends at Incredibuild have been working decades to help developers like you and I code more and wait less. Because expert developers don't wait. With Incredibuild's acceleration platform, I've easily gotten up to 10x speedup on real-world projects right out of the box. What I like most is how easy it is to use. Their virtualized distributed processing technology turbocharges product development
Starting point is 00:35:10 with just a lightweight and credit-built agent. No need to install any build tools or source code. Turning every host in your network into a supercomputer. It radically shortens compute times for a huge scope of applications. Compilations, testing, graphics, and much more. It's like having a bunch more HPCs and developers without adding a bunch more HPCs or developers. Go to incredibuild.com slash cppcast to start your free trial today. That's incredibuild.com slash cppcast
Starting point is 00:35:36 to start your free trial today. Let's start talking a little bit more about the code in Scumbia, maybe. The product's been around for I think 20-some years. What version of C++ is it currently using? Has it evolved over time to use more modern C++? Yeah, so Scumbia is all about portability. I just made a small count at this moment we are supporting now for the last 2.2.0 30 platforms and if you count uh different versions on a platform like for different cpu or for different architecture like for android there are four etc it's 49 so and and uh but uh so 49 platforms now but 46 in additional on top of that they are now withered they are now dead they used to be it's got supported by scam bm or 29 if you don't
Starting point is 00:36:40 count different architectures like uh for 32 bitsbits version, 64-bits version, or for Motorola 68000 to 6830, it's slightly different packaging for Atari, for instance. So that brings me to 95 supported platforms for the code base, but of course not anymore. Right. We dropped Palmosmos platform long time ago and palmos has its own really big difficulties for instance one of the difficulties is that it is internally 16-bit meaning that the code uh that the code section cannot exceed 64 kilobytes
Starting point is 00:37:21 or data sections static data sections cannot exceed 64 kilobytes so going back to the my initial involvement with this bike fight in full throttle insane subsystem I had to split it into several files because it didn't fit into into on Palm also so initially and this is why initially we did not support and still do not support STL, because it's a horrible mess on many platforms in terms of how it is implemented. It's huge. It's slightly different on different platforms. Maybe not anymore, but we have our homegrown implementations of the main data structures. And we were
Starting point is 00:38:11 using only slightly templates for a long while, so C++ 98, I would say. But primarily what we were calling serious classes for many, many years. Last year, we finally reached out after thorough testing, 30 platforms, we now support C++11. However,
Starting point is 00:38:33 for this release, I still restrict it to the game engine. We will see how it will be on the next release, how many ports we will have dropped. If not, if we will not drop any, that means that we will allow C++11 in the core. Because the architecture of SCANVM is the core, then there is backends which is talked to the hardware, and then there was engines which
Starting point is 00:38:58 are using this code or system middle layer abstraction, and also the helper classes like graphics decoders, audio decoders, and video decoders, and all that stuff. So this is how we do it. So, yeah, C++11 by this moment. And some engines are using it extensively. Auto, more quick templates, better initializers, much more convenient sort of things. That's an interesting I feel like idea there to say, okay, well, a new engine or one of the more complicated engines or
Starting point is 00:39:36 whatever that can't work on an older 16-bit platform or whatever anyhow, that one you can use the newer compiler in, and then if we can't support it on the older older platforms or more limited platforms i guess that makes sense correct this is about how we do it but we primarily try still try to stick to the hardware limitations meaning like screen is too small for a certain engine. So this is why we are reluctant to restrict the engines by technology, meaning that by the or the compiler maturity.
Starting point is 00:40:14 But just last month, huge work has been finished on virtualizing our build bot, which also along the way, the guy who was doing it, he upgraded two chains for most of the ports to the modern thing, so this is why we are able to support SafeSC++11. Maybe even we will go with 13 next year or in two years. We will see. How does that work? How do you know if you broke one of the 40 platforms or one of the 90 game engines? I mean...
Starting point is 00:40:52 That's a problem. Do you have a lot of CI infrastructure set up or anything like that? That's a problem. That's a problem. We don't know. Okay. We tried to implement maybe 10 years ago
Starting point is 00:41:04 a so-called event recorder, which means that you as a player just play, click, and then it will record your events and try to replay those in automatic fashion. Unfortunately, we never finished that. And because of the complex architecture of ScamVM, it was very difficult to synchronize it. So you were doing recording, but then getting out of sync eventually. Right, right. And so this is why it didn't go anywhere. For a long, long time, we were relying on just user testing. And we have 19 engines but the changes to the middle layer are reviewed very very carefully and engines them then
Starting point is 00:41:53 leave and being developed by sub teams individually many of these 90 they are complete so then the only thing which you worry about is that the thing just compiles because it's work, it has been tested, we have at this moment something we don't know, we lost the count. When we were on SourceForge and we moved from there six years ago, we had over 10 million downloads. How many now? Maybe 15 million or something like this and the user base is quite big. Of course, few of them, but we are talking about numbers run still. That means that every day we have bug reports or feature requests or something. This is why we kind of see that things are continue working. But for
Starting point is 00:42:40 the backends, we have a specially designed engine which checks all the needed features that you implemented those properly. It is like a wizard, it tests all the things which are doing and then you can easily see if you implement backend implementation proper. And if it is, that means that all of those engines or most of them will just work. This is how we designed this. Thanks to this intermediate layer of abstraction from the hardware, it just works. It's almost
Starting point is 00:43:13 what Java wanted to be. Write once, run everywhere. It sounds like just such a huge amount of work. And I know you mentioned some companies collaborate with you. Does anyone on the project actually get paid at all or contracted by any of these game companies
Starting point is 00:43:32 that want their engine ported or anything like that? So first of all, we have a really fruitful collaboration for a long time for this Google Summer of Code. Ah, okay. This year as well. So like every year except one in 2009, 19. In 2019, we didn't go through. But since 2007, it is 13th year or 14th year now of Google Summer of what we were accepted to the program.
Starting point is 00:43:56 That means that every year from like two to six students are working with us and paid by Google. Right. Then one guy. so a number of guys actually, they got into industry thanks to the experience they got from Scumbia. Like the guy who was working on Broken Swords initially and Benita Stillsky now actually is a technical director at Revolution Software and he was overseeing
Starting point is 00:44:28 the Broken Sword 5 development. Then the guys who initially worked Yaser or Vincent Ham, he is still in the gaming industry. He was after ScumVM, he did several things and one of them is Heavy Rain. It's a PlayStation 3 game. Then Ludvig Strigaos, it's another guy. That's a guy with a big G because after that he just went and he spawned open TTD, Transport Tycoon Deluxe. He reversed it. Now it now it's i don't know it's maybe bigger than scum vm like by the community right that's that's his name second thing then after that he was doing mute or and he implemented it uh muter and these days he is a principal engineer at spotify and if i know correctly, he was one of the guys who just came up with this idea.
Starting point is 00:45:28 So this is Ludwig. I don't know if that counts. A couple of guys in our team, they are actually working as CTOs in other companies. I myself am a manager in another company, software manager. So ScanVM helps us to stay sharp because on our daily job we probably don't write code but now thanks to this i personally understand
Starting point is 00:45:52 a lot of what is going on inside the outside and what my team are what teams are doing so for most of you or for a lot of you it's a way stay sharp, a way to have some fun programming time outside of work. Yes, and this is the thing. This correlates with the questionnaire about C++. 20 plus years of experience. You're getting old as well. Is there, you know, are you looking for new contributors? Is there
Starting point is 00:46:19 plenty of new things to work on in the codebase? Always. There is a lot of work. And yes, people actually, I was glad to see that in the last couple of years, several developers joined us, sometimes working on a completely brand new engine. Sometimes people just drop by,
Starting point is 00:46:39 start working on infrastructure things, which is exciting. Because as you may imagine, through this years, a number of people left the project as well. Life, loss of interest, or like I remember, one of the co-leaders with whom I was co-leading the project for a number of years, he just finished his PhD and he thought, I have no time for the project anymore. Bye, guys.
Starting point is 00:47:04 And stuff like this. We actively have at this moment around maybe 50 to 60 developers. The peak throughout the project was 85. And in total, if you take a look at GitHub or commit count, I think 500 or so people contributed. So say I have an idea. I'm like, well, you know, some game engine, I can't even think of one right now that's not already supported by Scum because it supports so
Starting point is 00:47:30 many. I want to reverse engineer it and I want to propose it to Scum. How do you decide if a game engine is a good candidate at all? Like, is there some litmus test for it has to support X number of games for it to make sense or anything like that? No, the requirement is has to be adventure or RPG. That's it. Okay. Last year, we merged with residual VM. So our sister project, which supports 3d games, so now it could be even 3d game. So 3d game so 3d adventure not necessarily pointedly because we now support uh the interactive fiction right uh interactive like yes fully textual even so actually scum vm now supports games from 1979 no some 1978 till 2021. so like uhossal Cave, no. Yes, Colossal Cave Adventure you can run. Original version.
Starting point is 00:48:31 Not the very original version which was written in Fortran, but it was later ported to Z machine. You can run that. So that's for our listeners, that's the one that Zork Games and the Infocom, early Infocom games
Starting point is 00:48:47 used for their text adventure engine, right? Yes, yes, exactly. And so if you come to us, we will be looking at the code quality and looking at your dedication because we don't like half-baked engines. We have plenty. So if you would like to reverse engineer some game my recommendation
Starting point is 00:49:06 would be the following before you even start first thing come to our wiki because we tried to put into our wiki even work in progress engines outside of the tree maybe somebody already started maybe there is a repository good repository which is is kind of lurking and nobody was touching it for five years. Like what was happening with the Lost Eden game. A Creo engine was developed several times, but then was not touched. And then a guy came and said, hey, I love this game, I would like to finish it. Oh, great, here is the engine, 80% done, finish it and hit it. Then talk to me or to any of the project lead, we have three colleagues at this moment, because we may know a little more. I'm requesting everybody to tell me, hey, if you have reversed something
Starting point is 00:50:00 or trying to tell me so I will know. I will search my database in my head. I will tell you maybe somebody started. And then just hang with us, and we will explain how to do it in a proper way. We have some experience with this, as you can guess. And just do it. You're welcome. That's an interesting insight, because I noticed that you had just announced work in progress for the Nancy Drew adventure games, which my wife and I used to play, you know, 18 years ago or whatever.
Starting point is 00:50:34 And and I mentioned this to her and it both made us both feel old that those games are now old enough to be in scum that for some reason that just made us feel older. But I was clicking through the wiki pages and stuff and noticed that there were links to two different forks that had a Nancy game engine started on them. And one of them was like 10 years old, I think, which surprised me that someone had started it that long ago. And I'm like, oh, that like, I kind of wondered what had happened there, why there were two different forks, but I guess that kind of makes sense now. Speaking of, sometimes they work completely independently, sometimes they just try to continue work, and while guy A starts and does something, then it goes into limbo. Guy B picks it up, continues, and then guy A, how to say, wakes up, and it starts to deviate. But very often we have, let's say, more or less mature one,
Starting point is 00:51:34 and very often there is a lot of skeleton engines. Hey, there is detection, maybe not even showing the initial logo, maybe just reading some of the data files, and that's it. So this is exactly why. We have one guy in our project. He was working with us maybe like for 15 years or so. He is a reverse engineering machine. He reversed maybe like 20 or 30 different engines, but he never has, how to say, energy to complete them.
Starting point is 00:52:06 And they stuck at about 95% or so. And those 5% are very often the user interface. So the game engine, the most difficult part, fully reversed and debugged by him. It doesn't work. Yes, precisely. But then it is not user-friendly, right? You need to comment out certain parts of the code
Starting point is 00:52:30 in order to run it. Go and implement menus, and Helios is there. So the chances that somebody already did most of the work are pretty high, so talk to me, and welcome to the project. Another game engine that stands out to me is I noticed you had just announced prototype support for Adventure Game Studio games also. Oh, yeah. Adventure Game Studio.
Starting point is 00:52:52 I mean, there's like literally thousands of these games because it was a free tool. And then it went open source, what, I don't know, four or five years ago or something like that. Yes. Were you able to utilize the source code that was provided in that process? And how in the world are you going to test 30,000 games or whatever to make sure you actually have full compatibility with it? So first of all, we were absolutely excited when we saw this being open source. And we wanted to tackle it right away. The current implementation of the engine
Starting point is 00:53:28 is the third attempt of doing it. First two attempts were unsuccessful, unfortunately, because especially at the very beginning, there was a certain resistance from the EGS development community themselves. Okay. Because they were telling like this, from the AGS development community themselves. Because they would tell you like this, hey guys, if you fork, we are afraid that you will slow down our development. We would like to add more new features,
Starting point is 00:53:57 but then we'll have to look back at you that you backported those. And by the way, we don't really want to learn your intermediate layer. We would go with our home. So this is where it was at the very beginning. But last year, they came to us, and when it was raised, by the way, in one of the interviews,
Starting point is 00:54:18 I was mentioned that they are so against us, this idea. They actually came to us, the current project leader, and said, hey guys, apparently there is misunderstanding or miscommunication or something, but at least whatever happened, happened, but now we are more than happy of you doing this. And this is why we had several people who are truly interested in this engine, and one of them is like major contributor, DreamMaster. He actually implemented Black Cauldron, a CI game, fully in AGES back then and he
Starting point is 00:54:53 wanted it to be working. He wanted it to be working and this is why he took it and he's one of the most experienced developer and he, developers at Scambian, he just ported that published source code with additional quirks. But as usual in ScamVM spirit, once we finish that, we will try to do what is missing in the current code. It doesn't support early version before 2.5 of AGES. Those versions which are now really difficult to run. So we have plans later to come back and reverse engineer and re-implement those as well and put them apart. So making SCUMVM a definitive engine for running AGS games.
Starting point is 00:55:41 And on your question how we're going to make sure that it is working, public testing, this is what is ongoing right now and we have already a couple of dozens of games tested, bug reports filled in, many bug reports were already fixed and this is what is happening. Good thing with these authoring tools. Since it is an authoring tool, when you implement the feature as it is for one game, of course other game developers were relying on this particular behavior of this feature. So you don't necessarily need to test all of those games because they are a game built around this specific behavior,
Starting point is 00:56:25 one specific, let's put it, library of the graphics and sound handling, which AGS is. So the problems come in there when they are using external plugins, which AGS allows. And if this plugin is not re-implemented in SCUMM VM, we have to reverse it and re-implement. We have already like five or six implemented, most widespread ones. This is the only reason. Interesting.
Starting point is 00:56:52 Okay. Yeah. AGS is an extensible system. I had forgotten about that feature of it. I've only ever played around in AGS. And I used to like to play each year whoever would win their competitions and that kind of thing. I would play those games. But it's been a long time.
Starting point is 00:57:09 And yes, we currently identify, I believe, 600 games. That's not all of them. But HES is not big enough. GLK is currently supporting 4,000 games. GLK? I don't know that one. Interactive Fiction. Oh, okay, right, right. But this is, how to say, a set of those sub-engines.
Starting point is 00:57:36 But there is one engine which is still being in development, and that's going to be huge. Macromedia Director. Macromedia? Director, yes Yeah, okay, alright That's the thing, this is where the really modern load of games were written
Starting point is 00:57:54 on. We have our wiki page where we try to document its endless Well, Eugene, it was great having you on the show today. If listeners want to go learn more about Scum or possibly
Starting point is 00:58:10 contribute to the project, where should they go? These days, it's Discord. You go to scumvm.org and there is a link on the top. This is where all of the developers, most of them, two or three are still on IRC, but we have a gateway.
Starting point is 00:58:25 So talk to them there. Or there is scambm- devo mailing list, but it's very low profile, mainly for the announcements. Okay. Well, it's great having you on the show. Thank you very much, guys. Awesome. Thanks for coming on. Thanks so much for listening
Starting point is 00:58:42 in as we chat about C++. We'd love to hear what you think of the podcast. Please let us know if we're discussing the stuff you're interested in or if you have a suggestion for a topic, we'd love to hear about that too. You can email all your thoughts to feedback at cppcast.com.
Starting point is 00:58:56 We'd also appreciate if you can like CppCast on Facebook and follow CppCast on Twitter. You can also follow me at Rob W. Irving and Jason at Lefticus on Twitter. We'd also like to thank all our patrons who help support the show through Patreon. If you'd like to support us on Patreon, you can do so at patreon.com slash CppCast. And of course, you can find all that info and the show notes on the podcast website
Starting point is 00:59:19 at cppcast.com. Theme music for this episode is provided by podcastthemes.com.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.