The Slightly Odd Way Bullets Work In FPS Games

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ส.ค. 2024
  • Gun model by Dries Deryckere: sketchfab.com/3d-models/gun-a...
    Music: Wehrmut - Godmode
    Broken Drum Machine - Godmode
    Knowpe - Noir Et Blanc Vie
    Discord: / discord
    Twitter: / garbaj2
  • เกม

ความคิดเห็น • 1.5K

  • @robinrai4973
    @robinrai4973 2 ปีที่แล้ว +5747

    There's a cool Dev talk about insurgency sandstorm's hybrid approach - it's all calculated/precalculated as a projectile, so there's bullet drop even during the hitscan portion, just that the first 0.1 seconds of travel time is instantaneous

    • @sergentmaso
      @sergentmaso 2 ปีที่แล้ว +173

      Maybe I'm too dumb to understand, that doesn't make sense to me. If the travel is instantaneous, then there is no "first 0.1s" right ? Cause the travel time is 0s.

    • @Deliveredmean42
      @Deliveredmean42 2 ปีที่แล้ว +264

      @@sergentmaso Math can be complicated, but that something to understand with how timers work. Hitscan are raycasts which are based on calculations, and if you will say add a delay timer of 100 milliseconds here, at some point since its under a second you can turn it into a projectile based. I believe it somehow similar as to how bullet travel loses their speed overtime, but in this case the bullet had a hyper speed for a fraction of a second and become normal after that.
      Probably the worse simplificaiton of the system, but maybe this helps.

    • @sergentmaso
      @sergentmaso 2 ปีที่แล้ว +45

      @@Deliveredmean42 it does help a bit, I just don't get the 0.1s delay. To what would you apply the delay ?
      To me it only makes sense if :
      - OP mispoke and it would be "bullet is hitscan for x meters and then a projectile (most likely imo, and that's how I understood the "hybrid bullets" stuff from the get go)
      - game traces a line from the player, the bullet "travels" trought the line at a defined speed for 0.1s (I would guess modelised as a succession of points of said line switching from being unable to able to interract with the enemy's hitboxes, but I might be wrong) and then becoming a projectile with a hitbox of its own. But that would imply that the bullet travel would not be instatanious.
      Idk if I'm missing smt here, those are the two explainations my brain can come up with rn ^^

    • @robinrai4973
      @robinrai4973 2 ปีที่แล้ว +134

      @@sergentmaso Hi, I'm no dev so I can't really go into detail, but if there were a gun that shot bullets with a projectile speed of 1000m/s, the first 100m of the bullet's travel is instant. It probably is hitscan, but it still follows precalculated projectile motion, with bullet drop and what not. Beyond that it's a projectile. I highly recommend checking out the talk, I'll link it if I find it

    • @robinrai4973
      @robinrai4973 2 ปีที่แล้ว +58

      th-cam.com/video/LmLwlMLcgaw/w-d-xo.html here it is, apparently it's not hitscan!

  • @VerticalCalzone
    @VerticalCalzone 2 ปีที่แล้ว +2834

    The heavy from tf2 demonstrates some of this weirdness very well. His minigun's bullets come from his eyes, which leads to a common situation where his gun *looks* blocked by terrain, but he can still shoot you because his eyes are unobstructed. It's very noticeable simply because he holds his gun so low to the ground, so this disparity comes into play very often

    • @dkskcjfjswwwwwws413
      @dkskcjfjswwwwwws413 2 ปีที่แล้ว +259

      The heavy is infact the worst case of this, as his minigun held at knee level

    • @hetsmiecht1029
      @hetsmiecht1029 2 ปีที่แล้ว +112

      @@user-id9fh7qj5j I don't expect vr will replace all gaming, as it's quite nice to be aware of your surroundings while playing a game. It also isn't very suitable when you're playing together with friends in the same room.

    • @soggy9648
      @soggy9648 2 ปีที่แล้ว +16

      even better is seige, where it comes from the scope

    • @aidelai4098
      @aidelai4098 2 ปีที่แล้ว +11

      Hiding behind the cart on offense is one of those situations but i don't see many heavies use this tactic

    • @dahkir6555
      @dahkir6555 2 ปีที่แล้ว +10

      @@user-id9fh7qj5j When you wear VR goggles, you can't really see your surroundings, since the goggles are covering your eyes. You can see the game around you, but you can't see your cat that decided it's a fantastic idea to take a nap right next to you when you can't see it.
      I think that even when we achieve full immersion, and by that, I mean being "inside" the game and being able to interact with it similarly to how you can with the real world, PC and console gaming will always be present. Like, walking around a fantasy world, swinging your sword at the opponents, being able to feel your weapon and whatever you hit with it is cool and all, but there's just no way it would eradicate "traditional" forms of gaming. The price of such technology is one of the reasons.

  • @aanimal
    @aanimal 2 ปีที่แล้ว +1681

    I love how he didnt stretch something like this into a 40 minute video.

    • @darthrevan8376
      @darthrevan8376 2 ปีที่แล้ว +66

      i kinda wish he did i love those long videos alot lol

    • @vishnugopakumar8807
      @vishnugopakumar8807 2 ปีที่แล้ว +52

      I love how short it is too, but at the end of the video I was really hoping he would just keep going because I was just so interested lol

    • @FutureBoyWonder
      @FutureBoyWonder 2 ปีที่แล้ว +23

      Why? He barely gave us any real content and hardly scratched the surface, or do you prefer tik took like some mouth breather?
      I demand answers

    • @darthrevan8376
      @darthrevan8376 2 ปีที่แล้ว +46

      @@FutureBoyWonder why are u so mad about this?

    • @frandurrieu6477
      @frandurrieu6477 2 ปีที่แล้ว +16

      @@FutureBoyWonder Why are so pressed lmao

  • @orthografe
    @orthografe 2 ปีที่แล้ว +438

    The main benefit of hybrid type is to not spawn thousands of projectiles when you get a firefight in close quarters, which is most firefights, limiting the impact on the server

    • @jaydengraham8303
      @jaydengraham8303 2 ปีที่แล้ว +6

      Yeah another good example is rust you will notice that close up it is hit scan but when you are shooting far you have to acount to travel time

    • @Andrew-xo6hl
      @Andrew-xo6hl 2 ปีที่แล้ว +6

      @@jaydengraham8303 Nah thats just because youre so close the travel time is miliseconds so it doesnt matter.

    • @jaydengraham8303
      @jaydengraham8303 2 ปีที่แล้ว +11

      @@Andrew-xo6hl bruh look it up

    • @jaydengraham8303
      @jaydengraham8303 2 ปีที่แล้ว +1

      @@ItsMeBarnaby oh nvm myb

  • @painkiller118
    @painkiller118 2 ปีที่แล้ว +1757

    The basic concept with the hybrid version. Hit scan bullet is initially fired, if the bullet doesn't hit anything after a certain distance. Then the projectile is spawned at that end location and continues on with its own set of rules. Other than using this for balancing, it is also a way of reducing load on the server in a multiplayer shooter. Its much easier for the server to handle hundreds of hit scans than it is for it handle projectiles (server needs to keep tracking of location speed gravity ect). By using the hybrid it can reduce strain on the server while still allowing projectile bullets and the benefits they can give.

    • @stare4539
      @stare4539 2 ปีที่แล้ว +1

      Lol

    • @stickmanonastick6089
      @stickmanonastick6089 2 ปีที่แล้ว +19

      @@Padlock_Steve oh no

    • @ryo-kai8587
      @ryo-kai8587 2 ปีที่แล้ว +47

      @@Padlock_Steve Pretty sure that's kinda how it works. Grenade explodes; it draws a hurtbox and scans for any target within range-taking into account distance and in-world barriers that may negate or reduce the impact-then uses that data to decide the hit damage. I doubt explosions are commonly physics-based, even in modern games.

    • @mastershooter64
      @mastershooter64 2 ปีที่แล้ว +3

      oh wow that's actually more clever than how I thought it would work

    • @pacifistminigun3987
      @pacifistminigun3987 2 ปีที่แล้ว +1

      @@Padlock_Steve oh god no

  • @MythicLegionDev
    @MythicLegionDev 2 ปีที่แล้ว +4502

    It's super interesting how many different ways bullets are implemented in games, each with its own pros and cons. It's also pretty neat when developers use hybrid approaches to try to get the best of multiple worlds. Great video!

    • @ijsbeer
      @ijsbeer 2 ปีที่แล้ว +35

      When are u gonna upload again?

    • @pranavsharma4268
      @pranavsharma4268 2 ปีที่แล้ว +18

      You are still alive

    • @fullmetaltheorist
      @fullmetaltheorist 2 ปีที่แล้ว +20

      You upload an banger and disappear. Why? Does making one of those videos take a long time?

    • @xtimes3952
      @xtimes3952 2 ปีที่แล้ว +8

      u ded?

    • @MS-kc4uz
      @MS-kc4uz 2 ปีที่แล้ว +9

      New video whennn

  • @tiberius8390
    @tiberius8390 2 ปีที่แล้ว +260

    I want to highlight ArmA3's system with "real bullets" flying through air. When played with ACE and its advanced ballistics this is the most realistic bullets I've ever seen in a game. Every bullet is simulated.
    With the mod temperature, humidity and pressure play an important role on how fast your bullet is slowed down. It even takes coriolis effect into the calculation (different maps are in different places on the fictional world, so they have different coriolis effect on the bullet, which you have to adjust for). The shape and weight of the projectile are taken into account, as well as barrell length as well as wind direction and speed. Barrel winding has an influence on the stability of the bullet and there's even the shift between supersonic and subsonic ballistics calculated.
    Honestly, only firing a real gun is better than this.

    • @gabiferreira6864
      @gabiferreira6864 2 ปีที่แล้ว +23

      Arma 3 is fucking crazy and I love it

    • @icannon6611
      @icannon6611 2 ปีที่แล้ว +9

      Every time I watch one of these videos I'm reminded of how amazing arma is. And with the new engine Arma 4 will be much less clunky

    • @arsnakehert
      @arsnakehert 2 ปีที่แล้ว +10

      And just vanilla Arma 3 has some amazing bullet penetration mechanics, too, as well as realistic-looking ricochets and travel simulation

    • @jayday187
      @jayday187 ปีที่แล้ว +2

      Alternatively there's VR shooters like Onward

  • @DevilBlackDeath
    @DevilBlackDeath 2 ปีที่แล้ว +248

    The issue with chest level cameras is thinking you're behind cover when you're not! As for hybrid bullets another obvious advantage is stress on the servers. Projectiles take up more power, so by making it so close range acts like a hitscan you reduce stress on the servers. It's not huge but can make a difference when there's a lot of players but you still want realism.
    I don't personally know how they work but the only way I can see those working is raycasting up to the distance you need, and if it fails throw the projectile.

    • @Barnesofthenorth
      @Barnesofthenorth 2 ปีที่แล้ว +8

      Yes that is a major problem in game like Hunt:Showdown for example, you take cover a lot in that game and you can often think you are in cover, then suddenly get head shot. The character also leans to the right when aiming so if you peek out of cover to the right you are far more visible than when you peek to the left, though I don't know if this is an issue with the body camera or just Crytek being incompetent.

    • @DevilBlackDeath
      @DevilBlackDeath 2 ปีที่แล้ว

      @@Barnesofthenorth A mix of camera height and animation debugging issues I'd say. Leaning issues are usually not too bad if you expect to lean but if it's really that bad then there was probably not enough testing with regards to that !

    • @bottledpeanuts6846
      @bottledpeanuts6846 2 ปีที่แล้ว +2

      I agree, but another disadvantage of chest level cameras is that they can make you seem shorter than you actually are, which could potentially reduce the immersion of a game

    • @DevilBlackDeath
      @DevilBlackDeath 2 ปีที่แล้ว +3

      @@bottledpeanuts6846 I agree though it's not something that's usually very noticeable in classic FPSs ! In VR it's terrible though. There have been a couple FPSs where the camera was so low that it did break immersion though so it IS something to keep in mind.

  • @KlausWulfenbach
    @KlausWulfenbach 2 ปีที่แล้ว +631

    This is why in the very earliest FPSs such as Wolfenstein, Doom, and Quake, the weapons were always in the middle of the screen. In the case of pre-Quake FPS games, the simulation was also 2D so the camera and the weapon couldn't actually be at different heights anyway.

    • @garbaj
      @garbaj  2 ปีที่แล้ว +88

      I always thought the centered gun was just a stylistic choice, didn't realize it served a purpose

    • @Calinou
      @Calinou 2 ปีที่แล้ว +104

      @@garbaj One of the supposed reasons why the weapon sprite was centered in Wolfenstein 3D and Doom is that these games didn't have a crosshair. The centered model helped you to visually line up shots.

    • @midge_gender_solek3314
      @midge_gender_solek3314 2 ปีที่แล้ว +20

      Hitboxes and camera positions were actually 3D in Doom Engine.
      Collision boxes were 2D, though, so you could shoot over entities but not walk over them

    • @sunfl0wer_988
      @sunfl0wer_988 2 ปีที่แล้ว +1

      @@midge_gender_solek3314 I thought Doom had auto-aim, by that I mean if you like shoot a rocket it's blast damage will also hit the ones like below and above it. Also, it's pretty weird only the enemies are the only one that has infinite height, while other things (like Keycards, Armor and other items) aren't that.

    • @TheHumppaidiootti
      @TheHumppaidiootti 2 ปีที่แล้ว +2

      @@sunfl0wer_988 Are you sure those are not infinite height? Atleast explosions are, so are melee attacks. Though they use simple transform check, but it would be weird to write two different collision systems. Especially weird for Carmack to write such a thing, programmer who want to keep everything as simple as possible.

  • @wotwott2319
    @wotwott2319 2 ปีที่แล้ว +290

    Another game that uses a similar hybrid system is Rising Storm 2 Vietnam. Up to 50 meters, the bullets are hitscan and beyond that, the bullets turn into projectiles and has a drop, and the point in which the bullet turns from hitscan to projectile is based on the weapon's muzzle velocity. The bullets in the game also come out of the barrel of the gun so in order to properly shoot, you do have to often reveal at least a significant amount of your body to the enemy. Oh and a fun mechanic in the game is backblast. Firing an rpg causes the back of your rpg to shoot out a large hitscan indicator that kills anyone instantly within 10 meters behind the rpg, so in a dense group, you always have to notify your teammates before you fire off a rocket.

    • @garbaj
      @garbaj  2 ปีที่แล้ว +45

      That seems kinda fun lol

    • @joelambert7128
      @joelambert7128 2 ปีที่แล้ว +19

      as boring as Battlefield 5 is compared to some of its predecessors, it also happens to model backblast.

    • @dankovac1609
      @dankovac1609 2 ปีที่แล้ว +34

      @@joelambert7128 in Squad, you always feel kinda cool and important when shooting a rocket launcher and always yelling "Clear backblast!"
      Makes the launcher itself feel powerful.

    • @vornamenachname554
      @vornamenachname554 2 ปีที่แล้ว

      GTA 5 has hybrid bullets too. Its hard to notice because the range at which the bullets become projectiles is far more than most weapons can shoot in general. It only gets noticable if youre trying to shoot very fast moving object very far away (jet e.g.) with a sniper.

    • @vornamenachname554
      @vornamenachname554 2 ปีที่แล้ว

      @@zombiesquirel You might want to check out a video called "HOW TO SNIPE JETS !? GTA V TUTORIAL" from "MetPro SOWC" here on youtube. He says and shows that sniper bullets are projectiles. This video in mind we could argue they are projectiles overall but he only talks about very long range shots and if you look at other sniper videos with closer fast moving objects they aim directly on target. Thats why i believe that sniper bullets are hybrids.
      And if sniper bullets are hybrids, every weapon (except stuff like grenade/rocket launchers of course, which are obviously projectiles, no matter what range) could be hybrids, you just never notice it because they cant shoot above the range at which sniper bullets become projectiles. But thats a wild guess by me and they are probably just hitscan.

  • @8stormy5
    @8stormy5 2 ปีที่แล้ว +21

    1:29 the problem with that approach is you have very little indication of when your head is actually exposed, meaning what looks like safe cover could really just be painting a target on your head.

  • @andrewknauss6106
    @andrewknauss6106 2 ปีที่แล้ว +54

    What’s even crazier is combining these concepts with client side prediction, server reconciliation, and interpolation to get all the multiplayer clients synced despite latency in communication. When you shoot your opponent, your moves haven’t been sent to the server yet, and you are seeing your opponents moves from 50ms ago (combined pings) but predicted forward to your current time. Your opponent is seeing your location 50ms ago but predicted to his current position. The devs have to decide to prefer to make it so if you hit your opponent’s predicted location OR wait and recreate the past by aligning the clicks from each of your computer to a predicted mutual time called reconciliation. This is why you make it around the corner in your screen, but your opponent shot you on his screen 50ms before you heard the sound and you die despite being behind cover.

    • @filanfyretracker
      @filanfyretracker 2 ปีที่แล้ว +12

      The true endless challenge of online games there. Be it competitive play like arena shooters or upcoming mmo-ish games that want dying to have consequences. Nobody wants to lose due to taking a headshot when on their own screen they were clearly behind chonker of a concrete wall.

    • @TheBanjoShowOfficial
      @TheBanjoShowOfficial 2 ปีที่แล้ว +7

      The innate unfairness of online multiplayer games in a nutshell. Best you can do is to counterattack those latencies with tactics.

    • @syckles
      @syckles 2 ปีที่แล้ว +7

      Thank you for this comment. Ive argued dozens of times bullets magnetize on you at corners, because Ive seen this happen so many times. Its nice to understand the actual reason behind it. As a strategy Ive noticed if I continue to shoot into the corner even after I know the enemy is behind it, the game will often still give me the kill.

  • @budgetcommander4849
    @budgetcommander4849 2 ปีที่แล้ว +42

    2:53 Shoutout to Arma's dynamic crosshairs that don't have this problem.

  • @menmouzumaki7951
    @menmouzumaki7951 2 ปีที่แล้ว +299

    Halo doesn't use the "hitscan to projectile" type.
    Every single gun in Halo is "projectile" but there's a flag called "travels instantaneously" in the engine that just makes the projectile clear a specific distance instantly. Which on paper, feels exactly like hitscan up to a specific point where it you have to lead shots, but in engine, it's not hitscan. The beam rifle, the spartan laser, the sentinel beam, all projectile based with stuff to make it feel like it's not.

    • @garbaj
      @garbaj  2 ปีที่แล้ว +32

      interesting, I didn't know that

    • @menmouzumaki7951
      @menmouzumaki7951 2 ปีที่แล้ว +11

      @@garbaj I didn't know that either I had assumed only Halo 3 had "all projectile" and thought that every other game had hitscan, despite messing with the flag, i never noticed anything, GeneralKidd did a dive on the subject. Halo is a very unique game in how it solves some of those things.
      th-cam.com/video/KrhOucmZyck/w-d-xo.html

    • @Cool20xis
      @Cool20xis 2 ปีที่แล้ว +10

      Makes sense that they use only projectiles as back in Halo 3 theater mode, you could 'pause' the gameplay and find the individual bullets of any gun fired. I imagine pausing and looking at a spartan lazer shot frozen in motion would mean looking at a projectile.

    • @menmouzumaki7951
      @menmouzumaki7951 2 ปีที่แล้ว +3

      @@Cool20xis
      Funny thing you'd mention the spartan laser. Both the laser light and the beam itself are "projectiles" and what you see on screen is just the projectile tracer

    • @eliascregard396
      @eliascregard396 2 ปีที่แล้ว +2

      so its hitscan but with extra steps?

  • @LRM12o8
    @LRM12o8 2 ปีที่แล้ว +12

    Wow, that explains at least a couple frustrating deaths I had when playing shooters with my friends as a kid.
    Like when you got sniped, but the replay shows the (cosmetic) projectile clearly flying past your character.

  • @CptBonex
    @CptBonex 2 ปีที่แล้ว +6

    Another hybrid is to do a series of hitscans. So for each update the bullet will travel to the end of its scan and continue from there. This is how it works in games like battlefield and many other games. Its a pretty simple approach. So a close range shot will be instant since its on the first frame but for longer range it will take a few frames for the bullet to hit. During this they can also apply gravity to the bullets path to change its travel arch.

  • @SpecialAgentCake
    @SpecialAgentCake 2 ปีที่แล้ว +297

    Disclaimer: I am not a game dev! I just love the process and know too much about them.
    Hybrid bullets, to my understanding, work much like how melee weapons work in Valve games. When fired, the game checks if a bullet has hit something with a normal hitscan shot, but instead of doing so at an infinite range it does so to a limited number of units away. Typically, the distance picked is so short that a projectile bullet would likely have covered that distance just as quickly, thus still remaining relatively "fair" (for balance reasons, some guns may have this hitscan distance longer of shorter than others). If it connects with nothing in that range, a projectile is created and the typical projectile math and calculations are done.
    This is useful as hitscan takes significantly less math to create and check for, so close range rapid fire engagements are responsive and accurate even over worse connections or on slower systems. At range, you still can get the benefits of projectiles, as it helps balance the power of something like one hit kill snipers (as mentioned in the video above) as well as forcing rapid fire short range guns to remain in their niche without simply neutering their damage and making them useless in more situations than intended.

    • @CamoflaugeDinosaue
      @CamoflaugeDinosaue 2 ปีที่แล้ว +6

      I wouldn't necessarily say it takes significantly less math. Projectiles are typically just hitscanning from their position each frame - firing a ray that is equal to the distance they are going to travel, if the ray is unobstructed, they will then move to the end position of the ray. The only added calculation in such a case would be changing the transform properties.

    • @SpecialAgentCake
      @SpecialAgentCake 2 ปีที่แล้ว +15

      @@CamoflaugeDinosaue @K I suppose what I meant by significant less is that the hitscan ray only makes one check, whereas a projectile continually makes checks until it is despawned.
      A very simple hitscan ray makes one check when spawned, then despawns once it hits a target, object, etc (where it makes another check to determine damage/decals/etc). A projectile that has to make that check every frame is far more weight on the system, as it is doing math every frame it is in flight.

    • @CamoflaugeDinosaue
      @CamoflaugeDinosaue 2 ปีที่แล้ว +7

      @@SpecialAgentCake yeah it's definitely true that over time it would make more calculations on average. My comment was based on the fact that most game devs would really only care about per-frame calculations.
      It's true something that takes multiple frames to complete has a greater overall footprint, but the only time that would matter would be in events that are rare and very calculation intensive - such that if multiple overlapped they could cause a frame drop. Bullets in a shooter certainly shouldn't fall under this category

    • @euunul
      @euunul 2 ปีที่แล้ว +3

      @@CamoflaugeDinosaue imagine you have 30 players or NPCs and each shot automatic weapons, each shooting 5 bullets/s and bullets travel 3 seconds, that means that at any given time there should be 30x5x3 checks to be made every frame, at least 15 times more than just using just hitscan bullets.
      Besides that projectiles don't do just hitscan between frames, they also simulate physics, update position, spawn and despawn effects.

    • @CamoflaugeDinosaue
      @CamoflaugeDinosaue 2 ปีที่แล้ว +3

      @@euunul this is the maximized usage assumption that, while unrealistic in any practical sense, is nonetheless typically something that you want to consider.
      If there are 30 players, it actually will be quite rare that even 2 of them fire in the same frame. Then there is the question of how long it remains, in most cases a 3 second hangtime will only be on the very very very longest of shots. You'll find that even with a very high amount of units, the amount of projectiles in the scene at any given time usually stays pretty low unless you're doing unorthodox stuff.
      If it's using the physics engine, it doesn't need to update movement, and it only needs the physics engine if it plans on not despawning itself on collision.
      All in all, any shooter should be able to handle a stress test of many many more projectiles than are going to be used in any practical situation. Safe to say, a projectile that is well designed will never be a source of frame drops for you.

  • @NirajArts
    @NirajArts 2 ปีที่แล้ว +166

    The thing you talked about, the realistic shooters like Pubg, actually use both methods together, like the bullet from the camera and the bullet from the barrel. In this method, they fire a ray from the FPS camera, and wherever the ray hits the projectile is emitted from the barrel of the gun towards the ray hit point. They slightly randomize the hit point for bullets to create recoils (Horizontal / Vertical). You don't really need to offset the aim to knock down the enemy. The ray from the camera handles it. It really fixes the head glitching, The bullet won't be able to pass the obstacles.
    I actually tried making games with both techniques.

    • @cynthius6567
      @cynthius6567 2 ปีที่แล้ว +11

      The whole raycasting to compensate for muzzle offset thing has always concerned me as an implementation. Most games that go for muzzle-spawned bullets tend to be heavier on simulation focus, so usually use projectile bullets. Which makes me worried, how does the raycast compensate for leading a target?
      If the wall behind the target is a few hundred meters back, the trajectory would be angled to hit that point in space instead of where you're actually trying to shoot. The ray can't tell what depth you're firing at, or which of the several enemies near your crosshair you're specifically trying to lead, so how could it compensate when it doesn't know your intent?

    • @ryo-kai8587
      @ryo-kai8587 2 ปีที่แล้ว +3

      @@cynthius6567 I think the point is that raycasting is great for NOT leading your target and getting instant feedback. This is why some games use hybrid bullets where they're raycast for a certain distance (instantly), and if it hasn't hit anything it spawns a projectile with velocity/travel time, bullet drop, etc
      This also saves calculations/bandwidth by reducing or removing the need for projectile simulations in close-range encounters.

    • @SemiMono
      @SemiMono 2 ปีที่แล้ว +3

      @@cynthius6567 I agree... which is part of why iron sights/scopes are actually really valuable. If you're shooting at something far enough away that leading and drop are important, you're likely to use the sights, and then the camera is almost directly behind the muzzle and there's no need to cast a ray. Like on a real gun, the player needs to adjust and aim an inch or two above their target.

  • @crayonchomper1180
    @crayonchomper1180 2 ปีที่แล้ว +51

    Escape From Tarkov is a really cool game for a variety of reasons, and their ballistics system is one of them

    • @Alaxel55
      @Alaxel55 2 ปีที่แล้ว +2

      @@FelineRaptor-gv4te man said fun fact like if this was known by at least someone else other than him

    • @FelineRaptor-gv4te
      @FelineRaptor-gv4te 2 ปีที่แล้ว +1

      @@Alaxel55 sorry, imma delete him

  • @woush123
    @woush123 2 ปีที่แล้ว +2

    Started making my own FPS and I'm about a year in at this point. This video highlights some of the things you don't really think about when making your first FPS game.
    It was very eye opening for me when I tried to implement the shooting system. Deciding on using Hit Scan or Projectiles is a very trivial problem. The real problem is deciding to shoot from the camera/eyes or from the barrel of the gun.
    When shooting from the camera/eyes, it's easy to implement aiming and recoil as all bullets go directly towards the center of the screen. Any animations the weapon might have are purely cosmetic. This is why I think most modern games "shoot from the eyes", because it's easy and doesn't take much time to do.
    When shooting from the barrel; however, it becomes much more uncontrollable. The weapon position will dictate where the bullet goes and any slight variation in the position will throw off your aim. Weapon zeroing needs to be accounted for if you want to aim down sights. You have to make sure the animations and recoil effects don't move the weapon off position when shooting.
    Most people think it's cool or unique when a game like Tarkov shoots from the barrel but that requires A LOT more work. So if you're interested in making an FPS game, keep these things in mind.

  • @K.R.O1875
    @K.R.O1875 2 ปีที่แล้ว +45

    Rust uses a hybrid system too, though with how it lags during gunfights, one would think it isn't merely a raycast but the worlds most complicated calculations destined for quantum computers.
    Really well put together video, mate. Explained it well. Not a topic that's new to me. I've made a dozen unreleased FPS games and I think each one used a different approach to how bullets would work.

  • @fuckitimjem
    @fuckitimjem 2 ปีที่แล้ว +14

    Always look forward to these videos. Simple, effective, informative. Keep up the good work!

  • @fidel_soto
    @fidel_soto 2 ปีที่แล้ว +4

    I made an implementation once in a spaceship shooter game where bullets were projectiles but traveled so fast that they could go through objects. To solve this, a ray was casted from the projectile's previous position to the current one, covering all posible cases of impact. It worked flawlessly for that game.

  • @AutarchKade
    @AutarchKade 2 ปีที่แล้ว +2

    There was a texture glitch in Tarkov that let you see inside guns. Players saw that the bullets will physically travel from the magazine to the chamber, and be fired out from there. Something never normally seen but they made it realistic anyways. The game also takes into account muzzle velocity for sighting in scopes and amount of bullet drop, and fires bullets towards where the gun is pointing - even if it's off center - such as when jumping or quickly turning. It's kinda nutty how realistic they made it

  • @DeusAlgor
    @DeusAlgor 2 ปีที่แล้ว +150

    Well, with the "hitscans" you actually also can limit speed of the raycasts to mimic real bullet travel time. You can even made them casted in some sort of curve to add gravity factor. So your bullets will be invisible, but kind of realistic.

    • @R4venshore
      @R4venshore 2 ปีที่แล้ว +3

      I am sorry, but what?? In what world, engine, library or GPU architecture? Can you please give a concrete example of where you can do this? Genuinely interested.

    • @DeusAlgor
      @DeusAlgor 2 ปีที่แล้ว +4

      @@R4venshore most of hitscans are using raycast (we will not talk about pixel color under the crosshair checks here).
      I'm not sure how many engines use this type of rays, but ones I worked with are using Vector coordinate which determines where ray will end. OF course you can dynamically redefine this coordinate to make ray longer over time. Let's imagine simple 2d ray on XY coordinates where -Y will be UP. Casting ray from (0,0) to (.1,0). We will have straight line. Then increase X coordinate by .1 each frame (yes it will be FPS dependent and this is bad, but we are talking about simple example). Now our bullet moves forward in a straight line. If we add Y coordinate to our calculations and add (.1, .01) each frame - bullet will start falling DOWN as well. Ray itself will be straight of course, but bullet's path will become an curve. But there will be a chance that something intersect that ray between cast point and our end point, which is good for beams but bad for bullets. That's why you don't change the end coordinate, you just rewrite raycast global position each frame. It will travel just like a bullet. So you will have basically collision based shooting, but without collider. Will save up some frames if you have thousands of projectiles flying and you still want them to have some physics.
      Of course if you want simple hitscan without travel time or gravity - just determine maximum shooting range and cast your ray there as soon as shot was fired.
      If you really need the thing I described here - another topic. But it is existent option =)

    • @R4venshore
      @R4venshore 2 ปีที่แล้ว +4

      @@DeusAlgor I understand the math on how to make the calculation for a trajectory. All I am saying is that I have never see this being and option with rays anywhere. Ray casts ( from what I've seen ) , as a ready tool provided by game dev engines are the same - it's an infinity vector that has origin and direction and the whole travel happens within a single frame / tick. If there is anything else, it might be a custom tool/library for a private engine I've never seen, like Frostbite or something like that.

    • @DeusAlgor
      @DeusAlgor 2 ปีที่แล้ว +1

      @@R4venshore limited range rays are a thing in a Godot and yes, in a private engine I had access to, also I'm pretty sure that Dagor engine (WarThunder) used something similar before (this or they've used material dot collider). And you can limit distance for the rays in the Unity. Not sure about UE.

    • @R4venshore
      @R4venshore 2 ปีที่แล้ว +1

      @@DeusAlgor Yes, that's the only thing you can do in Unity, there is no other instrument for trajectory or bending or slowing them / over time processing, they are all instant.

  • @certified9104
    @certified9104 2 ปีที่แล้ว +8

    I've noticed this myself, and I thought I was the only one.

  • @waylonk2453
    @waylonk2453 2 ปีที่แล้ว

    Great video! I learned a lot. The included gameplay footage was helpful too.

  • @brettmoore6781
    @brettmoore6781 2 ปีที่แล้ว

    its rare that I come across something interesting that I never knew existed and it's presented in such an engaging and concise format. Thanks for an excellent vid!

  • @acceptablecasualty5319
    @acceptablecasualty5319 2 ปีที่แล้ว +8

    There's some really impressive projectile physics in Arma 3, you can even have the path and relative energy of every shot displayed via console.

  • @HiiroRocker101
    @HiiroRocker101 2 ปีที่แล้ว +15

    It's not an FPS, but in Remnant: From the Ashes, there's actually an indicator that appears when you aim that tells you your gun is pointed at an obstruction. Pretty neat way to do barrel-spawned bullets in a TPS and actually have it work as expected without punishment.

    • @lemons1559
      @lemons1559 2 ปีที่แล้ว

      If I remember correctly Rising Storm: Vietnam and Arma 3 have similar indicators.

    • @dangluan92
      @dangluan92 ปีที่แล้ว

      ​@@lemons1559 also in Metal Gear Solid Ground Zeroes and 5

  • @andycopeland7051
    @andycopeland7051 2 ปีที่แล้ว +2

    Never knew that I wanted to know. You packed a lot into four minutes. Subscribing and diving into your vids

  • @kalm_tree
    @kalm_tree 2 ปีที่แล้ว

    This video is entertaining, concise, cleanly and eloquently presented, and incredibly interesting. There's also enough going on visually to keep my attention without distracting from the content. Great video!

  • @chrisholladay
    @chrisholladay 2 ปีที่แล้ว +10

    Some games use a projectile which casts a line forward, and if a target is in the line, acts as a hitscan. If no target is present, it will 'jump' forward after some time to act as a high-speed projectile. This solution is ideal for games where physics is unreliable or otherwise too costly while allowing for fair, non-client sided bullet travel.

  • @Langodan
    @Langodan 2 ปีที่แล้ว +3

    Soldier's Rocket Launcher being from the barrel like that actually allows you to peek, and if you have flipped/left handed viewmodels the rockets actually fire from the left, giving you different places from which you can peek.

  • @HonJazzz
    @HonJazzz 2 ปีที่แล้ว +2

    This was really interesting! Thanks for sharing

  • @patrickg5648
    @patrickg5648 2 ปีที่แล้ว

    At first I thought your delivery was boring but your voice puts me into a trance. Great vid

  • @absolutestrange
    @absolutestrange 2 ปีที่แล้ว +67

    Wow, I didn't know pubg's bullets were shot from the barrels of the gun lol

    • @piyh3962
      @piyh3962 2 ปีที่แล้ว +16

      Super frustrating when you have a shot lined up and you hit the window bars. I want to punch the person that made those exactly barrel height.

    • @garbaj
      @garbaj  2 ปีที่แล้ว +7

      I didn't either until very recently

    • @karesz23
      @karesz23 2 ปีที่แล้ว +1

      @Can't Remember while projectile from barrel is factually right, projectile form the camera feels better and realer

    • @absolutestrange
      @absolutestrange 2 ปีที่แล้ว

      @Can't Remember Wow, I didn't know that too lol

    • @absolutestrange
      @absolutestrange 2 ปีที่แล้ว

      @@garbaj Oh Glad I am not the only one lol

  • @qcfp
    @qcfp 2 ปีที่แล้ว +5

    In Hunt: Showdown (a great game I recommend everyone to check out) all bullets behave like projectiles, with each weapon having a different muzzle velocity. In simple terms: some bullets travel faster or slower depending on the weapon you use, and you have to take that into account when leading your shot (it's actually displayed as a stat for each weapon).
    However, there is no bullet drop, they just travel in a straight line. I believe they are shot from the player's eyes, but I'm not 100% sure.
    Also, bullets have a fixed distance: until recently, bullets travelled up to 300 meters. After that, the game stopped tracking them and they simply disappeared. They recently changed it: long ammo travels up to 500m and medium ammo up to 350m, mostly due to the addition of a new map that facilitates longer range fights.
    That mechanic might sound lame, but shooting at distances where bullets might end up disappearing rarely (if ever) happens, so it's nothing to worry about in normal gameplay.

    • @mormonboy25
      @mormonboy25 2 ปีที่แล้ว

      The bullets might come out of the camera but the camera is not located in the head in hunt showdown. There are some walls around a graveyard near Blanchett graves that when you crouch behind them you can’t see but almost your entire head appears over the top of the wall. That seems to indicate the camera is somewhere below the head, maybe bottom of the neck or shoulder level possibly as a measure against head glitching

  • @I_am_a_human_not_a_commodity
    @I_am_a_human_not_a_commodity 2 ปีที่แล้ว

    This is a great breakdown. Nice work :D

  • @frenchguyst-croissant3432
    @frenchguyst-croissant3432 2 ปีที่แล้ว

    First video on that subject..that made me learn something..great video!

  • @mineland8220
    @mineland8220 2 ปีที่แล้ว +7

    The minigun from the Heavy is a really messed up view when he is crouching and shooting behind cover.
    Also, soldiers rockets can pass through a 1x1 hmu gap if perfectly straight. Less than 10cm i believe. Wild

    • @Darthybuddy
      @Darthybuddy 2 ปีที่แล้ว

      Mini guns in GTA have the same issue. They can visually shoot straight through cars because the actual billets are hitscan from your face. But visually, the mini gun on your hip is ripping through the waist high cover in front of you.

  • @nocturnaltom754
    @nocturnaltom754 2 ปีที่แล้ว +12

    I'd imagine a hybrid bullet just tries to hitscan but if there are no collisions it fires a projectile. An efficient way to give the illusion of all bullets being projectiles.

  • @pauliusgecas472
    @pauliusgecas472 2 ปีที่แล้ว

    whoa, that was surprisingly interesting and very informative. good job!

  • @quoabell
    @quoabell 2 ปีที่แล้ว

    very insightful. thx for the video.
    what i also find very interesting is, how the heatscan information of the bullet and the hitbox of the enemy are sent and evaluated at server-side and how that is interpolated and a heuristic is built including ping, etc.

  • @KentuckyFriedChildren
    @KentuckyFriedChildren 2 ปีที่แล้ว +6

    I’m imagining a system where the game uses Gun Bullets but switches to Head Bullets for weird scenarios.
    Imagine a scenario where the player is trying to shoot around an obstacle but the crosshair and Gun Bullet Path don’t line up, Making the gun bullet hit the obstacle.
    If the obstacle doesn’t extend past the crosshair on the horizontal axis, (The crosshair points at something to the side of the corner) we know the crosshair is being misleading and so we fire a bullet from the head.
    However, If the obstacle doesn’t extend past the crosshairs on the VERTICAL axis (The player is showing only their heads and nothing else) We Only switch to Head bullets if the Gun Bullets path is within a certain distance to the edge of the obstacle.
    This lets players shoot guns over ledges that appear high enough to shoot over but aren’t because of the height difference between the camera and gun muzzle, But stop bullets in scenarios where the player is obviously Head Glitching.

  • @leukk_
    @leukk_ 2 ปีที่แล้ว +21

    fast moving "projectiles" in fps games most of the time really are just a series of hitscans that are lag compensated with interpolation between ticks - i suppose this is also how insurgency works with it's hybrid system - the first tick when a gun shoots simply happens instantly without any interpolation which results in an instant hit within a certain range, afterwards the projectile is simulated normally

    • @Noubers
      @Noubers 2 ปีที่แล้ว +2

      This is how it works in Arma for bullet-type projectiles. Though that game has multiple projectile types in the simulation.

    • @flexo3333
      @flexo3333 2 ปีที่แล้ว

      hitscan and projectile aren't mutually exclusive or oppsites. you can "hitscan" before a projectile-hit is confirmed to client/player.
      and you can have "projectiles" without travel time.

  • @reallifeshenanigans8471
    @reallifeshenanigans8471 2 ปีที่แล้ว

    This video is brilliant I already knew most of this going into this but I like the detail put in to it

  • @jkeuwk
    @jkeuwk 2 ปีที่แล้ว

    That was way more interesting than I thought it would be. Thanks!

  • @rominkivela9351
    @rominkivela9351 2 ปีที่แล้ว +5

    a good example of hybrid bullet use is Rising Storm 2: Vietnam. I'm not sure on the range at which it swaps between but it really allows for fast cqc and slower and methodical sniping

  • @MetalX34
    @MetalX34 2 ปีที่แล้ว +8

    secretely switching from "skull gun" to realistic projectile spawnpoint is the kind of terrible joke i would like developers to do.

    • @Schregger
      @Schregger 2 ปีที่แล้ว +1

      Gunther wouldnt like it either, he wants his skul-gun to work as intended... and his lemon-lime soda to not be orange...

  • @swiftbull_
    @swiftbull_ 2 ปีที่แล้ว

    I love videos about things like this, so specific, but they can be very useful

  • @AkioKaneko
    @AkioKaneko 2 ปีที่แล้ว

    You, good sir, are helping me save my time and effort in trying to learn tricks for developing an fps game

  • @Jazzy-kz6wd
    @Jazzy-kz6wd 2 ปีที่แล้ว +5

    Keep in mind, in TF2 the bullets actually come from behind most classes (they have an offset to come out in the area the barrel will be but they are offset behind the player's head to avoid the issue of getting too close.

    • @MGSLurmey
      @MGSLurmey 2 ปีที่แล้ว

      Does that mean if you back up against a wall your bullets will hit the wall?

    • @Jazzy-kz6wd
      @Jazzy-kz6wd 2 ปีที่แล้ว

      @@MGSLurmey i'm pretty sure that case is taken care of cause i've never seen it happen in game

  • @zetazane
    @zetazane 2 ปีที่แล้ว +3

    my favorite part about soldiers rocket launcher is since valve actually did the correct thing and made the rockets direction change depending on what your crosshair is on, it made people think it's "aim-assist"

    • @lemons1559
      @lemons1559 2 ปีที่แล้ว

      I remember the complaining on that video's comment section about how Soldier has built in cheats.

  • @poletooke4691
    @poletooke4691 2 ปีที่แล้ว

    Cool info and well explained. Thanks man.

  • @p0zy_uwu
    @p0zy_uwu 2 ปีที่แล้ว

    i love how you go straight to the point and not making forced 10 minutes videos wich doesnt make sense, i love it the way you also just explain things! Keep it on!

  • @gimmethegepgun
    @gimmethegepgun 2 ปีที่แล้ว +14

    There's also a more minor, but still extant, issue when aiming down sights, particularly with optics. Do you spawn the bullet where the crosshair in the sight is or do you spawn it from the barrel of the gun, which is often several inches lower and several feet farther forward than the sight?

    • @SteveIsHavingMC
      @SteveIsHavingMC 2 ปีที่แล้ว +1

      most games just caryr over what they normally use. so for arma 3, insurgency, etc the bullet exits from the barrel. for csgo, it exits the crosshair. however i remember playing a game where using iron sights of a rifle meant that you'd shoot with no bullet drop (not hitscan mind you) but with a scope there was drop just like normal. weird mechanic.

    • @rarelycold6618
      @rarelycold6618 2 ปีที่แล้ว

      Only an issue if you make the bullet fly in a straight path, unlike what they do in real life. Optics are set for a specific distance, you can aim above or under your target to adjust for distance (yes, some optics are adjustable easily, just not in the time frame of fps gun battles)

    • @TheBanjoShowOfficial
      @TheBanjoShowOfficial 2 ปีที่แล้ว

      Far easier to simply shoot the bullet from the point of the reticle. It would be extremely frustrating otherwise. “Easy” solution to this in my opinion is to not allow bullets to land where the reticle is if the end of the barrel is obstructed. If the barrel is clear, then fire the projectile where the cross hair is located. Pubg does this partially like explained in the video. But pubg is a clunky disaster of a game.

    • @SteveIsHavingMC
      @SteveIsHavingMC 2 ปีที่แล้ว

      @@TheBanjoShowOfficial it would be frustrating if you're incapable of figuring out that your bullet exits the barrel and not the optic. but it comes down to what type of game youre playing. more arcadey games like CoD, r6s, csgo and bf4 use reticle aiming, while more realistic shooters like arma 3, squad, insurgency and eft use height over bore aiming where the bullet exits the barrel.

  • @vagabond479
    @vagabond479 2 ปีที่แล้ว +24

    I'm a former dev on Insurgency Sandstorm actually. What would you like to know about the hybrid bullet system?

    • @ludicrouS_406
      @ludicrouS_406 2 ปีที่แล้ว +3

      I would like to know how it behaves

    • @nooanieminen1100
      @nooanieminen1100 2 ปีที่แล้ว +3

      hey i got a question. in insurgency: sandstorm, the bullets come out of the barrel, right? so how do they travel straight if they must go towards the center of your screen from the side of the screen? wouldnt hip firing mean that at some point, the bullet goes beyond the center of the screen, to the left side of the screen? sorry if my question is unclear, it something ive always thought of and i hoped this video would cover it.

    • @vagabond479
      @vagabond479 2 ปีที่แล้ว +9

      @@ludicrouS_406
      Basically, what would be the first 0.1 seconds of bullet travel time is "Pre-sim" and that acts as the hitscan portion of the hybrid (which does factor in things such as gravity, but that very rarely comes into play).
      If it doesn't hit anything during that pre-sim, it goes into full simulation at that point.

    • @vagabond479
      @vagabond479 2 ปีที่แล้ว +5

      @@nooanieminen1100 Sort of.
      Bullets come out the barrel when you are not aiming down sights. But when you go into ADS, then thats when the bullets come out the eyes.

    • @nooanieminen1100
      @nooanieminen1100 2 ปีที่แล้ว +1

      @@vagabond479 so what youre saying is that when you fire from the hip, bullets will go toward the left side of the screen, rather than somehow going straight to the center? this has been hurting my brain for a while so ty

  • @Gensokian
    @Gensokian ปีที่แล้ว +2

    Heya! Just wanted to add my coin to the Hybrit thing;
    Basically on the fire() event, a hitscan ray is shot, which has a length of X. X beeing the distance on how far you want the hitscan bullet to fly be
    If this trace now hits something, just apply damage and do whatever you do with it afterwards.
    If the trace misses i.e hits nothing, spawn a projectile and let it fly down range where it eventually collides with something, or despawns after a certain ammount of time.
    Due to the fact of the hitscan beeing instantanious it can be handled within one frame if a projectile needs to be spawned, or not

  • @PhillipsAlbright
    @PhillipsAlbright 2 ปีที่แล้ว

    honestly a pretty useful video for me, as I am making an fps game. Many different methods and outcomes covered in a short time. Great video.

  • @Corentinbes
    @Corentinbes 2 ปีที่แล้ว +27

    Doesn't lowering the camera sounds like a pretty bad idea? If the camera is lower than the head, you could be headshot even if from your perspective you are crouching behind cover.

    • @ccg_jsefj4256
      @ccg_jsefj4256 2 ปีที่แล้ว +1

      Well as said in the video, lowering the camera prevents cheating so its more fair like this. If the camera was on the head you could shoot behind cover very easily but the enemy would have a hard time hitting you

    • @alankertz5951
      @alankertz5951 2 ปีที่แล้ว

      Battlefield avoids this by having the bullet spawn from the weapon height, but centered on the camera. You avoid the wall weirdness like PUBG but prevent head glitching. Since Battlefield is using physical projectiles as well, the guns are zeroed at a distance where the bullet rises up to the crosshair height and then drops ballistically. For sniper rifles you can actually change that distance.

    • @Corentinbes
      @Corentinbes 2 ปีที่แล้ว

      @@ccg_jsefj4256 if an enemy peaks from behind cover he still has to expose his head, and how much of it is exposed depends on map design. It's entirely up to the devs how much impact they want the cover to have.

  • @DanaTheLateBloomingFruitLoop
    @DanaTheLateBloomingFruitLoop 2 ปีที่แล้ว +28

    I like the more realistic way of having the bullets coming out of the actual gun. What I don't like is the mismatch between what the crosshair says and what actually happens. Some sort of easy to glance at indicator of how you deviate would be nice. From looking at the comments it seems that there are games that do this right, but I haven't played any of them.

    • @lillian7233
      @lillian7233 2 ปีที่แล้ว

      Ultimately, the choice between face-bullets and gun-bullets is whether you want them to look correct to the shooter or someone watching them. In this way, I'd argue face-bullets are always the better choice in single player games (unless the game is specifically meant to provide a hyper-realistic experience rather than a regular FPS) since you out care about what the shooter sees. It's very difficult to prioritize what a shooter sees in a multiplayer game, though. Either the camera is at gun level, making everything look too tall, the bullets appear to clip through objects from someone's perspective, or bullets hit things that they look like they shouldn't. Methods that avoid all 3 involve doing weird stuff with your reticle or making complex calculations to guarantee all players' guns are always in a position that they could feasibly shoot the thing in the reticle. The first one feels gross to play with if it's a game with a lot of cover or is slower-paced. The second can use a lot of processing power for servers to track and report back to every player, and it's likely to do some really janky stuff in certain edge cases.
      The only real upside is that in games that are fast-paced and have limited cover, the way you handle the projectiles matters a lot less since people won't often come into contact with the situations that cause trouble or notice it when they do

    • @risingSisyphus
      @risingSisyphus 2 ปีที่แล้ว +3

      The easiest way to sidestep the crosshair issue is to not have a crosshair. Squad does this pretty well.

    • @giahuynguyenkim6389
      @giahuynguyenkim6389 2 ปีที่แล้ว +1

      @@risingSisyphus To avoid a problem, avoid the things that create that problem - me

    • @andersonklein3587
      @andersonklein3587 2 ปีที่แล้ว +2

      @@risingSisyphus THIS. Having no "virtual" interface and having in-game items communicate health, map, aim, is so immersive...

    • @Wylie288
      @Wylie288 2 ปีที่แล้ว +1

      Gameplay over realism. you are holding a mouse. There are zero benefits to having them come out of the gun. Only detriments.

  • @boltstudios4690
    @boltstudios4690 2 ปีที่แล้ว

    I ejniyed this video, very much. Thank you it was very insightful and it was a pleasure knowiiung you existed :).

  • @ditmarvanbelle1061
    @ditmarvanbelle1061 2 ปีที่แล้ว

    That was a lot more interesting than it had any right to be :-) Thanks man!

  • @stanbartsch1984
    @stanbartsch1984 2 ปีที่แล้ว +3

    America's Army uses the "shoot from eyes" method, which is very upsetting to players who don't see a gun but get shot anyway. Another problem is that the eyes are located about 2 inches below the top of the character's head - which leads to the player thinking he has total cover while an enemy sees 2 pixels sticking above the wall he's behind.

    • @FelineRaptor-gv4te
      @FelineRaptor-gv4te 2 ปีที่แล้ว

      *he/she

    • @FelineRaptor-gv4te
      @FelineRaptor-gv4te 2 ปีที่แล้ว

      Does the game spawn bullets from between the eyes? Or from the barrel of the gun?

  • @Chevifier
    @Chevifier 2 ปีที่แล้ว +8

    Having the gun aim upwards always have a good feedback to the player. Its both immersion and Attention to detail. Every fps game should have that as standard imo

    • @Chevifier
      @Chevifier 2 ปีที่แล้ว

      I dont remember which game does it but when your weapon model is blocked your reticle is greyed out.

    • @dndoodles2291
      @dndoodles2291 2 ปีที่แล้ว

      @@Chevifier I know that fortnite does it I’m pretty sure

    • @NotVeryImportantPerson
      @NotVeryImportantPerson 2 ปีที่แล้ว

      at least let the character cut their nails, like those are some serious bulldozer buckets.

  • @MV_96
    @MV_96 2 ปีที่แล้ว

    Greatly explained, good job!

  • @tuttifruti8
    @tuttifruti8 2 ปีที่แล้ว

    Never thought about how difficult it is to create a game, but by showing a small piece of the picture I now realize how broad the greater picture must be. Great content subbed! :D

  • @pafnutiytheartist
    @pafnutiytheartist 2 ปีที่แล้ว +4

    One possible implementation of hybrid hitscan:
    On the frame the gun is shot the bullet hitscans for 100 meters.
    If no hit, on the next frame the bullet hitscans for the next 100 meters (remembering it's position and direction like a projectile).
    And so on until the bullet hits something. It works like hitscan for short distances and like a very fast projectile for long ones.

    • @Visstnok
      @Visstnok 2 ปีที่แล้ว +1

      That's pretty much what is meant by projectile-based already, just with more fidelity.

  • @codybeach2258
    @codybeach2258 2 ปีที่แล้ว +9

    You didn't answer my biggest question though! If you have bullets moving too fast things can get a little buggy sometimes. Which is one of the reasons we use hit scan right? But what about bullet drop in say APEX? How does a hit scan weapon account for that? And if it's not a hit scan weapon, how do they get projectiles to travel that fast? Is this the fabled hybrid you spoke of?

    • @-akrotag8436
      @-akrotag8436 2 ปีที่แล้ว +1

      Apex legends doesn't use hitscan weapons, so that's why there's bullet drop. From what I know it isn't possible to have bullet drop on a hitscan bullet

    • @nocturnaltom754
      @nocturnaltom754 2 ปีที่แล้ว +4

      If fast moving bullets are buggy then I'd imagine the bullet would use ray casts, but it would do one each frame, starting from the end of the last ray cast but each time the angle is lower giving it that bullet drop curve effect.

    • @asylum4298
      @asylum4298 2 ปีที่แล้ว +1

      I program the bullets with raycast, for example if the bullet has a speed of 600 meters per second, I apply a raycast distance of at least 15 meters, I have not had any problems to date, and thus I place the bullets that come out from the tip of the gun barrel, if you want to increase the speed of the bullet for example to 1200 meters per second, then double the distance of the raycast to 30 meters

    • @anicepineapple9067
      @anicepineapple9067 2 ปีที่แล้ว +5

      It’s important to note that just cause a bullet is “projectile” doesn’t mean it uses physics, just that it moves over time. In many games they essentially use a ray cast that curves down, and then the bullet moves along that path.

    • @asylum4298
      @asylum4298 2 ปีที่แล้ว

      To simulate the physical bullet or the body of the bullet, place 2 planes with a scale the size of the distance of the raycast towards the axis where the raycast hits, and scale the other axes, place a material with a muzzle flash texture shaped round

  • @Girrrrrrrr
    @Girrrrrrrr 2 ปีที่แล้ว

    This was awesome, thanks!!!

  • @dvst_tv
    @dvst_tv 2 ปีที่แล้ว

    This video felt like an introduction to a longer video. Was surprised when it ended

  • @loco-choco
    @loco-choco 2 ปีที่แล้ว +6

    Cool! I never knew they were called hybrid bullets! In tabz when a projectile spawns it does a raycast when it is born, if it hits something it calls the hit event, if not it continues as a rigidbody for that frame, and continues to do both actions untill it hits someting or its timer runs out (so that they don't have infinite range or something).

  • @badideagenerator2315
    @badideagenerator2315 2 ปีที่แล้ว +6

    During overwatch's development, the character that would go on to be tracer had laser eyes. Its funny to think that because she fires hitscan rays from the centre of the players' camera she technically still does.

  • @DJL3G3ND
    @DJL3G3ND 2 ปีที่แล้ว +1

    oh wow recently Ive been confused with my own game project with where to spawn the bullet traces, for now Im just spawning it at the head but when I come to add visual effects I can definitely remember the thing you showed with overwatch, thanks lol

  • @mattkidroske
    @mattkidroske 2 ปีที่แล้ว

    This was a very interesting and informative video! Thank you 😊

  • @titaniumwo1f390
    @titaniumwo1f390 2 ปีที่แล้ว +3

    IIRC, Battlefield 4 used to had "head glitch", but DICE fixed it by keeps the camera position to character's head or eyes, but lower the spawn point of bullet (I can't remember the exact position but it should be around 2 to 3 inches from the center of camera), and zeroed all guns to 100 meters (at least for sniper rifle, but I'm quite sure all guns are zeroed to 100 meters) to reduce the impact of change that DICE did. IMO, it is the best way to fix head glitch as it actually resemble how to shoot a gun in real life, as you put target on sight but you have to make sure your gun's muzzle is clear from any obstruction.

  • @henke37
    @henke37 2 ปีที่แล้ว +3

    Fun fact: several weapons in TF2 have aimbots to compensate for the projectile originating from the weapon.

  • @reanetsemoleleki8219
    @reanetsemoleleki8219 2 ปีที่แล้ว +1

    Nothing more intimidating than an enemy screaming bullets.

  • @alexdivision4320
    @alexdivision4320 2 ปีที่แล้ว +2

    Shounic has a very good couple of videos taking about the very technical details behind projectiles and hitscan weapons in TF2 and even how hitboxes interact with various weapon types

  • @JRTIntervencion
    @JRTIntervencion 2 ปีที่แล้ว

    Very interesting! Thanks for the video

  • @funfromabove9728
    @funfromabove9728 2 ปีที่แล้ว

    Although I knew all the information already I would like to compliment you on your delivery. The video was well done, well researched and has good examples.
    I'd like to add my personal experience with hitscan/projectile hybrid bullets: It has felt like an invisible game mechanic as well as highly confusing in insurgency sandstorm. At times you could be landing your shots and at others it would be landing low or behind your target. I didn't know sandstorm implemented this kind of mechanic and after getting frustrated I googled it. After a while of playing you can kinda figure out the distance where you'll need to lead your target.

  • @Woud_
    @Woud_ 2 ปีที่แล้ว

    Never really thought about it, but it makes so much sense!

  • @8o8inSquares
    @8o8inSquares 2 ปีที่แล้ว

    Very interesting, thanks for that!

  • @jackwithahat8601
    @jackwithahat8601 2 ปีที่แล้ว

    Very cool and informative!

  • @wonkyjon
    @wonkyjon 2 ปีที่แล้ว

    Information I didn't know I needed! Never thought about it before but now I know a bit, I wanna know more!

  • @darwangpie-whatlieshionsha4168
    @darwangpie-whatlieshionsha4168 2 ปีที่แล้ว

    Enjoyed, thanks for the video

  • @aramthemyth
    @aramthemyth 2 ปีที่แล้ว

    very nice video, short and informative

  • @MrSuperdude6
    @MrSuperdude6 2 ปีที่แล้ว

    I really wish I had seen this video when I was working on an FPS game with my friends. I spent days trying to figure out how to best handle all the projectile issues you mentioned

  • @GTFour
    @GTFour 2 ปีที่แล้ว

    This felt like a good introduction for what could become a longer more detailed part 2 about bullet client server reg in multiplayer like CSGO etc

  • @tcaprojects4767
    @tcaprojects4767 2 ปีที่แล้ว

    It's always interesting learning about mechanics of games

  • @Stratelier
    @Stratelier ปีที่แล้ว +1

    Not just FPS games but potentially any game depending on the design. For example, the 1990s RTS "Warzone 2100" originally used an RPG-like approach where each projectile fired was assigned (1a) its intended target object, (1b) the physical location of said target, and (2) a "hit" or "miss" status (based on a % accuracy stat), then it was animated flying from its firing point toward that location. Upon arrival it exploded and, if a "hit", inflicted damage on the target _regardless of_ whether or not it visually collided with the target's model. Which was fast and efficient for RTS purposes but also resulted in odd visual cases where fast-moving targets (like aircraft) would take damage from attacks whose firing trajectory had little to no chance of _actually_ striking them at speed. (Weapons did not "lead" their targets when aiming -- again, cheap and efficient for RTS purposes but creates odd edge cases of the visuals not matching the functional effect)

  • @PaulDozierZZoMBiE13
    @PaulDozierZZoMBiE13 2 ปีที่แล้ว

    This was interesting. Cheers!

  • @freaki0734
    @freaki0734 2 ปีที่แล้ว +1

    I like how in Paladins hitscans and projectiles of all speeds and sizes coexist in some way with things like headshot mostly unique to hitscans but also measures such as damage dropoff mostly only existing for hitscan being employed in an attempt to balance that

  • @Magus_Union
    @Magus_Union 2 ปีที่แล้ว

    Really like to see your take on the Tribes series of games. I do wonder how different some of the factors for those games were when it came calculating projectile speed at absurd player velocities and what (if any) extra demand on said engines came in result of simulating said high speed engagements.

  • @NATOnova
    @NATOnova 2 ปีที่แล้ว

    Thorough but brief explanation is appreciated

  • @Justin14379
    @Justin14379 2 ปีที่แล้ว

    This deserves a sub my friend.

  • @marvelousstanley1239
    @marvelousstanley1239 2 ปีที่แล้ว

    Awesome info I wish I knew long ago!

  • @soundaddiktion2006
    @soundaddiktion2006 2 ปีที่แล้ว

    Lol the end of your vid made me like, DAMN I WANNA PLAY THAT MAP ON HALO AGAIN xD Frickin memories from 12-15 years ago

  • @TheJan
    @TheJan 2 ปีที่แล้ว

    Amazing vid! Didnt actually know this lol maining fos games since ever heh