ED_ALLOC: No free edicts - just as common in Source

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Okay, we have to nip this crap in the bud NOW, cuz it's not going to leave us when we go to Source:

Insurgency

Fortress Forever

LUA Script

Just about every major Source mod gets hit by the No Free Edicts, error... I can't f*cking believe that Valve didn't find some good way to manage this crap! ><

Suffice to say it seems to be caused mostly by less than optimal code coupled with a lot of entities - which is pretty much inevitable in Master Sword. I've yet to read anywhere there's a real way around this. I HIGHLY suggest researching the subject before the MSS team falls into the same trap as the MSC team.

I only bring this up as I've been bashing my head all night trying to figure some way to cut down on the issue with Helena2. Having the debug level off HELPS but it doesn't solve the issue. I don't want to see the next mod run into the same brick wall.
 

Orochi

New Adventurer
MSS Developer
MSC Developer
Joined
Jun 12, 2006
Messages
790
Reaction score
0
Age
35
Location
On a Bus
Jesus, the entity limit in source is around 4000 entities! How in the hell did they fill THAT up?
 

Dogg

New Adventurer
MSC Developer
Joined
Aug 19, 2004
Messages
200
Reaction score
0
hi thothie. I'm amazed this site is still active

It's possible to lower the edicts with a lot of coding tricks. But it really sucks to have to fight against the engine like that :?
 
  • Thread starter
  • Admin
  • #5

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Orochi: Entities != Edicts - they just tend to be the cause of a lot of em.

Dogg said:
hi thothie. I'm amazed this site is still active

It's possible to lower the edicts with a lot of coding tricks. But it really sucks to have to fight against the engine like that :?

MOAR SPECIFIC ADVICE/LINX WOULD BE MUCH APPRECIATED PLZKTNX!

I can't get anyone to help us with this specific problem. Been up and down the NS IRC and the Svencoop forums and chatting with old modders for WW, Apox, and Brain Bread - some of which have been most helpful with advice in other arenas, but mention "No Free Edicts" and they crawl inside their shells again. :(
 

Jelly

Adventurer
MSC Developer
RiP
Joined
Nov 25, 2005
Messages
1,909
Reaction score
15
Age
31
Location
You are here --> X
Dogg said:
I'm amazed this site is still active.

We are a very reliable community. As long as I have a computer with internet I'll visit this site. And I still say that MS:C is the best game ever, to have been made (there may be some small bugs and glitches but the incredible fantastic awesome gameplay makes it obsolete.)
 

Dogg

New Adventurer
MSC Developer
Joined
Aug 19, 2004
Messages
200
Reaction score
0
Thothie said:
Orochi: Entities != Edicts - they just tend to be the cause of a lot of em.

Dogg said:
hi thothie. I'm amazed this site is still active

It's possible to lower the edicts with a lot of coding tricks. But it really sucks to have to fight against the engine like that :?

MOAR SPECIFIC ADVICE/LINX WOULD BE MUCH APPRECIATED PLZKTNX!

I can't get anyone to help us with this specific problem. Been up and down the NS IRC and the Svencoop forums and chatting with old modders for WW, Apox, and Brain Bread - some of which have been most helpful with advice in other arenas, but mention "No Free Edicts" and they crawl inside their shells again. :(

Well I'd rather hang myself then do it, but you could encapsulate the functionality of an entity without making it create an edict at load time.

A trigger is a good example... each one in the map creates an entity/edict (same thing for this discussion). You could instead have it just create an object in memory that gets called by the world entity instead of individually by the engine. So in the spawn function it would creates an object in an array somewhere then kill itself. Now this type of trigger no longer creates edicts. Then in the world spawn/think/die functions it goes through the array and calls each object with spawn/think/die. You'd have to manually implement pev->nextthink to get the timings to work right and you'd have to create some sort of translation function for any other entity that references the trigger (because you can no longer just call GetEntityByIndex or whatever its called, I forget the exact name... basically you can't query the engine for the entity any more because its now local to your dll).

Now that would actually work, but would be hell to implement. And it would have to be done for each entity type on which you want to remove dependence from the engine. Its easier to just cut back on map details... or maybe there's simply a bug thats looping, creating entities. Hard to say without testing.
 

Dogg

New Adventurer
MSC Developer
Joined
Aug 19, 2004
Messages
200
Reaction score
0
or try two asprin, and call me in the morning
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
In addition to the maps simply having too much stuff in them (hard to avoid in MSC), I'm fairly certain we've got some code generating edicts via loopiness here somewhere. I've not found a dependable way to track the number of edicts being tied up, much less some way of tracking what's generating them. Svencoop managed to write their own function for this, but they ain't giving us any secrets in that regard. :\
 

dRkILL

New Adventurer
MSC Developer
Joined
Jul 18, 2004
Messages
449
Reaction score
0
Age
38
Location
Milford, Massachusetts
I blame shitty programming on the part of other mods.

Don't worry, I know how to not make memory leaks. Seems to be a challenge for most people these days.

Oh, hi Dogg. :D
Idle on IRC with us. It's fun. irc.gamesurge.net, #msremake
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Seems all the mods are getting it, including one retail Source mod (VtM). A lot of these are top-notch - so I suspect it's unavoidable to some degree or other, and becomes more so as your code expands.

I would, at the very least, abandon this idea of merging multiple concept maps together. Keep Edana, Thornlands, etc. seperate, or risk the MSC curse. ;)
 

dRkILL

New Adventurer
MSC Developer
Joined
Jul 18, 2004
Messages
449
Reaction score
0
Age
38
Location
Milford, Massachusetts
The plan I was thinking was only merging small maps with the larger ones (such as merge Edana and Edana Sewers). Edana and Thornlands would be way too big.
 
Top