TheEnginesOfCreation / EntityPlus

EntityPlus is a mod that offers a true single player experience in the Quake III Arena videogame.
34 stars 5 forks source link

G_SPAWN: NO FREE ENTITIES #149

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Map crashes to black screen and that error message.

It happened during a combat scenario while I was spamming plasma gun, and the 
bot was spamming rockets.

---

I can see how this error is most likely my fault because my map is quite large.

But I posted this here just in case you had any thoughts/comments about it.

Original issue reported on code.google.com by ryanbris...@gmail.com on 7 Oct 2011 at 7:05

GoogleCodeExporter commented 9 years ago
It would be nice to see this error just print a warning and gracefully fail to 
create a new entity until memory is available rather than just having a 
heartattack and crashing. 

Original comment by brandonh...@gmail.com on 8 Oct 2011 at 5:48

GoogleCodeExporter commented 9 years ago
That's not really easy to do unfortunately.
I am, however, trying to optimize the code by freeing up entities more 
rigorously which will hopefully make situations like these occur less often.

Original comment by era...@gmail.com on 12 Oct 2011 at 6:20

GoogleCodeExporter commented 9 years ago
Currently pondering if I can implement a system that will put map entities in a 
collection without actually spawning them and spawn them "on demand" so to 
speak. If that is doable then I could think of a sort of garbage collector 
system that would free entities and put them back in the collection. 

Right now this is probably a bit of wishful thinking but if I could do 
something like this, it would basically mean that we could break through the 
1024 entity limit and go beyond.

For a game like Quake 3, this wouldn't be very feasible because players can be 
throughout the entire map, but with !EntityPlus, the player is basically in 
just one position and there are a huge number of entities in the map just 
sitting there doing nothing, so we could de-allocate those while they're not 
used.

Hm, I really need to think this one through...

Original comment by era...@gmail.com on 13 Oct 2011 at 10:05

GoogleCodeExporter commented 9 years ago
No worries.  

It's kind of good because it forces a person to split his map up into multiple 
parts and have a campaign

Original comment by ryanbris...@gmail.com on 14 Oct 2011 at 9:48