[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - The Turok weapons system

The Turok weapons system

Discuss anything not covered by any of the other categories.

Moderator: InsideQC Admins

The Turok weapons system

Postby Wazat » Wed Jun 09, 2010 4:35 am

In Turok on the XBox360, PS3, and PC (currently $7.35 on ), 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.
Wazat
 
Posts: 771
Joined: Fri Oct 15, 2004 9:50 pm
Location: Middle 'o the desert, USA

Re: The Turok weapons system

Postby leileilol » Wed Jun 09, 2010 5:19 am

leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby Sajt » Wed Jun 09, 2010 8:36 am

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.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby leileilol » Wed Jun 09, 2010 9:55 am

leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby goldenboy » Wed Jun 09, 2010 9:56 am

User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel

Postby Sajt » Wed Jun 09, 2010 10:50 am

No, it's perfectly realistic, at least when you use guns that obviously don't need to be reloaded.

Image
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.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby Dr. Shadowborg » Wed Jun 09, 2010 1:52 pm

User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Postby Wazat » Fri Jun 11, 2010 1:16 am

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.
Wazat
 
Posts: 771
Joined: Fri Oct 15, 2004 9:50 pm
Location: Middle 'o the desert, USA

Postby Dr. Shadowborg » Fri Jun 11, 2010 4:04 am

User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Postby Sajt » Fri Jun 11, 2010 5:54 am

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.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby GiffE » Fri Jun 11, 2010 1:26 pm

GiffE
 
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT

Postby Spike » Fri Jun 11, 2010 1:55 pm

.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Dr. Shadowborg » Fri Jun 11, 2010 2:37 pm

User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Postby gnounc » Mon Jun 28, 2010 8:25 am

User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Postby Wazat » Thu Jul 01, 2010 2:00 am

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.
Wazat
 
Posts: 771
Joined: Fri Oct 15, 2004 9:50 pm
Location: Middle 'o the desert, USA


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests