📜 ⬆️ ⬇️

Developers on the dirtiest software tricks in games

image


When time runs out, the developers are exhausted, and the mysterious problems continue to appear, sometimes non-standard solutions are required. When you need to complete the project at any cost, everything is at stake ... In a couple of classic articles originally published in the friendly Game Developer magazine, we studied several amazing examples of such real-life decisions. These timeless masterpieces can be read here ( transfer to Habré) and here .

Gamasutra again decided to consider this topic. We have collected from the entire gaming industry unusual solutions to unusual problems. Those who shared these solutions with us may not be proud of such “corrections”, but in fact they should be proud. They managed to release the game, they did not spoil anything and, most importantly, no one noticed. At least until this article.
')
Enjoy ingenuity, marvel at fearlessness, learn from the mistakes of your predecessors, and most importantly - release running games, and also on time.

If you want to share your amazing solutions invented for the release of games, then we are happy to know about them! Send your dirty tricks to Gamasutra (with the subject of “dirty coding tricks”) and maybe they will be presented in the next article.

The day when the Super Time Force batteries are gone




Maybe this is imperceptible, but Super Time Force barely fit within the limits of Xbox 360 memory. Because of the time rewind function, we had to store all the information of each active level object for the entire duration of the rewind time scale. Each new player, enemy, bullet, explosion, platform, heap of garbage and a torn part of the body ate off the rewind memory, and this problem poisoned the whole process of game development.

At the final stage of certification, after meticulously debugging the perfect balance of each level and rewind buffer, we received from the quality control department a report on a new error:

“Start any level. As quickly as possible, press all the buttons on the controller for two minutes. Rewind and repeat it twenty more times. Memory exhausted.

The quick spamming of the buttons ate the rewind memory faster than expected from user input. Instead of going back to the very beginning and completely changing the balance of the file levels and buffer sizes, we stopped at a simpler solution: recognize long unreasonable intervals by quickly pressing buttons and immediately destroy the player, and then rewind it back to the beginning of the level. We "pretended" that the player, by violently pressing buttons, accidentally turned on the rewind function. Now the bug has become a feature.

A few days later, we received another error report:

“Start 199X level 2. Complete the level, exploding everything and leaving as many debris as possible, continuously firing a machine gun until time runs out. Rewind and repeat twenty more times. Memory exhausted.

The limit of the rewind memory turned out to be possible in the indecently rare case of the appearance at this particular level of a certain number of bullets and explosions creating debris. And again, instead of changing the balance of the file levels and the size of the game buffers, we came up with a simpler idea: when the game approaches the rewind memory limit, we simply pause the game, display a huge blinking “low battery” icon and gracefully throw the player into level selection menu.

No, in fact, the controller is not discharged battery. No, we did not explain anything to anyone. Yes, the quality control department accepted this correction and we passed certification.

Kenneth Jung , Capy Games CTO

Additional tachometer


I worked as a lead racing programmer for PS2 and PSP, developed in parallel for PS3 and 360.

The quality control department complained that driving was slightly different from other versions of the game. It felt not very natural. We could not find the problem, so we invited one of the testers to our office to discuss it. He played the game with us and confirmed that the problem does not occur in the office, but manifests itself in the assembly for the quality department.

We tried to narrow the discrepancies between the QA build and our test build, and found that the differences in control were related to the frame rate counter that we displayed in the corner of the test build screen. Turning it off, as in the master assembly that the quality control department used, we really felt that management felt a little differently. In fact, it gets better. We spent some time on blind testing (closed the part of the screen on which the frame counter was displayed and played with the meter turned on and off) to see for ourselves that this was exactly the case. The difference seemed insignificant and difficult to recognize. One thing was obvious - the output of the frame rate "corrected" problems with the management.

We spent a couple of weeks looking for the causes of this problem. We investigated the code of physics that the team that worked on other versions of the game passed to us, looked for uninitialized variables (which could be affected by the stack state of the font procedure) or possible problems with timings. We tried to initialize the memory. But they did not find any reason or solution.

