Bounce Bug Question

  • btw. can you tell us on what kind of game are you working on?
    Is it a fun project? Is it an open source project? If yes do you have a git url for me? :D


    Also it would be really cool if you could share your puzzle pieces with us.
    I think it's very cool that people try to find out how cod4 and other quake based games work. Even after about 10 years you can find new interesting stuff in their engine (also tons of bugs and weird limitions :D)

  • It's an eSports project, not going to be open source, but I'm basically trying to create a game that's good for both casuals and competitive gamers alike, much like ProMod was but with improvements and changes. Modes like jumping would be available and modding.


    I've not much to show, only what I know in regards to movement from looking at the q3 movement code myself and testing in-game. The first task is to achieve a project with the movement implemented.


    There's not much of any actual physics in Quake 3 or CoD4, only character movement. Other then that, what affects a character for the most part is gravity and friction. Gravity default in both games is 800 (-800). Friction is 6 on Quake and 5.5 on CoD4.


    The jumping in Quake 3 to CoD4 got changed and a limiter was put on it. So in Quake 3 when you jump whilst you're in the air you can press jump so that when you hit the ground you automatically jump again. In CoD4 they removed this so you can't queue jumps.


    Strafing is the same. Basically most movement mechanics from game to game are almost identical with minor changes added to CoD4. In fact from CoD1 to CoD2 and then to CoD4 the movement didn't really change much, only the sprint button. Strafing is the same, you still have over bounce, etc.. but in CoD4 the newest element to movement was the bouncing. I'm not sure if that's due to how some assets were built with really steep slants etc..


    Interesting to see what infinity ward bothered to change in regards to the engine :) most effort was put into the visuals and new functions like sprint, particles, bullet penetration, ai, visuals but nothing to physics or player movement for the most part hehe.

  • Would be great if we could test it, as soon as theres something to test. As we have alot of very movement specified people in 3xp, who could give good critism.

  • Not to be the debbie downer here, but from what Ive seen in quake, its a lot like counter strike. ( Didnt CS come from quake? Correct me if im wrong ) But anyway, back to being a debbie downer. In counter strike you cant do any bounces, just doesnt exist in the game, thats why KZ is a thing. ( Kreedz ) I know im not really helping towards you finding a solution to bouncing in quake, but there may not BE a solution.

  • @heat


    That's only a little bit right. CS is based on an even older version of quake in which this issue was patched out. They then completely overhauled the engine itself for CS so it's pretty much an entirely new engine.


    That bounce bug originates from the Q3 engine, it has something to do with the collision. The easiest but most costly and timely task would be for someone to re-write that Quake 3 engine which is in C into C++ and make it a plugin for UE4, so basically porting it over.


    But who feels like understanding 10,000+ lines of code and then re-writing it all in C++? :D any offers? ;)

  • @Noob


    I think you took that literally lol.


    it was a joke, hence the smilies. All I want to find out is how bounces work, not for anyone to do the work for me. I already have someone for that. But I can't afford a re-write. The only thing I can offer is a mention and royalties upon successful kickstarter funding.


    So I'm not looking for anyone, just to find out as much information as I can. There will be a playable demo on Kickstarter if it evert gets to that stage :)


    Lighten up!

  • So here's an update:


    There's this free engine (or game) called unvanquished that started their engine by using the Quake 3 Arena engine. And I found a map where it has these tubes you can bounce off.


    If you search the github 'unvanquished' you will find it and I think it's currently at version 49.0 or 50.0 and you can download the .exe, it has instructions on how to make it work. Then, when you load the game, start a server on the map 'Thunder'. When you run around on the top right you have a mini-map and also name of locations. Go to a big room called 'Generators; and there should be 3 massive generators with tubes going into the ground.


    If you run into them really fast or jump into them at the point where they are most slanted you bounce like you do in CoD. Since they are so low to the ground you can also just sprint into them and you will bounce a little too.


    To make this even more obvious, go to console and type /g_speed 600 and then sprint into it. The bounce will be even bigger.


    In conclusion, it seems that bouncing was already inherent within the engine and was not created by changes Infinity Ward might have made.

  • This doesn't explain how or where in the code bouncing happens, only that it's there somewhere in the source code that's available online for Quake 3 or this unvanquished game and doesn't require access to CoD4 source code.


    It's just that someone with either knowledge of C (Quake 3 Engine) or C++ (Unvanquished was ported over to C++ instead of C for improvement purposes) needs to have a look and understand where it happens!


    But it's something :)

  • I've read through the function that mirko911 mentioned, and judging from lines 48, 49, 57 and 58 this is most likely a bouncepad since in 48 and 49 it is regrenced as some sort of a buildable that holds values and in lines 57 and 58 it refrences the values it got in lines 48 and 49. These 2 values are labled as minNormal and invert. I can't think of why terrain would have values such as these and so this is why I say it most likely is a bouncepad.


    Edit: also I don't think this code is in use because unless I really don't know how c++ works, line 91 will throw a compile error because the second parameter of G_Physics doesn't have a name (it is "void G_Physics(gentity_t *ent, int )").


    Edit 2: the if statement that starts on line 121 in the G_Physics function looks extremely promising to me since it has a limited check rate which makes the impresition theory more possible.

  • At this point I am not sure. I have tried to find the functions that were used, but I have yet to find the origins of vectorCopy (which is rather unessiciary to find since it probably doesn't do anything aside from copying a vector) or vevtorMA. I was able to find the origin of trap_Trace which is defined in sg_trapcalls.h, but I was unable to find the code for the function itself so far.


    P.s. I will not be able to respond for at least 3 or more hours since I am at school.