7 ms·
Bunnyhopping from the Programmer's Perspective (2015)
- a-nikolaev 5y agoThe described way of increasing maximum velocity does not look realistic, it is not based in any kind of physics or bio-mechanics. So, is it a suggestion to implement a broken game mechanic.. so that experienced players can transfer their skill to other FPS games? Nice..
- Ennea 5y agoIf memory serves me right, this mechanic was in fact initially unintentional. It turned out to be pretty fun, however, and raised the skill ceiling of the game quite a bit. As such, implementing it yourself really doesn't seem like such a bad idea ;)
- delusional 5y ago> broken game mechanic Who said games have to be realistic? is it a "broken game mechanic" that you can take a shot to the heart and continue living in counter strike? There's a place for realism in video games, but there's a place where you have to let go of it as well.
- oblak 5y agoWell, lots of people have said that. Used to hear that kind of argument all the time back in the day. But I've heard even crazier things. I remember a friend's older brother complaining about tournaments NOT forcing everyone to use the same gear and same CFG files. This ~21 years ago. Still have no idea what was this guy's thought process. I guess it was just a non-gamer's expert opinion on gaming. Dan you imagine not being able to bind keys and/or adjust mouse speed because it's not realistic and unfair?
- retsibsi 5y ago> so that experienced players can transfer their skill Sure that's part of the motivation, but more importantly it's a fun, satisfying mechanic that adds a great deal of skill-based dynamism to these games.
- IQunder130 5y agoGetting to play again after being shot in the face is not realistic either, yet pretty much all FPS games implement this feature. I wonder why?
- toast0 5y agoEver play Rainbow 6 games? That's why most games don't have realistic damage.
- dgb23 5y agoThere are tons of mechanics that don’t make sense from a simulation perspective but are fun and add mechanical depth to a game. A very common one is the ability to carry multiple rifles in-combat. But generally the movement in-combat is accelerated and allows for higher control, while the penalty of getting hit is much lower.
- smoldesu 5y agoA game mechanic is only broken if it isn't fun. Otherwise, the issue is with the player.
- sdwr 5y agoI don't understand the second diagram. Is it supposed to be a top down view of the game? There's a line labeled "view direction" that's perpendicular to the desired direction of travel, and the velocity arrow is going in a totally different direction.
- egwor 5y agoIf you strafe, you move perpendicular to view direction. If you combine strafe and jumps (the idea is this: jump, change view direction to perpendicular to jump direction and then strafe => jump+strafe => you'd move faster in the original direction).
- retsibsi 5y agoI admit I'm still getting my head around the diagram, but it is top-down and I'm pretty sure the 'wish direction' is perpendicular to the 'view direction' because the player is holding down the strafe-left key.
- sinstein 5y agoI thought this article was going to be about how to "bunnyhop" in your programming job. Some tips/tricks that you can leverage to give you the same advantage in your job as bunnyhop does in-game.
- aldanor 5y agoSame.
- deleted 5y ago[deleted]
- wormslayer666 5y agoAlways nice to see implementation-focused explanations of things that are usually taught/learned by building intuition. This[1] video does an excellent job of explaining the mechanic with visuals and code snippets. Carmack's public post[2] on the "bug" of strafe-jumping is endearing in light of how much it influenced game design in the following decades. [1] https://www.youtube.com/watch?v=rTsXO6Zicls https://www.youtube.com/watch?v=rTsXO6Zicls [2] https://www.gamers.org/pub/archives/plans/johnc@idsoftware.com/1999-04-24_1999-06-05 https://www.gamers.org/pub/archives/plans/johnc@idsoftware.c...
- hnwd 5y agoFor those interested the link below does a great job of demonstrating strafe jumping, which is similar to bunnyhopping. https://www.youtube.com/watch?v=sXat1AEtuT8 https://www.youtube.com/watch?v=sXat1AEtuT8 This is great example of how an accident can contribute towards such a fun mechanic into a game. This ultimately ended up spawning new game types where a mastery of movement was a key skill.
- mensetmanusman 5y agoI spent hundreds of hours over a decade ago playing jump challenges in Q2 mods that were just there to hone movement skills and help experts keep an eye out for errant pixels in the map that could be used to help you get to amazing places on the maps. Jumps like these on action quake: https://youtu.be/8Za4g8mKBcA https://youtu.be/8Za4g8mKBcA Took dozens of hours of practice to accomplish without taking fall damage (which was crippling in this mod).
- IQunder130 5y agoThe thing I don't understand is why you would limit velocity in such a strange way to begin with.
- enriquto 5y agoaccelerations map directly to actions of the user (forces). It seems fairly natural, not strange, to control velocities and positions in terms of accelerations. The same thing happens in real life.
- IQunder130 5y agoThat's not the strange thing. The strange thing is limiting it on a projection rather than the magnitude of the velocity vector.
- wizzwizz4 5y agoIf you're already calculating the projection, it's cheaper.
- enriquto 5y agoapplying a force perpendicular to the velocity does not change the speed, only the direction. Only the component of the force tangent to the velocity vector (the projection) is relevant for controlling the max speed
- IQunder130 5y agoThey're not measuring the projection of the acceleration vector on the velocity vector, they're measuring the projection of the velocity vector on the acceleration vector and limiting that. Which makes no sense for a speed limiting method as evidenced by the fact that strafejumping exists. What you said is true and also irrelevant. To get a true speed limit you would compute the new velocity vector, compute its magnitude and rescale the components by the ratio under the limit. Which is slightly more computationally expensive I suppose.
- 5y ago
- b0rsuk 5y agoI'm happy that bunnyhopping has died and doesn't show up in games anymore. You can bunnyhop in Dusk, but it's a single-player game and it's perfectly playable without it.
- ezekg 5y agoBunny hopping is still alive and well in games like Titanfall and Apex, though the mechanics are a bit different. Those engines are built on the Source engine, so likely use a modified version of the OG movement code. Similar movement glitches are also alive in games like Warzone, with slide canceling.
- gverrilla 5y agoBunnyhopping has spawned different game modes in counter-strike aswell, separate from competitive play, including mainly kreedz's kz [0] and bhop[1], which are really really very hard by themselves and a lot of fun. I really like bhop in particular because there's a meditative thing to it. Surfing [2] was another kind of emergent behavior in counter-strike, I believe, where players can slide through slopes in a certain way and also gain speed plus air strafing. 0: https://www.youtube.com/watch?v=wMIbJbQ2iHc https://www.youtube.com/watch?v=wMIbJbQ2iHc 1: https://www.youtube.com/watch?v=BXs0rFitP54 https://www.youtube.com/watch?v=BXs0rFitP54 2: https://www.youtube.com/watch?v=BXs0rFitP54 https://www.youtube.com/watch?v=BXs0rFitP54
- lmilcin 5y agoWhen original Quake code became available I spent a bunch of time analyzing the movement code to help my QW clan improve agility during matches. > As a decidedly skill-based mechanic, competitive players love bhopping because it is so hard to master. I have been part of QW clan somewhere between 1998 and 2002. People learned hopping not because it was hard to master but because without it you would be at an extreme disadvantage on some maps (especially DM3 and DM6). Additionally to being able to move faster around map hopping has some other advantages: being able to jump some distances that normally would not be possible to jump (like rotundas on DM3 and DM6, over lava on DM2, etc.), being further from ground makes you get less damage from rockets striking ground and also because when you run fast constantly jumping and bobbing right and left you are harder to target directly. Also, hopping feels good:) Hopping isn't hard. I have been teaching people hopping by explaining how it works and giving step by step exercises. I have never had any difficulty teaching people to do this. > This means that the player has a single frame to input the jump command without losing speed - another reason why bunnyhopping is so hard! I don't know Quake 3 code, but at least for QW this is not true. You can schedule the jump before you hit the ground. What you do is the following sequence: 1. Hit the jump 2. While you in air, release the jump and press it again. Keep the jump key pressed as you are heading you are falling to the ground. 3. When you hit the ground the game engine will immediately execute the jump without applying friction penalty (provided you don't get damaged due to fall, I don't remember that part too well). When I was teaching people to bunny hop one of foundational exercises was to learn to release and press jump again mid-flight, before you even start to learn the bunny hopping movement. You learn this standing in place before you add rotation (keep hopping while you rotate) and then add movement (start using w to move around). Only once you are comfortably timing your "reverse" jump mid flight you add strafing to the mix.
- alkonaut 5y agoI have played FPS games for as long as they have existed, competitively in the early days of CS. I don’t see why adding this feature deliberately would be appealing. It makes the game look unnatural for what? There are tons of hard to use glitches in every FPS game and the policy on any enjoyable server is “no glitching”, that is - play the game as the developer intended or be kicked. This bug was just too widely used to be considered unfair but thankfully games these days use movement code without obvious bugs like this.
- simonlc 5y agoIt looks unnatural when you put it in a game like CS, yes. But remember where CS came from, Action Quake. Then you have games that put this front and center, and it looks completely natural, such as Warsow.
- bombcar 5y agoAction Quake II was the pinnacle of these for me. Such a fun game.
- recursive 5y agoThere are plenty of games that have no intention of looking natural. I haven't played an FPS in ~20 years, but I distinctly recall bunny hopping being fun, all by itself.
- gccs 5y agoCause its really fun to play using it. There are tons of community servers with autohop mods enabled.
- lmilcin 5y agoAt least in Quake this was not deliberate choice. It was fortunate accident. It took some time for people to discover bunny hopping and once somebody figured it out it took like a storm. Hopping wasn't discovered immediately. I remember we were doing things like strafing into walls to speed up movement before we knew bunny hops are possible. I don't think idSoftware predicted how the game would be used when they were working on it. I believe the movement mechanics is just a byproduct of simplistic movement calculations.
- mensetmanusman 5y agoI much preferred Q2 bunnyhopping to Q3 bunnyhopping, which felt to soft/squishy. Has anyone figured out why the Q2 era bunnyhopping has not been replicated (or has it?)?
- oblak 5y agoQ2 movement is similar but different enough to Q3, that's for sure. But... soft/squishy? I am not sure what you're getting at. Q2 seem to care a bit more about jump timing though. It just never felt right after the first Quake 3 betas hit. Warsow/Warfork used to be largely Quake 2 based but never felt anything like it. Maybe Nexuis/Xonotic still do?
- curtis3389 5y agoNow we just need a nice breakdown of how to implement the skiing from Tribes.
- xyzzy_plugh 5y agoSkiing is the best happy accident in FPS gameplay, in my opinion. While Tribes: Ascend was still a thing, the competitive scene was intensely charged around high-velocity damage-boosting optimal flag capture ski routes. It was nuts. The skill ceiling was practically unlimited and the competition was fierce. Combined with projectiles with velocity ("inheritance") it made for some of the most exciting, tangible gameplay I've ever participated in and I miss I dearly. All I want to do is ski.
- coldpie 5y agoBack in high school, a friend and I wrote a 3D platformer akin to Mario 64[1], including writing the engine from scratch. No surprise, the physics was by far the hardest part and we never got it quite right. There was one build of the game where I screwed up the jump button function such that if you held the button down while going up a slope, you would repeatedly make contact with the slope and perform another "jump", infinitely increasing your velocity until you hit the top of the slope. Then you'd go rocketing across the map until you slammed into a wall or something. Much like Tribes skiing. It was great fun and I kept a special build of that around for a long time until it sadly broke because we changed the level data format. This was before I understood source control so I was never able to get that feature back. Anyway good times. Great educational project, but that happy accidental jump feature was probably the most actual fun in the game. My friend later went on to commercially release a 3D platformer, Poi. http://www.poi-game.com/ http://www.poi-game.com/ [1] Enjoy some high-school-student-in-2005 web design and writing, https://www.brightnightgames.com/games.php?game=sa&sec=development https://www.brightnightgames.com/games.php?game=sa&sec=devel...
- xyzzy_plugh 5y ago> No surprise, the physics was by far the hardest part and we never got it quite right. Don't feel bad, neither did Nintendo! The Backwards Long Jump, or BLJ, is kinda similar to your slope-launch, where you accrue velocity, and is a core part of SM64 speed running techniques. I wonder if, in the modern world of Unity and drag-and-drop physics, we're missing out on strange, emergent gameplay due to programmer error-- and to what degree. Some true magic was born out of weird and/or bad physics in games.
- beebeepka 5y agoI've been playing Quake for so long, I literally always, and I mean always, circle and strafe jump. Can't imagine doing things any other way. Of course, we kind of went beckwards for the last 15 years but skilled games are making a comeback. Speaking as a PC/arcades gamer,though.
- phoonvid 5y agoClassic CS:S video showing the joys of bhopping: https://www.youtube.com/watch?v=SNvDUO42Hys https://www.youtube.com/watch?v=SNvDUO42Hys
- squeek502 5y agoSimilar article on rampsliding in the Quake engine: https://www.ryanliptak.com/blog/rampsliding-quake-engine-quirk/ https://www.ryanliptak.com/blog/rampsliding-quake-engine-qui...
- jheriko 5y agothis inspires me to write an article about the practical issues of finding good game developers. the value of the frame delay in physics simulations is completely overlooked, something the current generation of popular game engines seem unaware of... it means values for positions remain consistent during a frame. with or without that insight it is eminently possible to work out how something like this works on inspection. the article is thorough, but the stuff it explains is much more fundamental... the detail about projection is good, but the explanation for why it is there is also absent, and the variable naming in the code example is relatively bad for such a short snippet. (a float called 'vel' which once assumes is 'velocity') ... anyway, i should stop complaining and try and explain this stuff better somewhere :)