Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2 Tank muzzle aiming

closed-rejected
nobody
None
5
2011-07-31
2001-07-21
Kris Verbeeck
No

This patch adds the possibility to alter the angle of
the tank's barrel. Now you will be able to shoot the
chickens hiding on top of a building (with jump flag)
in a no jump world.

For now the keys for controlling the angle of the
barrel are hardcoded: Q = up, A = down.

This patch will only work when your opponent also has
the patch applied. This because of some bad design in
the game :( The bullet velocity is squashed to zero in
two places:
1) when you fire the shot locally
2) when an opponent receives your shot
Especially that last one is quite enoying.

Another thing, I also draw an 'X' on the HUD so you can
see the angle of the barrel. I'm not quite sure that
this will render ok on other resolutions than mine. It
looks ok for me, but I'm not familiar with the fine
details of OpenGL, so there might be a better way of
doing it so it looks ok for everyone.

Discussion

1 2 > >> (Page 1 of 2)
  • Gert Brinkmann
    Gert Brinkmann
    2001-07-25

    Logged In: YES
    user_id=48712

    The "X" in the HUD is not very exactly drawn. The shot
    always goes up a little bit higher then the cross is drawn.
    So you have to aim a little below your target.

    It would be great to be able to lower the barrel below
    normal angle. With this you could also shoot downwards from
    a building. With this i suggest the following key mappings:

    Q) Raise
    A) Center
    Y) Lower
    If you like it more complex you could also add an left,
    right aiming inside the view-screen. E.g.

    W) Up
    X) Down
    A) Left
    D) Right
    S) Center (is currently the scoretable)
    Or better: Aiming via mouse and moving via keyboard. But
    this is too much like Quake i think and makes the game more
    complicated.

    The barrel-option should be off-switchable via
    server-configuration.

     
  • Kris Verbeeck
    Kris Verbeeck
    2001-07-25

    Logged In: YES
    user_id=23605

    About the X, I know that it is not perfect yet.

    About the lowering, I've also been thinking about adding
    that feature, but then without the center button. This
    centering button would make it too easy to go from aiming up
    to aiming down. If I would include the centering then it
    should have a built-in delay or something so you can't go
    from up to down in under 1 second (a normal tank can't move
    its barrel that fast either).

    About left/right aiming: IMHO this would be overkill, just
    turn the tank. I also don't like the Quake way of needing
    four hands to play a game, too many keys ain't fun no more.

    About server option: I agree. But then there should also be
    an option enforcing a client to have barrel aiming. Because
    for now it is not possible to shoot an opponent (by aiming
    up) if that opponent doesn't have the patch.

     
  • Gert Brinkmann
    Gert Brinkmann
    2001-07-25

    Logged In: YES
    user_id=48712

    The option "enforcing a client to have barrel aiming" is
    very necessary, i think, too.

    Also it would be important to see if another tank raises its
    barrel or not. At the moment you stand on top of a building,
    thinking that you are safe there until the other tank will
    jump and then suddenly the tank is able to shoot up without
    raising anything.

     
  • Kris Verbeeck
    Kris Verbeeck
    2001-07-25

    Logged In: YES
    user_id=23605

    Agreed, but I have no experience with OpenGL programming, so
    the graphics will have to be done by someone else.

     
  • Kris Verbeeck
    Kris Verbeeck
    2001-07-25

    New patch with key customization (replaces previous patch)

     
  • Kris Verbeeck
    Kris Verbeeck
    2001-07-25

    Logged In: YES
    user_id=23605

    New diff file uploaded. This one contains the possibility
    to customize the keys being used for aiming up/down. The
    default values are still 'Q' and 'A'. To change these keys,
    add the following lines to your bzflag config file:

    barrelUpKey Q
    barrelDownKey A

    There is no possibility to change this through the options
    menu in the game. I don't know enough about the OpenGL
    graphics system to add this (a second menu is needed or
    something, because on my screen the first menu is
    overflowing).

     
  • Pier Donini
    Pier Donini
    2001-07-25

    Logged In: YES
    user_id=168115

    Warning: I previously released a patch that already uses the
    'a' key for enabling slowmotion keyboard movement. And yes,
    a pageup/down is definitively needed to configure keys...

     
  • Kris Verbeeck
    Kris Verbeeck
    2001-07-25

    Logged In: YES
    user_id=23605

    Resolving defaults key issues is probably for when the
    patches make it into the official source tree.

     
  • Kris Verbeeck
    Kris Verbeeck
    2001-07-26

    Logged In: YES
    user_id=23605

    New patch: changed terminology from barrel to muzzle, since
    the later is also used somewhere else in the code.

     
  • Gert Brinkmann
    Gert Brinkmann
    2001-11-13

    Logged In: YES
    user_id=48712

    I took the latest CVS version of bzflag 11/13/2001 and
    patched it with this muzzle/barrel-aiming-patch (It should
    be taken into CVS as soon as possible). Now a problem
    occurs: When invoking the menu for configuring the keys,
    bzflag throws a segmentation fault. (I have to change to
    another shell to kill the process; maybe the segfault is
    thrown when the client is killed and not before)

    Without the patch the CVS-version works fine.

    BTW: The patch cannot be included automatically at the
    moment because it conflicts. Perhaps i did something wrong
    in patching the Key-Sources manually.

    Before including this into the CVS it should be implemented
    that shooting down from a building is possible.

     
  • Tim Riker
    Tim Riker
    2001-11-13

    • assigned_to: nobody --> airborne
    • summary: Tank barrel aiming --> Tank muzzle aiming
     
  • Tim Riker
    Tim Riker
    2001-11-13

    Logged In: YES
    user_id=8134

    I've been pondering this, and I do not plan on adding this
    until we make barrel aiming a server option. I think one of
    the nice things about bzflag is the simple interface. easy
    to learn. barrel aiming, is more challenging, but has
    different game play.

    Everyone, feel free to try this patch out though!

     
  • Gert Brinkmann
    Gert Brinkmann
    2001-11-29

    Logged In: YES
    user_id=48712

    The muzzle-feature as server-options would be great. The
    people who like it simple can leave it switched off, the
    others can switch it on.

     
  • Dave Brosius
    Dave Brosius
    2001-11-29

    Logged In: YES
    user_id=66596

    I agree with the sentiments that BZFlag is great because
    it's easy to learn but difficult to master.

    How about this:

    Tank barrel aiming as a server option, but the aiming is
    done by advanced computer technology that is hooked into
    the targeting technology.

    The tank automatically tracks your target, and adjusts the
    muzzle as appropriate.

    Perhaps this could even be a flag, instead of or in
    addition to the server option.

     
  • Tim Riker
    Tim Riker
    2001-11-29

    Logged In: YES
    user_id=8134

    Hmm.. "Doom" style muzzle aiming might be nice. Ie: the
    client shoots level unless there is a target in your sights
    that is at a different elevation, then it adjusts.

    Of course this might hinder as often as it helps...

    Perhaps you need to right click to get this to happen?

    need to fix horizontal wall collision detection for shots
    first or you will be able to shoot through the bottom of a
    box very easily.

     
  • Dave Brosius
    Dave Brosius
    2001-11-29

    Logged In: YES
    user_id=66596

    Definitely... I meant you must right-click.

    Yeah horizontal collision detection would be a must! hehe :)

    Of course you would get this amazing 'dribbling' effect in
    many worlds. imagine protons' decks.

     
  • Logged In: YES
    user_id=692280

    I'm sorry to bug you, but, where do I putt the .diff file at? I
    am a Win user. Windows ME to be exact! ;) ...Probally the
    worst OS ever made! Please help me out here.

     
  • Dave Brosius
    Dave Brosius
    2003-02-05

    Logged In: YES
    user_id=66596

    Well, you need to download source and run a tool called
    patch to merge these changes into the source. Then if all
    goes well, you need to rebuild the source code.

    All of this would be interesting if this patch wasn't a hundred
    years old. But it is, so, you would have to patch the code by
    hand. Not a fun thing.

    Still interested? :)

     
  • Logged In: YES
    user_id=692280

    Not really :) I am no better a programmer than my grand-
    pa! (hes dead). What about the new HUD by jzaun? That
    looks impressive! Tell me how? Can you e-mail me?
    webriot3@hotmail.com Back to exploring.

     
    • assigned_to: airborne --> nobody
     
  • trpted
    trpted
    2005-01-10

    Logged In: YES
    user_id=1182600

    How do I get a tool called patch? I am using Windows ME.

     
  • Dave Brosius
    Dave Brosius
    2005-01-10

    Logged In: YES
    user_id=66596

    patch can be d/l'ed at http://unxutils.sourceforge.net/

     
  • trpted
    trpted
    2005-01-10

    Logged In: YES
    user_id=1182600

    How do I use that, go step-by-step, tool to add this feature?

    How do I rebuild, go step-by-step, the source code?

    Is there a freeware program that I can use to rebuild the
    source code and where do I download it from?

     
1 2 > >> (Page 1 of 2)