Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How hard is it to jump in a 3D action game?

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > IT Information >

Share

Shulou(Shulou.com)11/24 Report--

When we talk about jumping, what are we talking about? when we talk about 3D action games, we can think of many famous games, such as "the rise of Monster Hunter", "Elden Ring" and so on. 3D action games and ARPG can be said to be becoming mainstream game modes. When it comes to action games, you will think of "jump" this function, after all, "jump" for action games, at least 2D action games, is a very important element, and more and more 3D action games and ARPG also add jump function.

So, as game developers, what exactly are we talking about when we are talking about the "jump" of 3D action games? The image that comes to mind when many people hear this word is a piece of flat ground, with the character jumping high and then landing-this is indeed the most straightforward manifestation of the "jump" function, but for game developers, this is only the tip of the iceberg of the "jump" function. Because there is a jump, it means that there are two states of "floating" and "ground", which will bring a lot of new things, form many new ways of playing, and bring a lot of trouble to the realization of the function of the game.

What can the jump function bring to the game when we decide to add the jump function to the 3D action game, it will produce two basic properties-terrain height difference and air combat, and based on these two properties, there are a lot of further properties that can be refined in level design and other details.

One of the most straightforward effects that the terrain height jump function can bring is the height difference of the terrain. This terrain height difference is different from the concept of the terrain height difference in the early monster hunter series (4 generations) and the Tomb Raider series-the terrain height difference in the early monster hunter refers to the existence of some special terrain in certain places. Players operate the character to move in these places, automatically climbing from the bottom up and a jump from top to bottom.

In the latest generation of "the rise of the Monster Hunter", because of the addition of flying insects, the game is equivalent to free jumping, coupled with rock climbing and other functions, so that the rise of strange hunting has a real sense of terrain difference, but this terrain difference really only has the meaning of switching maps, but there is no actual gameplay significance, for example, it makes players have the advantage of condescending combat. This is not in the rise of strange hunting, once the player's position is too high, monsters can not attack the player will change the picture.

So the function of good terrain height difference is to enable players to make use of the advantages of high terrain and low terrain to gain combat advantage, while players use jumping skills (in most action games, there is often more than one action that can jump. Choosing the right action at the right time to jump is a skill) to wander among all kinds of terrain and gain an advantage in the situation at that time. This is the method brought about by the difference between the height and height of the terrain, which is more than one layer of depth on flat ground.

Since there is jumping in air combat, there will be air combat skills. Jumping is an effective channel of attack in traditional 2D action games and combat games, as well as in 3D games, such as jumping and splitting in "Elden Ring". Is a very mainstream way of playing.

Jump up in the air can launch attacks, far more than a kind of chopping down, many games also have a variety of gorgeous air tricks, so that players play pleasing to the eye.

Therefore, jumping up produces the dimension of "air combat", which can not only have air-to-ground skills, but also have air-to-air skills, allowing players to combine air and ground to play more beautiful and gorgeous moves, which is also the way to play by jumping.

Various problems and solutions extended from this

The existence of jumping brings us some new properties, which is good, but when we really want to realize the content of these jumps, it will give rise to a lot of troublesome problems, mainly including:

Cliff fall problem because of the poor terrain, so there must be "cliff", because it is an action game, so there will be a lot of movement itself with displacement, even some ARPG games, there will inevitably be such skills, the use of displacement skills on the edge of the cliff may cause the character to fall off the cliff. Although not all games will suffer direct losses such as injury when they fall off a cliff, it is also unwilling for players to be at a disadvantage if they fall unwillingly, so they either rely on their own proficiency to overcome the problem of the edge of the cliff. or the developer helps the player to ensure that some actions will never fall off the cliff and will stand against the edge of the cliff.

The sentence "ensure that some actions will not fall off a cliff" is very easy to say, but "how to ensure that which actions will not fall off a cliff"? This is a very difficult detail to make, because in 3D action games, we don't have a good logic to say that "the position of the next frame is a cliff". Because we want to prevent the character from releasing his ability and not falling off a cliff, we have to know that we didn't fall off a cliff in this frame, but we will fall off a cliff in the next frame, so we need a logic to judge whether or not to fall off a cliff. At first glance, the logic can be that one frame stands on the ground and the next does not:

But this logic also applies to character take-off:

So we can't rely on this logic alone to determine whether the character falls off the cliff, and then stop the character's movement, so blindly stop the character's movement, even if it's just stopping the movement in the horizontal direction (xy direction of ue, xz direction in unity), it will also cause the jump to jump in place, so we can only add another one, that is, the vertical direction (the z direction of ue). The y direction of the unity moves horizontally or downward, so if there is a movement in the xy direction, and it will cause this frame to stand on the ground (blocked at the foot), and there is no block at the foot of the next frame, stop the xy direction movement. But this is only suitable for the horizontal ground on the edge of the cliff, if the ground is like this:

So if we use this scheme to prevent the character from falling off the cliff, we have to pay attention to the terrain on the edge of the cliff when editing the map.

Generally speaking, in games such as the rise of the Monster Hunter, in order to ensure that the player will jump off the cliff, he pulls a collision box on the edge of the cliff, and entering the collision box automatically allows the character to jump off the cliff:

