Another NPC system again

another NPC system again this time just enhancing it a little further, the old version which i consider it as current implementation didn’t manage to reach it at 100+ NPCs as goal planned

Currently the structure im using is made by structuring it with “Matter” which is an ECS i was recommended to use for handling NPCs since it’s convenient and i decided to render them on client too, however since the limit of entities it can accept was at 1k, the performance on it decreases the more i keep spawning them in my game

for this one i swapped to using JECS which works relatively similar to Matter and far more portable and faster but cuts some feature including the loop, components name and sone additional methods, it fixed my issue of data being completely reused from previous entities even though it’s id were completely different, in that case would be randomizing the spawn point which was the most annoyin part to fix (there was no spawn point in the vid so pretend it’s there)

running with JECS my FPS almost runs steadily at 60 but averaging at 50 which was the goal im looking for, The only exception part where my FPS got reduced was the collision interacting with each others as that happens occasionally.

1 Like