43

In addition to what Josh Petrie mentioned: if you're looking for more advanced ways to aim weapons, the center dot in your bottom image is also called a "pipper" in real-life applications. This especially applies when some device is actively predicting where an arcing projectile will impact, like a bomb or grenade, instead of simply showing which direction ...


21

Simple answer: cheat or don't be that accurate! If you've played some shooter online, you'll most likely have experienced the so called "rubber banding" if your connection to the server is bad. This is caused by your client correcting your position from time to time. Basically, what happens on the two sides: The server will track your movement and send ...


20

Shoot a ray from the camera through the center/reticle into the world. Find out where in the world it hits. Fire the bullet from the gun's muzzle at that point instead of straight out of the gun. Bonus points for animating the hands and gun to point in that direction while aiming around so the bullet still looks like it's firing straight out of the muzzle ...


18

Always assume the client is a lying, cheating, bastard. The client is responsible for: Receiving input from the player (and sending commands to the server, which validates) Rendering the known gamestate The client is in no way allowed to calculate the gamestate except as client-side interpolation for smooth animations.


12

The main problem is tunneling. Game physics engines typically use discrete collisions. That means they advance all the bodies by one short time step, then check if they're intersecting, and handle collisions in response. This works well for medium-sized objects at medium speeds. But if you have a small object (like a bullet) moving very fast (like a ...


10

The industry standard for first-person view simulation in most shooters is to have character models and animations distinct from those used for third-person view. There are several reasons for this: The player has a much smaller field of view upon the world than a real person in the character's situation would, and he lacks other forms of input such as ...


8

When dealing with different frames of reference interacting with each other instantaneously, you have to compromise somewhere, you cannot have everything consistent everywhere; that's a fact of life. The scenario you have outlined is basically this: the shooter thinks she has hit her target, but the target thinks she has successfully hidden behind an ...


7

I'll state the obvious - FPS games are doing the best they can within the limitations of a single 2D display device. The interesting part - this might change soon thanks to the Oculus Rift project - a VR headset for games. I've seen info that DOOM 3 is fully supported (due to Carmack's involvement) and that Hawken has promised support. There is also work on ...


7

To measure framerate you need two counts: How many frames (not draw calls) have passed, and, How much time has passed. Your framerate is therefore calculated as: frames / time There are a few subtle complexities to this. First thing is that you need a good, accurate, high resolution timer. You don't say what platform you're on so I'm not going to make ...


7

There are many reasons a designer/programmer would want to draw the crosshair on the exact center of screen, or a little lower. A hybrid system may even be implemented, taking advantage of the properties of these two systems in a game fich of different weapons, vehicles, interactive spots, and so on. Drawing the crosshair centered or lowered can depend on ...


6

Server-side web languages such as Ruby on Rails are used to generate/serve HTML, JavaScript and CSS. They receive a request from the browser, act on it to make the HTML response, and then send it to the browser and the transaction is done. With the exception of tricks like long polling, they don't do anything dynamic in the browser; that responsibility is ...


6

If you haven't already, I suggest you to read these two deep but understandable articles : https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking and http://fabiensanglard.net/quake3/network.php. These explain why it's advised to use 'fixed interval' packet sending. To be short, it's in fact mainly important for packets sent by the server. ...


6

When we implemented our networking engine we exploited a number of compression techniques: First we write all of our snapshot bit-wise: bools are only 1 bit instead of 1 byte (or more depending on compiler). We wrote a bitstream class that reads and writes data to a stream. This saves a fair bit of data all alone when packing flags down. For an example of ...


5

Why has this happened? This HASN'T happened. Duke Nukem 3D and Unreal Tournament (to use your examples) were creative games, both were trying lots of exciting new things, in new themes, in new ways. But most other games from those eras weren't doing that. Quake 1, for example, had a pistol and a shotgun and a machine gun and a rocket launcher and etc. ...


5

To have the gun heat up quickly but reach its overheat threshold slowly, you could take the gun's current temperature into account in the heat dissipation, rather than having a constant rate of heat dispersion. That's actually how it works in the real world: the rate of heat / thermal transfer is proportional to the difference in temperature. Wikipedia has a ...


5

It's hard to tell exactly what's being asked here but I'll try to give the best answer I can. There are a few misconceptions going around in comments and answers so I'll try to clarify all this, to the best of my knowledge. [I] noticed that the camera perspective is similar to the 'one eyed view' of the surroundings. Indeed, the default (horizontal) ...


5

You're probably looking for a combination of the following concepts: Particle system for the bullet hitting a surface (i.e. sparks on hitting metal, wood splints on hitting wood etc.) Decals to allow projectiles to leave hit marks


4

The short answer: You need client-side scripting to make real-time games possible. The long answer: What is a server? A server is a computer used to run services for other computers on a network. What is a web request A web request is what web servers handle. It is a request, often created by a user from home on a home computer, netbook or a smartphone, ...


4

Aside from Josh's answer you have to keep in mind something else: players know what each of these weapons does. If I pick up a sniper rifle I know what I can probably do with it (shoot long distances, scope) and when I pick up a shotgun I also know to use it on shorter distances. If these weapons are replaced by say a deathRay and a doomshooter I might not ...


4

You can use a model. Often, HUD elements, sometimes including weapons, are rendered seperately from the environment. In the simplest example you'd set up the animation so that the ironsights line up with the zero-axis, and align the model's zero axis with the camera. Using Unity as an example, you'd put the weapon in the HUD layer so that it's drawn with a ...


4

This is what we ended up doing: Client side Detect player clicks button to shot missile Immediatley simulate rocket visuals on client In parallel, send command to server Once predict hit something, destroy missile (no explosion) Server Side Receive fire command Save client ping data on missile Fire missile, each frame accelerating the missile until we've ...


4

Most games allow you to manually spawn an invisible bot, and a lot of aimbots don't filter these out. By spawning 3 different bots and checking if the user aims at them, you can check whether they have aimbot or not.


4

Technically changing the FOV isn't zooming, but it does the same thing, so let's not take that into account. You can calculate the size of the view plane where the object lies using trigonometric functions: width = tan(FOVX) * dist height = tan(FOVY) * dist (Make sure the angles are in radians, and FOVX is the horizontal FOV, which is equal to FOVY * ...


3

I'd like to examine two multiplayer class-based FPS games with support classes as case studies: Wolfenstein: Enemy Territory and Team Fortress 2. Both have separate classes that give health and ammo, and I think it's helpful to consider both types of support. Enemy Territory has three support functions - healing, reviving and ammo - given by two classes - ...


3

There are a few better ways to get players to share ammo, however your your example mechanisms wouldn't work that well, example 1 has the weakness of not really giving any reason towards player B has no reason the disperse ammo and therefor might not decide to share him ammo at all, example 2 can either be used for some really annoying grieving and could ...


3

For 1.: Papaengine, was used to make the game you've linked (Papa Sangre). The engine claims it's "the only true real-time binaural audio engine for iOS!", so they seem to be rather limited. Though, I wouldn't think iOS would be the best choice for a FPS. There is this article from GarageGames that claims that FMOD is available for the Torque engine. Where ...


3

Your weapon needs two values: the current heat value (int, probably) and a cooldown timer (float). Initialize both to 0. When a shot is fired, add the bullet's heat value to the gun's. Cap it at 100. When this value reaches 100, set the cooldown value to your cooldown period time in seconds. Reduce this by your time delta every frame, clamped at a ...


Only top voted, non community-wiki answers of a minimum length are eligible