Max Payne 2 from the inside or notes of the moded.

Have you ever thought about how the game is generally arranged under the hood? Did it occur to you that the blow with the right hand and the left, from the point of view of the game, shooting from different weapons? Or maybe you want to know how the switching of the sight of the sight can be associated with the use of a first -aid kit? Well, if I intrigued, I ask you to sit down. Today I will be your guide to the world of non -standard decisions!

Part 1: Mops and ceiling.

I would like to start with the old bike:

– Vasya, we have poisonous gas! What is the problem?
– I don’t know, everything was to work. I changed something in the project?
– A little, the mops took out ..
– Mops kept the ceiling!
– What. What, excuse me.
– I say, the mop held the ceiling. Above them, gas tanks were. Very heavy, I had to write down in the room from below.

"Alien Code"

This quote is slightly torn out of the context, but soon you will understand how this bike has to do with our topic. You see, when you make a mod, you always work with someone else’s code, one way or another. This has its pros and cons of. The advantages, of course, are that you have a ready -made foundation. No need to write the most basic things from scratch, you do not need to do a bunch of models and animations from scratch, you don’t even need to think about how to make all this work. Everyone has already come up with you. The minus is that everything was invented for you not for your needs, but for your. In other words, the foundation is suitable in order to build a regular two -story building on it, and not in order to build a private villa with an underground garage and bunker on it.

This is where the most interesting begins. Our task is not just to build something for which the foundation was not intended, but also to make sure that everything does not fall apart from the blow of the breeze, and even so that the commission later, which will come to accept our structure, thought that everything is in order and in general everything is conceived.

Remedy was so impressed by Kung-Fu with a mod for the first Max Payne that they even paid tribute to the author in the sequel, in the form of such a reference.

Take for example, the Kung-Fu Evolution Max on Max Payne 2. Our task is as follows: to teach a hero to fight. Let’s say we were lucky, and we already have all the necessary animations. Business for the "small": add them to the game and make the character play them. But how? We do not have the source of the engine, there is no way to add some new buttons and functions, and indeed, there is not even the opportunity to make the “contact” of the player’s carcass from the enemy-dangerous.

Here the ingenuity comes to the rescue. The game has firearms, it shoots shells. Shells cause damage, which means we need to make the game “think” that we are “shooting” when we fight! And now, when the player is hit, the “bullet” flies out of the leg, which causes damage to the enemy. But it’s bad for the bad luck: the bullet flies far, which means that you can kill the enemy at least from a kilometer with a kick and this does not suit us! Again we climb into the game code and find that the shell can be “exposed” after a certain time. The problem is solved! We make a “exploding” bullet, which explodes faster than that manages to fly too far, and now our hero bravely hits all the oncoming foot from the turn!

Funny fact: the sound of a shock in the game is called "a shot of a close battle", and a shell flying when hit with a butt is completely called "a bullet nearby battle"!

Yes, it may sound strange, but in the original game, Max beats the enemies with a butt in exactly the same way! That is, from the point of view of the game between the shot from the weapon and there is absolutely no difference.
However, there is little one blow! Press one button to make the same blow, it’s not so fun! We need a series of blows! But how? One weapon cannot have different firing animations! Well, then, different blows will be different weapons, and to choose every blow in the weapon menu, the player did not have to, we need to change the weapon by force. At the end of the impact animation, we prescribe a forced replacement of the weapon with another, and now by pressing one mouse button, the hero makes a whole series of strokes! Next, we recall that the game still has a reload of weapons, there are somersaults that could also be replaced with something “like”, and at the output we get this:

It is poorly similar to the classic gameplay of Max Payne, though?

Now I described everything as simplified as possible, missed a whole bunch of details, but I think the main essence is clear. We force the game to do something for which it is not intended, with the help of what it was originally in it. In other words, we use mops to hold the ceiling.

Part 2: Dream of the perfect game.

– Is it true that all journalists dream of writing a novel?
“No,” I lied.

Sergey Dovlatov "Compromise"

I think everyone had a dream of a "perfect game". Ask any gamer, and he will gladly tell you that if he had the opportunity, he would have made such a game that Neil Drakmann would have thrown out the window with envy, Vince Zapopell went through a long binge, and Hideo Kodzima said that he was leaving the gaming industry, because the best game on Planet Earth has already been created.
Only now, unfortunately or fortunately, not everyone has such an opportunity. Someone is breaking through the industry from the bottoms, so that one day, perhaps, to become a new barlil, someone makes his indie game at night after work and hopes that his project is not lost in a ton of games from Steam, someone understands that he has nothing to do in Gamdev and decides to focus on criticizing the games of all of the above, and someone goes to modding.

Here you may ask: “This is what? http://citybingocasino.co.uk/ All modders are failed gaming dies?". And I will answer: "No, because some of them work in Gamdev". But this does not mean at all that the world is divided exclusively into those who got to the game and losers, because the “perfect game” is not necessarily a new game! Very often, people want to simply improve their favorite game, in the end, which could be better than your favorite game, which has become even more colorful, diverse and more exciting? In addition, in the process of picking your favorite game, you can learn about it a lot of interesting things. For example, you knew that in Max Payne 2 the damage to the bullet and its armor -piercing are two different concepts? Okay, I’ll ask differently, you generally knew that in the second Max Payne there are armor mechanics? And she is!

Bulletdamage – damage, Bulletpenetration – Parking ability.

Multipliers of damage to various parts of the body.

It would seem that the enemies in the game die like flies, and, given the speed of shootings, you do not even notice in the game that the enemy’s armor enters him less damage than hitting hands and legs, and moreover, you will not notice that Beretta breaks through the armor much better than a shotgun, but it was thought out and done. At such moments, you begin to appreciate the work of developers who have found the time in the treasures in order to pay attention to this and did not stint on a trifle, which 99% of players most likely will not even notice.
However, this feature is used by the game not to the fullest, but it is worth playing with the parameters, and miracles begin! For example, we put Bulletpenetration to Berette on “1”, and the desert needle on “0.15 ", and now we already have a paradoxical, but realistic situation. Caliber 9mm pierces armor much more willingly than 0.50ae, as a result of which it becomes more profitable to shoot from Beretta on the “armored” enemies than from a heavy shift. We have already replaced the pair of parameters already changed the balance and made the game more realistic, and I have not even told about the most interesting features of the game.

Having studied the insides of the game a little more, you can find out that, from its point of view, the bullets released by the player, the shot cartridges and empty weapons stores are the same, t. e. shells. Such "shells" fall thanks to the parameter "Gravitymultiplier". And this parameter can also be applied to bullets ..

And also falling empty shops, of course, is good, but they are motionless, as if they were screwed to the floor, alas. But the wealthy weapon has honest physics … What if the shot shops make the selected object, only without the ability to raise it? And now we have empty shops behaving, according to all the laws of physics. In the 2003 game game!
In addition, unlike ordinary stores, the number of “physical” will be unlimited, and they will not disappear upon reaching the limit.

Part 3: Okay, what else can I?

And I can also embroider. And on a typewriter. Same.

Cat Matroskin "Prostokvashino"

So what else can you do with your favorite game? In fact, almost whatever you like, there would be a desire and straight arms growing from the shoulders. In the video, the incredible conversions of Max Payne 2 have already given examples of what can be done if there is a desire and free time. I’ll just give a few more examples of how you can use what the game has given to my favor.

With some manipulations, you can turn the game into a semblance of Hotline miami.

. You can in a semblance of Resident Evil.

. but you can generally in the bloody simulator of the murders of telepusics. There would be a desire.

Santego Special Unit and camera.

Let’s start with the most elementary: the view from the 1st person in the fashion of Santego Special Unit. Yes, in fact, this is still a view of the 3rd person, where they changed the position of the camera relative to the player and edited animations so that everything looks more or less adequate with the new camera.

