Player leaves no free MaskBits - LOGGED
by ArchieMD User · in Torque 3D Professional · 04/22/2010 (3:40 pm) · 8 replies
I had subclassed Player in the Alpha and had available netmask bits for my class, but in the Beta, Player::NextFreeMask = 0, as in it's shifted all the way around.
Can others confirm?
Fix?
Can others confirm?
Fix?
#2
For now, I'm using NetEvents for all c/s msg passing, which probably is inefficient
04/23/2010 (7:31 am)
How about using 64 bits if the pack/unpack update route is really the way to go?For now, I'm using NetEvents for all c/s msg passing, which probably is inefficient
#3
05/12/2010 (2:32 pm)
You're even out of bits in Camera. This mask bits thing needs some rethinking.
#4
Is there a new way to do this? Or is this still the norm?
05/12/2010 (4:07 pm)
Do all engines still use this sort of approach for networking? I remember Quake 3 did, which was around the same time as Tribes 2.Is there a new way to do this? Or is this still the norm?
#5
05/13/2010 (4:41 pm)
Less data is better, but I suppose you could inherit from any of your networked classes that you need to use and add a data carrier mechanism of your own. Torque's network infrastructure is pretty darn fast and to me that leaves room to burn a little more bandwidth if you like - on the downside you'll be reducing the maximum number of players who can be logged in simultaneously to an given server....
#6
Games these days may be less picky about when they send network updates, but then very few of them would support more than 32 players in a game (Torque has been known to support 128+ if I'm not mistaken). I'd say you could get more wins than losses from turning the mask into a 64-bit value assuming you intend to efficiently use all of those new mask bits. You'll add 32 bits to every network exchange, but if the result is that you more efficiently control when to send larger chunks of data in control client streams and update packets, it should improve networking overall. For the best results, you could add the extra 32 bits to only the ShapeBase or Player class itself, though that implies adding a whole new layer of mask control you'll need to write yourself.
That said, if the data you want to regulate totals less than 32 bits per packet, you'd actually do better just streaming that data in every packet with no mask at all, or at least all under 1 umbrella mask. This is unlikely, but I thought it was worth mentioning.
As a short fix, as Tom pointed out there are a number of basically unused masks sitting around. In ShapeBase.h, search for enum ShapeBaseMasks and you'll see a few obvious choices for removal: CloakMask, ShieldMask, InvincibleMask. These masks were specifically part of Tribes 2 I believe. While they may have some functionality (I believe InvincibleMask may actually be part of a working timed invincibility sytem), there's a good chance you're not using the things they're connected to.
05/18/2010 (8:50 am)
The devs have been talking about removing the hierarchy as we know it for a while now, and it sounds like a good idea in theory, though I don't know how much I like the idea of losing the ShapeBase-style "every game object has a common base" design I've relied on for so much of my code. Still, this system has proven to be as much of a problem as it is an advantage. Maybe I just don't like having to change my code. ;)Games these days may be less picky about when they send network updates, but then very few of them would support more than 32 players in a game (Torque has been known to support 128+ if I'm not mistaken). I'd say you could get more wins than losses from turning the mask into a 64-bit value assuming you intend to efficiently use all of those new mask bits. You'll add 32 bits to every network exchange, but if the result is that you more efficiently control when to send larger chunks of data in control client streams and update packets, it should improve networking overall. For the best results, you could add the extra 32 bits to only the ShapeBase or Player class itself, though that implies adding a whole new layer of mask control you'll need to write yourself.
That said, if the data you want to regulate totals less than 32 bits per packet, you'd actually do better just streaming that data in every packet with no mask at all, or at least all under 1 umbrella mask. This is unlikely, but I thought it was worth mentioning.
As a short fix, as Tom pointed out there are a number of basically unused masks sitting around. In ShapeBase.h, search for enum ShapeBaseMasks and you'll see a few obvious choices for removal: CloakMask, ShieldMask, InvincibleMask. These masks were specifically part of Tribes 2 I believe. While they may have some functionality (I believe InvincibleMask may actually be part of a working timed invincibility sytem), there's a good chance you're not using the things they're connected to.
#7
06/01/2010 (5:40 am)
Logged Key: TQA-180
#8
06/01/2010 (4:27 pm)
Invincibility seems pretty useless / way too genre or debug specific. Perhaps that could be torn out to make room.
Associate Tom Spilman
Sickhead Games
In the upcoming beta release we've removed a few old unused mask bits in ShapeBase and Player which will help, but longer term we just won't be building gameplay objects with deep class hierarchies like Player, Vehicle, etc.
I would suggest removing or reusing existing maskbits by deciding what parts of ShapeBase and Player you need for your game.