Such a design is in complete conflict with the above approach, because it is difficult to know whether a character will encounter a collision box in the next frame (collision boxes that need to traverse the world to predict whether a character will encounter it in the next frame. After all, it is easy to "touch the box" and difficult to predict "not to touch the box"), even if you do, but because the collision box also has a width, it will cause the character's displacement to stop far from the edge of the cliff. It seems very unnatural, so action games usually have the style of not falling off the edge, and relatively speaking, the edge of the cliff will fall more naturally and better designed, as long as it makes the combat area more inaccessible (not absolutely guaranteed. But it can be guaranteed as much as possible).

The problem of getting out of a cliff seems to be the opposite of the previous problem, but in fact it is quite different. The root of this problem is-- how to continue every action if you rush out of the cliff? This is a mixed problem caused by the difference between the height of the terrain and air combat skills.

First of all, we need to make sure that there are some skills that can always get off a cliff, even if we use the above algorithm, but there are still some skills that will leave the ground themselves, so they should be able to get off the cliff, so after breaking out of the cliff, there is a question of how to deal with it:

Similar to the legends of KOF and the hungry wolf, Terry's famous slam dunk should be an act that can fly off a cliff.

There are two issues involved here, the first is what the trajectory of the skill should be after flying off the cliff, because the skill itself may be a character slightly off the ground, but more forward flying skills:

Or, for example, a skill similar to Terry punch, whose trajectory is like this, slightly off the ground and then forward, so what kind of trajectory should he have if he is used on the edge of a cliff?

Track An is a continuation of the original route, so the action will always keep the current action when it does not land, so in the end, as long as the cliff is wide enough, where to fly becomes a thing that only God knows the answer, so it is obviously inappropriate, players can not predict the approximate outcome of a behavior, this is a very dangerous design.

C is directly changed into a falling action after the action, which is not unacceptable, but the acceptability is the lowest, but it is the simplest to achieve.

Track B has made some whereabouts correction, which seems to be the most reasonable, but the question is, what is the basis for this whereabouts? How to implement it? With RootMotion, there is a question of how long the whole animation is. If you use a Section similar to Montage in UE to do Loop, you need to make an AnimNotifyState with more Loop falls each time. Does it look like the problem has been solved? No, the question is just the beginning-how does this AnimNotifyState make this happen in a normal mobile system (heavier each time)?

Here we want to go back to the mobile system, that is, in order to ensure that some movements are preset to the rising height, or that some movements always move horizontally, we will make the falling gravity of the character itself not effective when there is RootMotion (or other information), forming a "flying state". We can clearly see that the punch phase of Terry (or the stage of punching loop according to demand) is supposed to be "flying", so where should I add the force of this fall? So we need to make an effort to do this? Of course it solves. I have a force to make sure I go down, but the question is, when will this force end? So a series of questions make this very good-looking B track become the most difficult thing to achieve, because you have to figure out the logic of the whole movement.

So when we design skills, we not only have to consider that air combat skills require a loop (up to the ground)

Bottom-up problems what we are talking about above are all top-down problems, and now it's time to talk about bottom-up problems. There will be a problem of game balance from the bottom up, for example, the length of time we want to shoot off the enemy is preset by the planner, but because the character is a bottom-up process, this will cause the character to fall on a higher platform:

Of course, on the contrary, the parabola time of the character who is shot down from high to low should be longer, if the game is set like this, of course, from high to low, we can set the strike action time to exceed the "planned hard time" and directly become the falling action, but the bottom-up character B can only be lucky to end hard and straight early, or lie on the ground for longer. But it is clear that ending early is a more acceptable outcome.

This is a typical bug in terms of implementation, but in terms of game design, it is a "can only be accepted" setting and can only be compromised.

Since there are solutions to these problems, why is it so difficult? In the actual process of game development, even if there is a solution, it is not necessarily a solution, because there is still a process of implementation between the solution and the solution, and many problems cannot be solved in the end because of this layer of implementation. For example, the problem of overcoming the cliff we mentioned above actually seems to be a matter of workload. You only need to configure "character landing detection" in each action, which is accurate to the practice of UE, that is, pull an AnimNotifyState in each Montage, this AnimNotifyState is responsible for landing detection, and jump to Section at the same time, you can complete the whole job. It sounds like a very simple task, but even the player characters have monsters. There may be dozens of characters in the whole game, with dozens of animations for each character. We can really send someone to do it once. There seems to be no problem when 0 to 1 is done as planned, but once it comes to the testing stage, or when bug appears in a certain link, the UE development environment will bring a very fatal blow to efficiency. This is game development-- most of the time, we are not doing 0-1 things, but maintenance, not only for new ideas, but also for old mistakes, such as configuring this AnimNotifyState, it is not a mechanized thing, because the code does not know why the NotifyState is pulled and stretched for how long, it must be done by humans, but humans have to do these things in a mechanized environment. In the end, it will be difficult to avoid problems.

When we consider the whole project (playing a complete game rather than Demo), we have to fully consider these issues, because the huge amount of data can make things that seem possible (Demo can work) completely out of control, and even deal a fatal blow to the progress of the project.

So, when we understand the difficulty of doing a jump in a 3D action game, please act according to your ability. The so-called acting according to your ability refers to whether the whole team's manpower and financial resources can support it. If there is no jump, it may be completed in half a year. After adding a jump, we are still looking for all kinds of details.

This article comes from the official account of Wechat: game Design of Thousand Monkeys and horses (ID:baima21th), author: monkey and Huaguo Mountain

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

IT Information

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report