Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Weapon Switching with many weapons

Discussion in 'Editor & General Support' started by Bokaii, Aug 7, 2018.

  1. Bokaii

    Bokaii

    Joined:
    Aug 14, 2013
    Posts:
    28
    What would be a good way of making a weapon switching system if I have a lot of weapons and I still want it to be actionpacked?

    I've been looking around on the internet for ideas, but the only thing I've been able to find is the regular 2 weapons and some nades which is not gonna work here.

    Any ideas??
     
  2. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Wheel.

    Check out Doom 2016.
     
  3. Bokaii

    Bokaii

    Joined:
    Aug 14, 2013
    Posts:
    28
    That's actually a good idea, I've just never thought of it as something that could be used for an action packed game with multiplayer.
     
  4. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    In orginal doom shotguns was on number 3 you pressed twice for double barrel. Maybe somthing like that?
     
  5. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,504
    Check out pretty much any FPS pre-Halo and pre-COD, from memory.

    1 through 0 on the keyboard was pretty standard. When mouse wheels became a thing they got used as well. Unreal Tournament (and probably other games) also introduced a "previous weapon" button so that you could quickly switch between two preferred weapons even if you were using a mouse wheel and they weren't adjacent.
     
    Martin_H likes this.
  6. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Weapon wheel is great because it is simple enough for fast reflex switching. Only requires one button and analog.

    Keep the weapons tied to specific sections of the wheel so with a little practice players memorize the position and in a split second can swap to their weapon with accuracy. If there is no animation lag, fast swapping between weapons to use specific abilities in tandem becomes a thing. That's how Doom 2016 works anyway.

    If you don't want the fast swapping, I still think the weapon wheel is the simplest, most concise tool designed as of yet for switching weapons/equipment. You just have some animation that makes it so there is a few seconds or so to "get ready" after chnaing weapons.

    Pressing numbers seems like flying a jumbo jet. I don't want to use half the keyboard to play an action game.
     
    Martin_H likes this.
  7. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    A few seconds? Thats even slower than VR, i clocked myself both realoading and swapping firearm here :D

     
  8. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    If you don't want people to be able to fast swap, you stick in some "getting ready" animation that takes a second or two.
     
    Martin_H and angrypenguin like this.
  9. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Yeah, but a few seconds is a life time in a shooter, I think you underestimate how long a second take to pass :D
     
  10. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    For console controls the weapon wheel is pretty good. Weapon wheel is terrible with keyboard/mouse controls. Number keys are the most exact, and have a next weapon key. It is also very handy to allow custom key mappings for these. I frequently bind keys for weapons that I often use to be at easier reach for quick switching.
     
    angrypenguin and AndersMalmgren like this.
  11. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I'm not so sure that weapon wheels suck on m/kb setup. I've used it in a few games to good effect, though these were console games backwards adapted to pc.

    However, anybody who has used Maya's marking menu's can attest to how fast and precise and simple that can be. You hold down a button, like right mouse or shift+right mouse -- in a game this could be shift or control or R or anything conveniently located, and then you just flick the mouse towards the thing you want. Doesn't even have to touch it precisely. Once you get good with it, you don't even need to look at the menus, in fact you are usually faster than the menus can even appear. You just hold the modifier key and flick the mouse a few directions to get what you want. In the case of a shooting game, this would only need to be a single mouse movement. Even easier.

    This usually would mean that you have to stop moving for a split second to switch items. If you don't like that, then I think hardcoded keys has to be the way to go. Counter Strike makes good use of the scroll wheel though. You've got icons for your weapons, and scrolling through them with the wheel is very fast. You can swap out weapons almost instantly without having to move your left hand at all.
     
  12. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Its also worth any designer considering why multi weapon load outs haven't really been a thing since then too.
     
  13. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,504
    Considering, for sure. Jumping on the bandwagon? Maybe not. ;)

    Many games do things far more slowly than I could in the real world, and that's fine. Since when have games constrained themselves to being realistic?

    That's relative. As someone who used to play a heck of a lot of PC shooters when I was younger I felt crippled when playing console shooters for years. Everything is just so slow in comparison. You gain in movement nuance, but lose agility everywhere else across the board.

    But that's less complex than using a button + stick combo...
     
    Martin_H and Kiwasi like this.
  14. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,732
    Honestly, if I was making a PC shooter I'd have a weapon wheel and the number selection as an option.
     
    Martin_H, Ryiah and angrypenguin like this.
  15. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Less complex for a programmer. I think it is more simple for the average gamer. I know, being a long time consoler, I hated many pc shooters that used like twenty buttons. You get used to it either way, but, in my personal experience, weapon wheels are jsut hands down the simplest, easiest, most intuitive thing for either console or m/kb. The thing about number keys is you got to take you hand off the movement keys, assuming you don't have some kind of gamepad.
     
  16. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,504
    Regardless of controller, with a weapon wheel you need to be pressing a button and then you lose either movement or rotation to do the selection. With a gamepad, if you're using the d-pad for weapon selection then, bet case, you need to take your thumb off the left stick.

    On the other hand, when using WASD with a little practice you can easily reach keys 1 through 5 without losing either your movement or your rotation controls. You don't require a combination of keys to do the weapon switch, and it doesn't interfere with movement by usurping one of the inputs.

    Subjectively, I think you nailed it with "you get used to it either way". You prefer the way you learned first, I prefer the way I learned first. Either way, a game is designed in tandem with its controls, so the controls can't be considered in isolation.

    This is really the solution. For people who are used to weapon wheels one should be provided, unless you have few enough weapons not to need it. For people who want do jumping pirouette spin attacks while switching weapons you should also provide a control scheme that supports that
     
    Billy4184 and BIGTIMEMASTER like this.
  17. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Yeah, but not a few seconds, thats a life time in a tight spot.
     
  18. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    We know that! The point was, if the game developer wants to slow things down for whatever reason, they have tried and tested ways to do so.