Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

The Turok weapons system

| Inside3d Forums Forum Index -> General Discussion

View previous topic :: View next topic
Author | Message
--- | ---
Wazat Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA |

Posted: Wed Jun 09, 2010 4:35 am Post subject: The Turok weapons system |

In Turok on the XBox360, PS3, and PC (currently $7.35 on Amazon), the player can dual-wield weapons. This turns out to be a damned cool feature, and I'm thinking about how to do it properly in Quake. I'd also like to implement the rest of the weapon system.
In the single player, you always have the knife and bow (buttons 1 and 2 on the PC). In multiplayer the bow becomes just another weapon you can swap out. You have 2 other slots for weapons, and you can swap them out by holding their corresponding button while touching another weapon. On the PC these buttons are 3 and 4. You auto-grab weapons you touch if you have an empty slot; otherwise the game prompts you to pick (or ignore the weapon).
For example, you touch a shotgun and see the messages:
"Hold 3 to swap Handgun <-> Shotgun"
"Hold 4 to swap Plasma Rifle <-> Shotgun"
If you're holding a Shotgun in slot 3 and touch a shotgun, it will auto-fill the shotgun's ammo and you'll only be given the option to swap out #4 (dual-wielding shotguns is cool, btw). Each weapon also has an alternate fire.
Some weapons are too big to dual-wield, but about half can be. Dual-Wielding is damn cool, and single-wielding a weapon has advantages too (you can use offhand grenades and zoom in for better aiming, using the controls that would operate the second weapon). While dual-wielding, the left mouse button fires the left-hand weapon and the right mouse button fires the right. On the PC, hold shift to fire the weapon's alt fire (it's the triggers on the xbox360).
You cannot zoom or use grenades while dual-wielding, but it's really nice to be able to control each weapon separately. I can empty my machinegun clip, then be reloading it while blasting away with the shotgun.
Rolling the mouse wheel cycles weapons: knife, weapon1, weapon2, weapons 1&2, weapons 2&1. The last two are the 2 dual wielding combos if your weapons can be dual-wielded, and order can matter since that determines which mouse button controls which weapon.
Note that there are no health items in Turok 2. The player's peripheral vision reddens as he takes damage, and when he takes too much damage he dies. If he avoids taking damage for a moment he starts to heal. The less damaged he is, the faster he heals. So a bullet or 2 is quickly healed, but getting blasted to near death could take 5-10 seconds to heal up once healing starts.
One last thing. The coolest... COOLEST weapon in the game is the sticky bomb. Fire once to lob a ballistic glowing bomb that sticks to whatever it touches. Fire again to detonate it. Alt-fire launches several proximity mines. If that doesn't sound cool, you HAVE to try it out in battle. It's an incredibly versatile weapon, and it's SO MUCH FUN to use against dinos and enemy soldiers.
SO! How to implement this in Quake?
I would want to use .viewmodelforclient so I could have 2 weapon models. This is a feature supported by multiple engines so it should be a reasonable requirement.
Making the right button fire the right weapon is easy with impulses and a "+attack2" alias. Having alt-fire work with the shift (or other bindable key) is equally easy, so long as the impulses from attack2 and altfire don't conflict (they can if the player releases both weapons in the same frame, which could happen). Otherwise I'd need to find something else to operate alt fire. Maybe jump could be turned into an impulse so I could put +button2 to better use... Not a lot of engines support +button1.
Tossing off-hand grenades when the player hits shift+attack is cripplingly easy. Likewise, displaying the ammo for weapons 1 and 2 can be done with the shells & nails displays. Grenade count could be cells.
Zooming could be done with fov, but that's problematic (how to avoid getting stuck with a wonky fov if the player quits or crashes while zoomed? Or is that not a problem?).
Eliminating health items and doing the time-based healing is really easy too, though we'd want to do something with those heal item locations in the map.
Weapon swapping with limited slots is doable. My monster swarm mod does it moderately well, and in fact if I changed its system a little to be like this, then it would be a lot easier to use! I should also change it to be touch-based instead of aiming at the weapon to pick it up (with the closest weapon touched being "selected" for pickup).
The weapon change code would have to be greatly retrofitted to handle two weapons at once, but still not a massive task. That could be really fun.
Thoughts?
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Wed Jun 09, 2010 5:19 am Post subject: Re: The Turok weapons system |

