1/13/2024 0 Comments Custom wolfenstein 3d maps![]() T_Chase and similar functions make these calls only when the destination tile is reached, so once a position is selected the enemy is obligated to reach that position even if they pause to shoot at the player.ĭue to the freeing of space when a new tile is selected, other enemies are able to choose that space which means that if they stop to shoot multiple enemies can appear to occupy the same space. When claimed, the enemy is actually immediately considered in that location for movement collision and the position in which their sprite is located is freed. Enemies pick a tile they wish to move to through functions like SelectChaseDir which look for an unoccupied adjacent tile and claim it as their tilex and tiley. The AI in Wolfenstein 3D is based on tiles. ![]() This is the speed that vanilla would have at about 12.6fps or lower and should be fairly similar to the speed at 17.5fps, but doesn't require making up an arbitrary value. The result is T_Projectile is effectively executed a sixth as many times as it is supposed to be.ĮCWolf resolution: Bug is fixed so speed is 0x1200 as stated in T_FakeFire. As the frame rate increases the value of tics, which is used as a multiplier, goes down to a constant value of 1. This is caused by the adaptive frame rate compensation method combined with a typo whereby s_fire1 and s_fire2 have T_Projectile as their action function (executed on frame transition) rather than ticker function (executed "every tic"). In a seemingly contradictory fashion, the fireballs slow down as the frame rate of the game increases (until the 70fps vsync is hit). Probably the most well known frame rate dependent quirk in Wolfenstein 3D is the speed of the fake Hitler fireballs. To work around this issue the frame rate is locked, via PollControls, to 17.5fps (70/4) while recording and playback which presumably was determined to be a typically obtainable frame rate.ĭue to this it is probably reasonable to believe that the game was designed for the behavior seen around 17.5fps.ĮCWolf resolution: Play sim rate is unlocked from frame rate and set to 70Hz. In order for the demo to playback correctly determinism is required, but the engine does not meet this precondition when the frame rate fluctuates. What vanilla did was either done because it seemed like an obvious way to do it at the time, or as a deliberate optimization to reduce the number of operations required on slower computers.ĭemos in Wolfenstein 3D consist of a recording of the state of controller input for each tic of the game. If the frame rate drops below 7fps the game will slow down instead.ĮCWolf resolution: Similar to how Doom works, the play sim is now rerun for the number of tics that passed rather than multiplied out. These issues are to some extent mitigated by a MAXTICS constant which limits frame rate compensation to 10 tics or 7fps. The latter has a host of implications due to the uneven distribution of the random number generator in addition to changing the number of and order of calls to the RNG. The former example could in theory manifest itself in collision detection errors since movement collision is only calculated instantaneously rather than as a continuous motion. For example in T_Projectile the movement distance of the projectile is multiplied by this value, or in T_Chase the chance of something happening is multiplied by this value, or even in the case of ghostobj in MoveObj (Pac-Man ghosts or spectres) multiplies damage delt. This value is used as a multiplier in various places. In order to handle frame rate fluctuations without changing the speed of the game play, the Wolfenstein 3D engine calculates the number of 1/70 second moments that have passed in CalcTics into the variable tics. While indeterminism is a primary reason that multiplayer is not a trivial add to the vanilla engine, the way that the Wolfenstein 3D engine adapts to lower frame rates results in changes in game play with ranging severity. The Wolfenstein 3D game engine, not being designed for multiplayer, has many examples of indeterministic code. ![]() If the AI is observed from the other side of a wall one can see triangular movement from the east or south, but wall hugging from the west or north. At the end of SelectChaseDir this is done, but regardless of the result of the random number generator the enemy will only ever try to go north, nortwest, or west. The way this is supposed to be done is by having the enemy move in a "random" direction and then try to get to the player from their new position. When the player is out of sight the AI needs to make an attempt to walk around walls. The AI generally tries to move in a straight line towards the player, dealing with the limitation of only being able to move to the center of tiles.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |