Max number of entities
Displaying 1-13 of 13 total.
1
rpgking
|
I was wondering if there is a limit to the number of entities that can be on a single map? I'm pretty sure Verge2 had a 255 entity limit, but what about Verge3?
Posted on 2004-09-15 05:47:31
|
Zip
|
What limits are there on the map engine?
Not tested myself, but ovk tends to know his sheite.
Zip
Posted on 2004-09-15 05:51:28
|
rpgking
|
Alright. I actually just tested, and this seems to be the case. My computer can't seem to handle even 100 entities very well :P I guess it's good to keep the entity count as low as possible.
Posted on 2004-09-15 07:14:27 (last edited on 2004-09-15 07:18:52)
|
resident
|
Well, my Duron 1.2 is throwing roughly 100 entities around no problem whatsoever. I'd guess it depends heavily on the system you're running it on, the size of the map you're dealing with and what other processing work is going on, up to the hardcoded limit of 256.
Posted on 2004-09-15 14:36:32
|
Gayo
|
This can be tested easily by spawning an entity, logging the number of entities, and repeating until crash. Luckily, I've already done this, so I can confirm that it is indeed 256.
Here's a follow-up question to vecna: if a person DOES have a lot of entities, can he speed things up by making them unobstructable, or does it make no difference?
Posted on 2004-09-16 02:31:50 (last edited on 2004-09-16 02:32:37)
|
rpgking
|
I'm wondering about possible ways to speed up static entities. The thing is, I use entities for treasure chests and other objects that contain treasure(so that it's easy to just set a chest anywhere and not have to worry about it again). Since treasure chests do nothing but sit there, I'm wondering on ways to make Verge3's entity handler do the least amount of processing on them possible.
Posted on 2004-09-16 03:15:56
|
vecna
|
Hmm.
Well, entities that don't move....
erm. I'll ponder this.
The problem is that even if an entity doesnt move, its position is still checked against by other entities that ARE moving. Every entity thats spawned adds to the per-pixel detection that has to be done.
Still, I have some idea for optimization thatve been on the back burner, but I'll give it further consideration.
I first realized entities needed to be optimized when, on my 1.2ghz system, the fast-forward key would totally freeze the screen on Bumsville. It runs fine in fastforward on my new hotness system tho.
Posted on 2004-09-16 04:46:20
|
rpgking
|
It makes sense that for a non-moving entity, it still would have to be checked against by a moving one.
But I just made an interesting development. Previously, I just spawned about 100 townsmen entities(that stood in place and have 10 frames total), and this caused an odd blurring effect whenever I moved around on the map(I'm guessing the screen wasn't refreshing fast enough). Then, I tried spawning 200 treasure entities which have 2 frames and stand in place as well. This caused no problems whatsoever, and this was double the number of townsmen I spawned. I'm guessing the framecount of an entity is a big factor in this...
In any case, whatever the reason is for this, it is a great relief for me. ;)
Posted on 2004-09-16 07:37:38
|
resident
|
Actually, if an entity isn't going to be moving, couldn't you just make it unobstucted and non-obstructable, and then use a normal obstruction tile?
Posted on 2004-09-16 11:33:15
|
Gayo
|
RPGking, what I do when I want to plonk stuff down is create an invisible 'stuff layer'. Every VSP has certain stuff tiles for use on that layer. These are in the same location in every VSP. Then when you start up a map it just runs through every spot on the stuff layer and runs a little script for whatever stuff tiles it finds. In this case, you'd put a 'chest tile' on the stuff layer and it'd drop a chest there when the map loaded. This slows things down a little when a map is loading, but it's way the hell more efficient than using entities, which slow things down while the map is running.
Posted on 2004-09-16 17:40:58 (last edited on 2004-09-16 17:42:45)
|
rpgking
|
Good idea there Gayo, but the main reason I use entities is so that I don't have to worry about those chest tiles being in the VSP, and I don't have to attach zones/events to every chest that is set down. With entities, you can just spawn a chest, set it's event script to a universal chest-opening script, and be done with it within seconds.
Posted on 2004-09-16 23:40:32
|
Gayo
|
I see. Hmmm. You pretty much are screwed then, though I note that you could easily have a stuff layer's logic component lay down zones as well. IOf course, that doesn't solve the vsp problem, so fair enough.
Posted on 2004-09-17 01:11:56
|
rpgking
|
I realised last night that I am not screwed. ;) Since my treasure chests only have 2 frames, and are completely static, they seem to cause no slowdown. Even when I spawned about 200 of them in a single map. All of this ran on a 600mhz machine...
Posted on 2004-09-17 03:30:16
|