The last thing one could hope for was to check whether the movement of the frame rate counter off-screen influences the control of the machine. It turned out that the place where the frame rate was displayed did not change anything, even if the counter was outside the screen.

And only during the last test, on the eve of the certification of the game, we guessed it before solving the problem - if not to its cause. We have released a game with a constantly enabled debug counter frame rate, just brought it slightly beyond the right edge of the screen.

Martin Turton , Director, Clever Beans Ltd

Carried away




The most undoubtedly dirty trick remembered from the development of Titan Quest , was the management of scripting events. Technology quests / events had a serious weakness - after the action triggered there were no ways to postpone it. Therefore, if we wanted something to happen five seconds after the player had run through any limiting volume, then we could not set a delay. The action has always been instant.

The end of development was already nearing, so it was difficult to ask for the introduction of additional functions, the developers were already struggling to manage to deliver everything necessary for the next stage. One of the QA testers began to help us with the work on scripting, and found out that in fact there is a way to delay the triggering of an event by changing the duration of the animation.

As a result, he took the gaps that were creatures of the environment in the game, and used them as an animation timer. So they became the default timing mechanism. The tester created an invisible version of the white one, which he located in the places of the levels we needed, and then tied the entire countdown to the duration of her waiting animation. Thanks to this creative solution of the problem, he was promoted to a designer in the next project.

Arthur Bruno, owner / lead designer of Crate Entertainment

Advertise phobia


The latest version of our game has a new feature that gave players in-game currency for viewing video ads (which also increased our income). After the release of the game, we found that video ads were requested incorrectly, which is why only one video was played during the gaming session - a serious nuisance.

In our game, the server side infrastructure was used to perform various actions in different cases, allowing us to expand the functionality of the game after the release. The system checked the rules, and if they were executed, then it started the specified actions.

The rules were judged by reflection. For example, when specifying the rule VideoAds.IsVideoAvailable = true, using reflection, this property was called and the action was performed if the property was true.

Fortunately for us, this system could have been easily hacked, so we added a new rule VideoAds.RefreshVideos = true. This rule was never equal to true (therefore, the action was never executed), but it caused the code that updates the video, which allowed us to “force” the system to use the primitive mechanism for executing remote code. Problem solved!

Lior Tal , CEO Cyanogen

And ... filmed!


We worked on a major update for the game under Android two weeks before the “gold release”. The quality control department informed us that on some random devices, after a cutscene playback, a crash occurs. My colleague spent a week trying to isolate the error or figure out the cause. We did not find her. But we found that when you press the back button to skip the video, a crash does not occur. Our dirty little trick was to put a timer into the cutscene and, one second before it was completed, simulate pressing the back button. We used it as a temporary solution to the problem. Six months later, this "temporary solution" was still in the code.

Marlon Ruwalkaba Munoz, Karaokulta

Black ice white noise




When working on Black Ice, I wanted to create a sky that looked like an endless room (as in the screenshot), but the location of hundreds of objects in the sky reduced performance, and mirrors in games from the 90s were not very viable. So I decided to do it with particles. Everything was quite simple - I wrote a script to position them in the world, but then a problem arose: the particles disappeared when the player turned away from the origin point of the world.

It took me some time to find out that Unity’s legacy system of particles cut off all the particles in the system when the invisible particle emitter was outside of the camera view. (Does everyone know what cut-off by the pyramid of visibility is?) I struggled for a long time with the problem, but once a solution came to me - I attached the emitter to the player’s face, about six inches lower. Thus, the player could not turn away from the emitter, in whatever direction he looked! I had to change the particle emission based on the position in the world and update them as the player moves, but it worked!

The GIF below shows what it looks like in the editor and in the game.

In the editor




In Game


Garrett Cooper , Game Creator, Super Duper Game Company

Head straight to jail


When I worked at Backbone Entertainment, Kevin Wilson and I worked on a very intense project to transfer Midway arcade games to PSN. It was the very beginning of the PS3 era. It seems that among the first eleven games available for download were ours: Joust , Championship Sprint , Rampage World Tour , Rampart and Mortal Kombat 2 , and some other similar game.