Wazat wrote:
SO! How to implement this in Quake?

float .weapon2, .currentammo2
viewmodelforclient yes that is recommended for both of the guns
you can probably
it's definitely not impossible, but akimbo is overrated. have a four armed player and do fourkimbo instead
_________________

Back to top |

Sajt Joined: 16 Oct 2004 Posts: 1026 |

Posted: Wed Jun 09, 2010 8:36 am Post subject: |

So the only way to select dual wielding is to use the mousewheel to cycle through all the weapons then the dual-wield configurations? That sounds cumbersome to me. Can't you just press 3 and 4 at the same time or something? Not really on topic, but I had a 50% similar weapon system implemented in a Quake mod. It doesn't support lame dual-wielding or lame alt-fire, but some of what you described reminded me of it.
You have four weapon slots (impulse 1 - 4). Pressing an impulse switches to that slot. If it's an empty slot, you get your fists. Mouse1 shoots, mouse2 is more complicated: if the current slot is empty (fists), you hold it down to become a vaccuum cleaner, picking up the first weapon you come across (you don't auto-pickup weapons otherwise). If you have a weapon in the current slot and tap mouse2, it drops the weapon. Hold it down and release to throw the weapon. (This is useful for exchanging weapons in coop, but is also used to throw throwing knives, grenades, etc.) So you can pick up more than one of the same weapon, which would allow for tracking upgrades/damage/whatever for each weapon. Also, there is an off-hand mighty foot button like in Duke3D. (Off-hand foot? Does that make sense?) It all comes together to be pretty entertaining.
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Wed Jun 09, 2010 9:55 am Post subject: |

Sajt wrote:
(Off-hand foot? Does that make sense?)

offhand knives and gun butting replaced the mighty foot these days it's worse how you suddenly have a knife in your left hand out of nowhere slicing/stabbing, sometimes you see three arms on the screen when this happens
_________________

Back to top |

goldenboy Joined: 05 Sep 2008 Posts: 310 Location: Kiel |

Posted: Wed Jun 09, 2010 9:56 am Post subject: |

Quote:
I can empty my machinegun clip, then be reloading it while blasting away with the shotgun.

I'd like to see someone doing that in real life. Reloading a machine gun with one hand (and teeth, probably) while firing a (pump-action) shotgun and reloading that between shots as well, also with one hand.
Or maybe your caddy does it.
But games aren't reality of course.
_________________
ReMakeQuake
The Realm of Blog Magic

Back to top |

Sajt Joined: 16 Oct 2004 Posts: 1026 |

Posted: Wed Jun 09, 2010 10:50 am Post subject: |

No, it's perfectly realistic, at least when you use guns that obviously don't need to be reloaded. _________________ F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.

Back to top |

Dr. Shadowborg Inside3D Staff Joined: 16 Oct 2004 Posts: 726 |

Posted: Wed Jun 09, 2010 1:52 pm Post subject: |

leileilol wrote:
offhand knives and gun butting replaced the mighty foot these days it's worse how you suddenly have a knife in your left hand out of nowhere slicing/stabbing, sometimes you see three arms on the screen when this happens

This is why back when I still had trifire in HellSmash, the shotgun actually had a grenade throw animation
_________________
"Roboto suggests Plasma Bazooka."

Back to top |

Wazat Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA |

Posted: Fri Jun 11, 2010 1:16 am Post subject: |

Sajt wrote:
So the only way to select dual wielding is to use the mousewheel to cycle through all the weapons then the dual-wield configurations? That sounds cumbersome to me. Can't you just press 3 and 4 at the same time or something?

Erm... no, I just never select my dual-wield weapons that way in the pc version so I haven't looked up how to do it. Pressing 5 and 6 ought to select the two dual-wield combinations, if it's intuitive. That's how I'll implement it.
I'm sorry you think dual-wielding and alt-fire are lame. The way Turok did it was really awesome (at least to me), hence this thread.

