#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 3 > >> (Page 1 of 3)
  • 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.

     
1 2 3 > >> (Page 1 of 3)