Okay I thought I'd make this a discussion since I need as many ideas as possible from people, and I am willing to discuss pros and cons of each idea.
I have a projectile system that can handle approximately 100+ projectiles with no visible lag or delay, and my computer is nothing special.
First off, I know 100+ probably isn't that great, but it does what I need it to do.
Secondly, if I active collision for each projectile, the limit sadly drops from that 100+ to around 15-35 depending on what method I use for collision.
I would really like this limit to reach about 50+ without any visible lag or delay if possible.
Ideas I've tried:
- Using a linked list to [ljass]loop[/ljass] through all projectile instances, checking if they are in range of each other.
- Using [ljass]GroupEnumUnitsOfPlayer()[/ljass] and filtering units in the boolexpr.
So yeah, please discuss and give me your ideas. I will even post my system if you want to have a look.
We can also discuss the most efficient and practical way to do projectile on unit collisions as well.
Current ideas for that are:
- Using [ljass]GroupEnumUnitsInRange()[/ljass], which is basically the default way. This provides a pretty nice interface, but isn't great for high frequency use.
- Using [ljass]TriggerRegisterUnitInRange()[/ljass], which is a bit more advanced. This way is probably the most efficient, however it will probably require dynamic triggers for each projectile instance and will end up with a not so good interface when compared to the above option.
I have a projectile system that can handle approximately 100+ projectiles with no visible lag or delay, and my computer is nothing special.
First off, I know 100+ probably isn't that great, but it does what I need it to do.
Secondly, if I active collision for each projectile, the limit sadly drops from that 100+ to around 15-35 depending on what method I use for collision.
I would really like this limit to reach about 50+ without any visible lag or delay if possible.
Ideas I've tried:
- Using a linked list to [ljass]loop[/ljass] through all projectile instances, checking if they are in range of each other.
- Using [ljass]GroupEnumUnitsOfPlayer()[/ljass] and filtering units in the boolexpr.
So yeah, please discuss and give me your ideas. I will even post my system if you want to have a look.
We can also discuss the most efficient and practical way to do projectile on unit collisions as well.
Current ideas for that are:
- Using [ljass]GroupEnumUnitsInRange()[/ljass], which is basically the default way. This provides a pretty nice interface, but isn't great for high frequency use.
- Using [ljass]TriggerRegisterUnitInRange()[/ljass], which is a bit more advanced. This way is probably the most efficient, however it will probably require dynamic triggers for each projectile instance and will end up with a not so good interface when compared to the above option.