Game Engine Analysis 8

zhaozj2021-02-16  59

Game Engine Analysis 8

Original author: Jake Simpson Translator: to the sea Email: GameWorldChina@myway.com

Part 8 Script System

Scripting system

We came to the scripting system from the game network problem from the seventh part because the story of the story is narrative, and has recently formed a large gaming element. In a scenario that needs to be explained in a controlled manner, the pre-programmed movie script is a method of solving the problem. In the movie, this is usually used to process or explain the situation to a partner from the protagonist, or the enemy interprets the hero. Of course, there are other methods to do this - narrative, reverse, and so on - but usually use live scenarios to complete. Of course, the game is different, and the game developer should not do too much inverting in their usual FPS, because usually need to load new environment or levels, and new textures and / or models. All of these additional processing and rendering can affect the performance of the primary game sequence. You can reuse the scene elements that have been stored in memory to reverse, but it will look obviously rough.

Ravensoft Star Trek Voyager: Elite Force Widely utilizes the scripting sequence to generate events in the game and the clip scene using the game engine itself.

A interesting trend of designing scripts in the game is to use the 3D game engine that currently improves the top 3D game engine to generate a clip scene. Now this may be quite obvious, but ago, when the 3D graphics card is relatively simple, the clip scene usually uses high-end 3D workstations, the 3D animation gets 3D animation and then recorded as a digital video file, flow file Stored in the CD-ROM. From the beautiful graphics screen from the clip scene back to the relatively rough 3D picture of the real game, this is quite unpleasant disappointment. But like Half-Life and Star Trek Voyager: Elite Force uses the games like their own engine to generate all the clip scenes, the result is that the transition between the clip scene and the game is smoother.

It may be a good idea to score scripts and artificial intelligence. The script is that you completely control a given scene, and the establishment of a player almost always has no control, the player 'moves along the track' to a given place, or establish a game player needs to solve the situation. A good example may be that the boulder falls on the hallway and needs a game player to find a new escape method.

There are now some different types of scripting systems to serve as a boost or artist, and it is properly doing these very well-organized and logical ideas. The first is a simple text-based, single-line style, just like the code of our programmer's habit. In many cases, it is actually based on C, although in a very simple form. A large number of things like "if this, dam do there". Most scripts tend to range in the range - means that it is usually composed of many commands that are in the order. Mobile role a point to B. After completion, let him speak, after completion, move him to C. Quite simple things.

Then there is a complex thing - allow multiple clues, and actually allow variable situations. Variable cases are actually unknown when the script begins, but you must write scripts in this way so that anyone will work nearby it will work. For example - a normal simple script will have three guys, all pre-defined, all of which have the situation they will discuss. A variable script will have three people, you can't guarantee a particular person and must work in the same way. Or in an extreme situation, maybe only two, or even a guy will be there, so that the tripartite talks.

Raven in Star Trek Voyager: Elite Force is a big problem in this case, the user may want to bring a role from a ship to another place, but from A to B The path may change at all times as each game is changed. For example, they need to let Munro (the main role you play the game main role) from the engine compartment to the delivery cabin. Unfortunately, due to the non-linearity of the game, you may have destroyed the turbine lift before the incident, or maybe Jeffries can not be passed. Assume that we don't know the state of the world when the script begins, we have to write scripts for almost all possible things to apply to these 'if. . . What is the situation? And it is only worse from there. Some situations we can provide provide so many possible combination situations, so that it is almost impossible to accurately test every possible thing for a satisfactory conclusion. Please talk about anyone working in Sin, Star Trek Voyager: Elite Force Or deus EX. The QA department hates these types of games, because this has made them 50 times more difficult than before. You can imagine what is difficult to write scripts for these situations. But that is a matter of today's nonlinear game path, and why is it win more development support to work hard to achieve it.

JIM DOSE discussion about scripting systems

At the end of last year, I interviewed Jim Dose - Ritual's former developer, now is a developer of ID Software, Doom3 script system (and other things) designers. Although this interview has been a bit for a long time, it is still very insightful.

Jim talks about scripting systems and creates an easy-to-use and robust system (which is opposite to all features that contain designers who want to use):

The most difficult part of designing a script system is to know when it is stopped. Once you have completed and start running, you find that there are many systems that can take advantage of it. For SiN, the initial idea is just to have a relatively easy way to let the level designer describe how the object moves in the environment. In the later stage of the project, we also use it to synchronize sound and game events, in multiple level tracking task objectives, control HUD layout and game internal computer console user interface, describe how artual intelligence responds to different situations , And particle system.

Control complexity may be difficult. When you put the power of the script into people with creativity, they began to explore the boundaries they can do. Often, they are inspired to do something that is just slightly exceeding the system's ability. It is easy to fall into this incremental 'just one feature' to allow them to do what they want to do. As the language grows, a language structure that may make sense to the initial specification has become more excessive. At some time, re-thinking the system has become meaningful, but at that time, you may have accumulated a huge amount of script that must be rewritten. Like FAKK2, Sin suffered such a loss. I didn't get a lot of opportunities for the scripting system to completely check until I rewrote the scripting system for Rogue's 'Alice'.

Apas, Jim. - Raven has seen this happens in their ICARUS system. Icarus is actually a scripting system as the same kind as JIM, and is responsible for all script events in Star Trek: Voyager: Elite Force. It is reused in Soldier Of Fortune II and JEDI KNight II: Outcast. In order to solve new problems that the system needs to be processed, these issues are not foreseen / unnecessary in the initial implementation, and many of the script systems have been revisited.

Visualization scripting system

The second type of script is a visual scripting system. Using this method, not the encoding method of text files, in fact you can build your script in a real role in a real gaming environment. You can track the path where the role walking in the world, defines the animation used, and usually get better ideas about your scripting actually looks better. It doesn't have much real help on the nonlinear issues we have discussed, but it does quickly generate the original script quickly. Second, Jim talks about visualization scripting system.

Visual scripting systems do have their use, but often achieve more difficult, if designed is very poor, it is easy to make developers feel confused when complexity increases. For example, artificial intelligence can perform visualization design with a flowchart structure. You can easily visualize people's behavior behavior, with a box representation, arrow representatives to other states, indicating that the role can be converted from one state to another state.

One of the scripts is usually used to control objects in the game world, indicating how they move in the world. The ability to move objects to critical locations in an editor and play the entire movement capabilities may be more intuitive to a designer. However, it does have its limit because there will be another interface to design an object to be made in its movement. That capability is to distinguish the script animation fragment and animation distractions generated by 3DS MAX or Programs such as Maya.

At some time, the user may need some way to determine why a script does not do what they expect. Some forms of defect tools make this work very easy. At least, decide which scripts are running and scripted some ways to work. It is also helpful to check the variables, start, stop, and single-step execution in the script. Typically, a programmer can make the error in their debuggers, but this process is longer than if there are some built-in script debuggers.

The above is the 8th part, in the next chapter we will discuss the power of the game engine design tool, then explore the game control mechanism, develop game objects, and some stimulating interesting things (weapon system ).

转载请注明原文地址:https://www.9cbs.com/read-22026.html

New Post(0)