job000005

sam_stafford (Sam Stafford)
Sam Stafford created this job , modified by Shawn Hladky
Closed
Max limit of 130 entities - can this be upped?
1024Reworked entity creation in most cases - it's done one at a time now rather
than all at once.  This allows us to have more entities than the previous limit
of 130, and also looks a little nicer.

Folders and files now pop into existence instantly instead of sliding - makes
navigation easier.  Depots still slide because there typically aren't as many
of them (okay, I might eventually make them pop too, but I'm tired now).
Revisions slide because it looks really cool - like a waterfall pouring out of
the file.

The upper limit to entities is now due to the "visible entity packet" thing,
which I'm certain I have no control over - it's as high as it can possibly be
right now.
  • Details
  • Comments -
Status
Closed
Project
p4hl
Severity
C
Reported By
Sam Stafford
Reported Date
Modified By
Shawn Hladky
Modified Date
Dev Notes
Maybe.
 Talking to folks at Valve would help, but recently I've made the
observation that my snark-dropping crossbow (thank you Wavelength) never
crashes Half-Life like expanding a hefty file does.  Mayhap using the
CBaseEntity::Create method is better somehow?

(update) Using CBaseEntity::Create doesn't seem to help any.  And yet it
does seem that the snark crossbow doesn't crash anything.  What could be
different...?

(update) *bangs head against wall in frustration*

(update) Here's a thought - the server/client communication is limited to a certain
amount of data in one shot, right?  Maybe the fact that I'm creating all those entities
in one instant is what's doing it - the server has to tell the client about all of them
in one message?  The snark crossbow drops snarks one at a time.

The fix would be to create the entities not all at once, but to build a queue and spawn
them in batches during the Think() function....

(update) Tested it - YES!  I was able to create 700 CObjectFiles at once.  Past about 400 or
so the engine started to go into conniptions because there were too many objects visible, but
I had them all piled on top of each other so they wouldn't fly off the map.  Once I implement
this for real with CObjectRevs I can experiment to see how high it can go.

Unconfirmed reports indicate that the server can handle 800 objects at once, but apparently the
client doesn't like to render that many.  In any case, though, this'll let me create quite a few
objects without any crashing (the worst side effect of the "too many visible entities" problem
was that I ended up not being able to move).  Boo yah.