Quite an ironic title, right? Must be thinking I am joking, but hey! What if I say this is all true?
Now before getting to this fun story and about how exactly I am adding bugs
in code
, let me present to you the definition of a bug! As been talked about by my mentor!
Eugene Sandulenko (aka sev, or my mentor) said:
bug is typically a problem in code of unknown nature
And here is something which I found on Google:
A bug is an unexpected problem with software or hardware. Typical problems are often the result of external interference with the program’s performance that was not anticipated by the developer. Minor bugs can cause small problems like frozen screens or unexplained error messages that do not significantly affect usage.
I hope that makes it clear!
Now coming to the good part, I am a software developer, a GSoC’er this year, and most of the time, I resolve bugs, but sometimes I add them too!
The Story
To start with the story, first you need to understand what exactly is my work as a GSoC’er in this organization called ScummVM! So let’s start with basics:
What is ScummVM?
ScummVM is a program that supports numerous adventure game engines via virtual machines, allowing the user to play supported adventure games on their platform of choice. ScummVM provides none of the original assets for the games it supports, and expects the user to properly own the original game’s media so as to use the software legally.
This is what Wikipedia says about us, but in layman’s terms, What we do is to bring compatibility of these vintage games to our modern platforms! We do this by implementing engines in C++. These engines take in-game files, and are able to run them! If you have even a bit of idea about how Unity works, Unity is a game engine; just like that, there are very, very old studio-made game engines using which games were made! What we do is recreate these engines so that if one has the game files for their favorite old games, they can now play them using our software!
What is my Role for GSoC’23?
quoting the bulletin news board itself, it says:
- Harishankar Kumar will work on improving Director 4 Compatibility. The goal is to reach full support for Total Distortion & The Journeyman Project. You can follow the progress for this task on Harishankar’s GSoC blog
Oh, by the way, If you don’t know. I am Harishankar Kumar XD (And nice to meet you too)
So, what I do, is to improve compatibility for Director 4 Engines. Now, the fun thing is that these engines are made by taking some real vintage game engines as a reference! (In my case, it is Macromedia Director 4, released February 28, 1994) and with these engines come their own quirks and behaviors.
Do you see where I am getting at?
Replicating the Perfect Engine
As part of replicating the perfect D4 engine, I have had to fix many bugs. These bugs were also what made me reach this point, get selected as a student, and write this blog but It is all great when you are fixing a bug that is in ScummVM by taking reference to how the original (ie Director 4) should work, but what will happen if we were to perfect our code such that it is even better than the original? (In some aspects)
Oh yes, you heard it right! So here’s the STORYTIME!
What happened?
As part of taking reference of original and how documentation, books etc says things should work (in Director 4 Engine), our software at ScummVM was developed such that it followed the rules.. however in pursuit. of this excellence, we made big mistake.. that is
Implementing something that is better than the original!
Oh yes! Now if I delve too deep into technical aspects, It will be too difficult to understand, but let’s just say there was this functionality of engine that allowed it to do something, however as part of doing something, It was also doing something else which it was not supposed to do, this something something was something that our software ScummVM was not doing (so we were good, following rules, documentation, and books) however because we didn’t do this something that the Director 4 was doing, our program has bug..
Well, to be precise, the bug was in the original Director 4, however since we perfected ourselves too much, we surpassed the original engine itself (in this feature only, It would be very, very arrogant of me to say we really surpassed the whole engine itself, if that were the case I wouldn’t be there doing something’s riddle to you)
Adding bugs
Now comes the good part, which is adding bugs! Well, this is only a figure of speech because, in reality, I was not adding bugs to this software. I was implementing this non-documented weird behavior (or a quirk) that is present in Director 4 engine, and thus doing my part as a responsible developer!
Now this is a bug of the original Director 4 because It is not how the games built on D4 were used to use.
It was either a genius or a complete idiot who used a quirk of software to do their own work and release this into production! (I still believe they are genius to use something in such a way that is written nowhere, completely unique)
Only god knows if this were intentional. However, the amount of work this adding “small” bug cannot be underestimated because it made us question the fundamentals of the engine and required some heavy changes!
But one thing is for sure, We are moving forward towards creating a perfect director experience, either its features.. or its peculiarities in the form of BUGS!
My work this week
Even as I am writing this blog, I am side by side working to implement this peculiar behavior I just mentioned, however this week, I managed to get another pull request merged, that is #5074
Not only that, this week was quite hectic with all these findings and verifying proper behaviors with respect to these non-documented quirks. I wrote several tests to check and verify their behavior in scummvm!
Ending
Thanks a lot for reading this! Do comment out your honest thoughts and opinion about this blog and follow the series for more of such interesting content!
2 replies on “I am a Developer, and I add bugs in Code”
So, at the start, it was an awestruck moment at how THE DEVELOPER whose work is to eliminate the bugs added the bugs himself. But this turns out to be really interesting when bugs leading to PERFECTION! It was definitely an interesting read 🙂
[…] This section is in continuation of my previous blog post – https://blogs.scummvm.org/hsk/2023/06/10/i-am-a-developer-and-i-add-bugs-in-code/ […]