Backbone had previously released these games in the XBox Live Arcade, but they were not developed very cross-platform. The project needed to be folded in just a few weeks, so we did what anybody would do with such a temporary load: we partially implemented Direct X on the PS3. I spent the last week of the project hiding tracks.

Ian Sherman , programmer at Other Ocean

Dll it yourself


The client, very concerned about concealing his “know-how,” gave us several DLLs only for our target console platforms, that is, the libraries were essentially a “black box”. We persistently did not give any libraries for the PC, no matter how we begged. The whole front-end of the game was performed on a PC, and in the code there was only a blank engine, enough to run the gameplay, but we could not test the work of this game on the PC, and this did not suit us for many reasons.

We thus went through the whole development cycle for PS3 / X360. Then, for the next iteration of the game, we switched to Xbox One and PS4, having received updated versions of the engine libraries, but still without a version for PC, which made our work very difficult, especially on PS4.

But the magic happened - the Xbox One libraries actually turned out to be a fully working 64-bit code for the PC, and they could simply be connected to the Windows executable file. It was enough to have a PC with a fairly new CPU that contained the same instruction set extensions as the CPU on the Xbox. We were happy, like children, when this system was able to get to work.

Epilogue - on the next cycle, when we were making a version for Steam, customers finally became generous with the real PC library, so the hack was unnecessary.

Dan filner

Is the bridge too far?




This is more like kit bash (creation of something new from standard blanks, including three-dimensional modeling) than a software trick, but when I started working on Grim Dawn , I practically worked alone. There were several acquaintances who helped me in my free time (mostly former colleagues of Iron Lore), but I worked alone in full force. A few months later, I was joined by a programmer, but before coming out on Kickstarter we didn’t have our own artist. As a result, I spent some of my personal savings on hiring an artist, and one of the first objects I created was a wooden bridge. It consisted of flat wooden planks, long rounded beams and metal railway crutches holding wood like nails.

Sometimes volunteers came to the team, found themselves too busy with work and family, and then disappeared. I got to the stage where not many new graphics appeared. I am not an artist, my skills are limited to creating textures from photographs and the simplest basics of modeling. In fact, I didn’t have much choice, except with the varying success to change the finished objects and correct the UV-maps.

But I desperately needed more environmental objects so that I could move further in building the world. Therefore, I had to open this bridge in the editor and use its separate parts to create new wooden buildings. As a result, I got a lot of objects out of it. Other bridges laid out from the boards of the footpath, entrances to the houses, fences, heaps of garbage, the gallows, which can be seen on the initial screen, signs, a table, roofs of houses ... redone, but fragments of this first bridge are still used in many subjects.

Arthur Bruno, owner / lead designer of Crate Entertainment

Sounds good!




While working on the Mega Man Legacy Collection for 3DS, I discovered a “bug” with a sound that I couldn’t track. Any first sound that was played was either distorted or played incorrectly.

I myself wrote the audio playback layer, but it was based on the Nintendo sound API for 3DS. The playback system was supposed to support continuous streaming of such things as background music or NES sound emulation (the last one was not written by me), plus short small one-time sounds for actions such as UI effects and a demonstration of the initial logo.

Each of the 3DS sound “channels” transmitted with it a data structure containing various flags and information for tracking the current state. One of them is a flag that determines whether the channel is active or reproducible. Nintendo's official documentation said that the flag is true if the channel plays something, and false otherwise.

With this, I had a couple of bugs, the root cause of which I could not find due to lack of time. Simply put, in nine out of ten cases when you started the game, the melody that accompanied the Digital Eclipse logo of the [game collection developer] was differently distorted - it stuttered or did not play at all. It was the very first sound in the game, and I found out that the error always happens with the first sound that is played - the subsequent sounds are played without problems.

When I started debugging, it turned out that in some cases this “playback” flag was true even when nothing was lost! It was obvious that we could not release a project in such a state, and I had already finished all the clever ideas. So what was my decision?

When loading the game, before playing this first melody, I lost a second of silence. And in this state the project was released.

Keith Kaysershot , Digital Eclipse Programmer

Source: https://habr.com/ru/post/343516/


All Articles