#which option is better for performance

1 messages · Page 1 of 1 (latest)

spice nimbus
#

So I was thinking about optimisation for my npcs and I got wondering.
Is it better to have a module Script for each (or a singular master module script) that contains their generated data. Or to have the data freshly generated each time it’s needed and then the table be grabbed by the garbage collector after it’s used up.

My thinking is, after the initial start up where everyone spawns, the data isn’t called as often so if each npc’s data is being kept in a module they could just sitting on waisted memory. but I’m not entirely sure

modest parrotBOT
#

studio** You are now Level 1! **studio

rigid swift
#

you should probably make one moduleScript for all NPCs. making a module script for each one seems excessive unless they're all unique

#

depending on the number of NPCs, small tables are fine compared to having a modulescript in each

gleaming ginkgo
#

a module for every NPC is a very unclean design