WITHToday I decided to write my first blog on the last day of winter. DLadies and gentlemen, I present to you for your evaluation a blog about the idea of detection in shooters using the example of the game Return To Castle Wolfenstein. NIt should be noted that the author is not a game developer and chose this game at his own request. YoThe capacity of the blog of stars from the sky is not enough, but the main thing is that it is useful for any reader. MYou might end up experimenting with the detection concept in After Effects (for advanced After Effects users).
RThe cult and legendary game Return To Castle Wolfenstein from 2001 will be taken for scientific examination. ABOUTHowever, it is necessary to note one thing that stealth in this game is rare, and these moments can be found very rarely, and even then only at the beginning of some levels. ANDThe genre of the game, after all, is fps (first person shooter), accordingly, this is an ordinary shooter, where, upon any detection, all enemies immediately know about your location. DNext we move to the department of the very concept of detection in first-person shooters. ENaturally we will be based on two-dimensional space, which has only x, y coordinates. NIt is necessary to take into account that only the concept will be described here, which will be shown using the example of squares that will not relate to the game in any way. ANDso let’s get to the idea. I I advise you to download After Effects 2022, t. To. then each of you can experiment.
Discovery idea
ANDThe idea that the author takes into account is that when using computer vision with tracking changes in value along one of the color channels, in our case, the green color channel, notify all NPCs on the map. LThe following elements with the following color values on the RGB channel (red, green and blue) were best suited for the experiment:
Player: [186,46,46] A tracking function will be attached to the player element to change the green color channel. As soon as an NPC’s view element passes through the player, then the tracking function will detect this event and the level alarm will be raised.
NPC: [82,147,29] (The NPC’s overview in the form of a circle will also have the same color) The NPC, having its overview in the form of a geometric figure, as soon as it touches the player’s element, immediately raises an alarm through a tracking function that is tied to the player.
Yuhu, the main elements are defined and their ideas are described, which will be implemented a little lower. ShWe now proceed to the implementation of the concept for its analysis. AAlso, stopping the NPC when a player was detected was not considered in this experiment, because. To. I’ll be honest, I didn’t want to bother with additional programming in the After Effects expression environment.
Implementation of the detection idea
ShLet’s now turn to implementations and experiments in the After Effects 2022 environment. A Now we have the following list, in which priority is distributed from bottom to top (higher is more priority):
[Adjustment Layer]: Has a Sample Image function that is tied to the “Player” element and tracks its changes.
[NPC]: A non-player character who has a route along which he moves, accordingly, the “NPC angle of view” element moves along with him.
[NPC viewing angle]: Moves along x, y coordinates following the NPC and also turns in the direction in which the NPC turns. This element has the same color as the NPC, only it also has 50% transparency.
RLet’s look at the GIF files below
The first video we see is the movement of a green square (NPC) with its viewing angle. The number on the top left is the value of the green channel near the reddish square (PLAYER). As we can see, when the player’s View Angle crosses the value increases from 46 to 97, then drops again to 46 when the NPC does not see the player.
The second video will be the same experiment, but with text added below that if detected, an alarm will be raised on the entire level and all opponents will know about your presence and location.
Detection and detection https://winzter-casino.uk/login/ fixation
ANDThe study demonstrated the functionality of the player detection algorithm in the game Return To Castle Wolfenstein, or rather, this detection algorithm is extremely close to the detection algorithm in the previously mentioned game.
Fthe inish straight line is ahead of us, and therefore we should analyze the experiment itself, or rather, what and how to create for its implementation and implementation.
The location will look like this:
Let’s go from bottom to top through the list from Afrer Effects
[Shape layer] 7th element This background, The only important thing is the color; you need to set the Fill values to the following:
expand the video window to cover the entire video window and put a “lock” as in the list
[Shape layer] 6th element This player, set fill values (Fill)
Next, it is better to rename this element romaa712
[Shape layer] 5th element this is an overview of the NPC (you need to create a huge circle, the diameter of which will be from the bottom to the top), we call it SG_Fow and set the following colors
Then you need to add an effect to this layer Radial Wipe and configure it as follows
Transition Completion: install 80%
Start Angle: paste the code below
Wipe Center: paste the code below
The effect is set, now you need to adjust the position of the 5th element, to do this you need to do the following:
go to tab Position of this layer and paste the following code there
[Shape layer] 4-th element this is an NPC review, it needs to be named S.G
It is also advisable to animate the Position and Rotation of this layer so that somewhere the NPC Overview intersects with the player.
[Adjusment layer] 3rd element, throw an effect on it Sample Image and customize the effect
Center: paste the code below
Sampled Color Output: paste the code below
[Text layer] 2nd element this is the normal text output [we call it 12122], which will calculate the green color values from the 1st element
In the Source Text we insert the following code:
[Text layer] 1st element this is the normal text output [we call it 12122], which will calculate the green color values from the 1st element
In the Source Text we insert the following code:
Results
ABOUTx, it was difficult, but quite interesting, because the entire experiment and its implementation was done by writing expressions in After Effects, among the animations in After Effects there was only animation of NPC movement and rotation, the rest was programming.
INThe conclusions are as follows: the experiment and analysis of the results of the experiment in the After Effects environment provided a positive experience, with the help of which any reader of this blog will have an idea of instant detection in games such as Return To Castle Wolfenstein.