goldenboy wrote:
I'd like to see someone doing that in real life. Reloading a machine gun with one hand (and teeth, probably) while firing a (pump-action) shotgun and reloading that between shots as well, also with one hand. Or maybe your caddy does it. But games aren't reality of course.

Heh, yea. The day video games commit to being realistic, we're all jumping off the bridge.
Original Quake lets you fire a shotgun and double-barrel shotgun continuously without ever reloading, tearing through all 100 shells and picking up more ammo on the way without ever pausing. You pick up items simply by touching them. No bending down, no feeding clips. No staring at the passing clay pigeon, wishing your gun weren't jammed for mysterious reasons. Grr...
Games are fun because they spit in reality's face, then send a dog to dry-hump reality's leg while we record the whole thing. Then video games hold the video as collateral to keep reality from poking its nose in their business.
God help me goldenboy we will post this tape to youtube! DON'T PUSH US!
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.

Back to top |

Dr. Shadowborg Inside3D Staff Joined: 16 Oct 2004 Posts: 726 |

Posted: Fri Jun 11, 2010 4:04 am Post subject: |

Wazat wrote:
I'm sorry you think dual-wielding and alt-fire are lame. The way Turok did it was really awesome (at least to me), hence this thread.

He never said he thought alt-fire was lame, he just thought that having to mousewheel through all the weapons instead of just selecting them was.

wazat wrote:
Heh, yea. The day video games commit to being realistic, we're all jumping off the bridge. Original Quake lets you fire a shotgun and double-barrel shotgun continuously without ever reloading, tearing through all 100 shells and picking up more ammo on the way without ever pausing. You pick up items simply by touching them. No bending down, no feeding clips. No staring at the passing clay pigeon, wishing your gun weren't jammed for mysterious reasons. Grr...

There's a well defined step between reasonable suspension of reality, and total barking mad lol wut that makes no sense whoa the colors suspension of reality.
Original Quake's suspension falls under the first case, no handmodels (OMG, warriors of the future use telekinesis to wield their guns! But...why do they look like they're wielding them with their hands outside of first person view?! *clutches head*) / four armed dualwield (unless you're a nali) / dualwield without proper animations for it (pumpgun with no hands or autoloader pumping = bad, winchester shotgun with terminator 2 / Duke: Zero Hour onehand lever action = good), etc. fall under the latter case.
Not even Blood went that far with akimbo shotguns.
_________________
"Roboto suggests Plasma Bazooka."

Back to top |

Sajt Joined: 16 Oct 2004 Posts: 1026 |

Posted: Fri Jun 11, 2010 5:54 am Post subject: |

Dr. Shadowborg wrote:

Wazat wrote:
I'm sorry you think dual-wielding and alt-fire are lame. The way Turok did it was really awesome (at least to me), hence this thread.

He never said he thought alt-fire was lame, he just thought that having to mousewheel through all the weapons instead of just selecting them was.

Actually, I did sort of say that alt-fire was lame. I dislike it because it's a button that means something totally different from weapon to weapon. I really like consistency and predictability in these sort of things. (Otherwise you cannot "learn the ropes", you have to memorize the readme, or get bombarded with in-game tooltips, or blow yourself up a few times trying to figure out all the different context-dependent functions of a button...)

Dr. Shadowborg wrote:
Original Quake's suspension falls under the first case, no handmodels (OMG, warriors of the future use telekinesis to wield their guns! But...why do they look like they're wielding them with their hands outside of first person view?! *clutches head*) ... blah blah blah

Quake was immersive because it was consistent. Did you ever notice that you couldn't see your own hands? No. Maybe they're just out of view or something.
Half-Life 2 was anti-immersive because when you got your HEV suit, a "stretch hands" animation was played... yet you pick items up with telekinetic powers and can hold them on the other side of walls and stuff.
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.

Back to top |

GiffE Joined: 08 Oct 2006 Posts: 141 Location: USA, CT |

Posted: Fri Jun 11, 2010 1:26 pm Post subject: |

