DarkPlaces button support advantages?

Discuss programming in the QuakeC language.
Post Reply
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

DarkPlaces button support advantages?

Post by Baker »

Are there any advantages to supporting the DarkPlaces button3, button4, etc. extension?

Like is it more reliable or have some sort of true advantage over the impulse system way of doing things? I lazily haven't looked to see if maybe the button flags get sent constantly with the "movement intentions" of the client.

If so, is that the main advantage? That messages cannot be "lost" or rather that the cost of losing them is trivial because they are constantly communicated?

(I never liked the "impulse number system", but still it doesn't require modifications to support).
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: DarkPlaces button support advantages?

Post by Spike »

impulses can get lost.
two imulses in one frame looses one. packetloss looses them too.

the no-two-impulses at the same time would be a real killer if +attack and +jump were implemented with impulses.

support for up to 8 buttons adds no extra data to the network, and does not break compatibility with any client or server.
.button3 etc is a flag present in every single outgoing packet. its possible for packetloss to loose a +button3;wait;-button3 as it'll still be present in only one packet, but that's no worse than impulses, but at least will never be stuck in the 'on' position which can be a major issue with impulses.
support for .buttons also increases compatability with some mods that trivially target DP. :P

so yes, .buttons are more robust than impulses, but I'd personally only use them for things that need to be held down, like +gren1 in TF or +hook, etc.
either way your user probably expects a nicely named and memorable alias, regardless of whether it does +button3 or impulse 40, so from a user perspective its no different.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: DarkPlaces button support advantages?

Post by Baker »

Ah yeah, the 2 impulses thing. I forgot about that.

And this avoids the "My grappling hook sticks sometimes because I have bad connection" and someone says "bind whatever -hook; wait; -hook" (which is a bit dumb to have to do, as rare as that situation actually is nowadays).
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Post Reply