View from the 1st person.

. And the way he actually looks like.

By the way, the sight in the game is not just an element of the interface, but quite a 3D object.

The Punisher-Warzone: CaseBox 01 and a sight with a first-aid kit.

Now the task is more complicated. Once, when developing The Punisher-Warzone: CaseBox 01, I had the need for an “analgesic” button, the player’s health was restored automatically, and the need for the first-aid kits disappeared by itself. I wanted to use the released button for the sight from the shoulder. Indeed, by pressing the button, turning on the approach of the camera is very simple. The question is left: how to make the camera return to the original state for re -pressing?

I don’t know what the authors of the Resident Evil 4 had to go for for such aiming, and I had to invent a whole multi -sized object with an invisible object!

I cannot assign different teams for the same thing – in the game it just doesn’t work. But at some point I dawned on me! I can assign different commands when trying to choose an object (weapon, box of cartridges, etc. D.).
If it is very short, then the selected object has three sets of commands:
1 – when we select the object for the first time;
2 – when we simply select an object;
3 – when we cannot pick it up.
The current set of commands depends on the number of cartridges to the weapon to which the object is tied (if we have a maximum of cartridges to the gun, then we cannot choose a box of cartridges for the gun, if there are less maximum cartridges, then we can).
As a result, the use of the first -aid kit now creates an invisible selected object that is tied to an unused type of cartridge. If we do not have cartridges, then the approach is discarded, and if they are maximum, then the number of cartridges is reset and the “timer” is launched with a small delay (this is important), which will turn on the approach of the camera. Thus, at first the “reset” of the camera occurs, and then its approach.

Absent Grave and peaceful zombies.

Remember the ABSENT GRAVE mod? The hero survives in the arena, fighting off the bloodthirsty zombies … Only now there is one nuance. Zombies are completely not bloodthirsty, I will say more, they do not even want to harm our hero and, in general, in this situation of the victim! How so? Now we will understand.

The fact is that AI in the game does not know how to apply a near battle. He is not trivial not taught this. Therefore, the author of ABSENT GRAVE, like anyone who wants to add “close” enemies to the game, has to go to the tricks. Remember, in the beginning we analyzed an example with a “bullet” to strike? So. In such mods, the player always releases “bullets” that explode next to him, inflicting small damage to others (less than 1% of health). Animation of receiving such damage is replaced by an animation of a blow in close combat, and AI enemies are given a team to run to the player. In other words, the enemies just run to the player and “attack” him, receiving damage from him. This is how the story of a harsh survival among aggressive living dead turns into a story about a sociopath, which in general the first began.

A terrible picture: zombies go to the hero.

. but, from the point of view of the game, they do nothing more. As you can see, they just continue to go to the hero.

Transport that is not.

I think that anyone who played Max Payne 2 will probably remember that several times during the game we saw the scene when a van of cleaners leaves from somewhere, and enemies come out of it.

So, and if I tell you that there really is no transport in the game?
– But how? – Any playing the game will ask. – We personally saw him!
In fact, everything is to the ingenious simply. Follow your hands:

The blue capsule in the developer mode marks the characters. In blue figures, triggers are marked, and purple – dynamic objects: doors, boxes, etc.D.

Now we look in the developer mode at the aforementioned car.

Yes, the van is not only for the game functionally no different from an exploding barrel or empty box, it is also part of the card! By the way, a 7th serpent: Crossfire fashion tank is made in a similar way. He is not “transport” (which in the game, I remind, no) and not even an enemy NPC. From the point of view of the game, this is just part of the level.

EPILOGUE

In fact, all this is only a small part of what the modding-comet in the desire to make something atypical on the engine reached the desire. And there was no goal here to retell everything (this is simply impossible). I just wanted to show what non -standard solutions you can come in the conditions of limited tools. And share the fact that the games sometimes made are much deeper than it might seem at first glance. And this is all today. Thanks to everyone who read this text to the end.

Leave a Reply

Your email address will not be published. Required fields are marked *