Sajt wrote:
Quake was immersive because it was consistent. Did you ever notice that you couldn't see your own hands? No. Maybe they're just out of view or something. Half-Life 2 was anti-immersive because when you got your HEV suit, a "stretch hands" animation was played... yet you pick items up with telekinetic powers and can hold them on the other side of walls and stuff.

Button's in quake kinda ruined immersion, I don't generally run my entire face into a wall to press a button. To me, in the case of immersion, its not so much about how everything looks but how you interact with the world.
Dual wielding is only good for pistols... you can go all Lara Croft style on their asses.
_________________
http://www.giffe-bin.net/

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Fri Jun 11, 2010 1:55 pm Post subject: |

GiffE wrote:
Button's in quake kinda ruined immersion, I don't generally run my entire face into a wall to press a button.

And you prefer running along walls hitting the same key constantly resulting in it sounding like you're trying to hump the wall?
I still have fond memories of duke nukem, running around with both feet infront of me the whole time.
One oft overlooked source of immersion is sounds.
If I fire a small low-damage weapon, I expect it to sound a bit weaker too. If I fire a HUGE FAT ROCKET LAUNCHER, I expect it to have a whole heap of bass instead.
We don't want no beavis+butthead laugh when firing goddamn rockets around the place. Would work well enough for the axe though. hahaha. DIE!
:)
_________________
What's a signature?

Back to top |

Dr. Shadowborg Inside3D Staff Joined: 16 Oct 2004 Posts: 726 |

Posted: Fri Jun 11, 2010 2:37 pm Post subject: |

Sajt wrote:
Actually, I did sort of say that alt-fire was lame. I dislike it because it's a button that means something totally different from weapon to weapon. I really like consistency and predictability in these sort of things. (Otherwise you cannot "learn the ropes", you have to memorize the readme, or get bombarded with in-game tooltips, or blow yourself up a few times trying to figure out all the different context-dependent functions of a button...)

...That's just plain wierd. (on the grounds that the same thing applies to the normal fire button)
Sure, something like that CAN happen (glares at Hellsmash beta 1's trifire), but it's generally not a problem as long as the weapon itself is upfront about what it's secondary is likely to be...for example, with a machinegun, you can generally expect either grenades or something explosive, depending on what it's model looks like.)

Sajt wrote:
Quake was immersive because it was consistent. Did you ever notice that you couldn't see your own hands? No. Maybe they're just out of view or something.

Actually, Quake gets away with this because the weapon designs themselves were such that you could reasonably assume that your hands were out of view.
Nailguns, Launchers, Lightning gun were all positioned such that your hands would likely have been out of view, the shotguns also could be explained. (single hand / pistolwield for supershotgun, and judging from the icon for the regular shotgun it was a huge drumfed autoloader, which means you could have been holding it by the drum...and the axe had a hand.)
_________________
"Roboto suggests Plasma Bazooka."

Back to top |

gnounc Joined: 06 Apr 2009 Posts: 120 |

Posted: Mon Jun 28, 2010 8:25 am Post subject: |

Anything come of this? I went ahead and tried to implement the dual weild system but it became a bit messy, so I instead just tried to do weapon swapping without it. I came up with: put this bit into weapons.qc

Code:
impulse 102 pickup(); void ()pickup = { self.attack_finished = time + 0.2; };

and this bit into ()weapon_touch...in items.qc

Code:
{ if time < other.attack_finished return; else { other.attack_finished = time;
};

which uhh. doesnt work.

Back to top |

Wazat Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA |

Posted: Thu Jul 01, 2010 2:00 am Post subject: |

Sorry, I got involved in other things. I need to get back to this. The main impediment I'm facing now is player weapon animations. It's easy enough to have lightning and nail attacks handled by the weapon itself so the player can continue firing rapid-fire weapons. However, how to handle animating the player model for multiplayer, when he can be firing two weapons independently?
I'm basically figuring I should just have the player animating whatever is happening most recently, or perhaps only animate the player from just one of the guns (i.e. always left hand). Really it requires a new player model with weapon attach points to look good, but I don't care that much for a simple tech demo.
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> General Discussion | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group