Should I use multiple scripts for expensive remote events?
{
If so, should I put each different remote event script inside their own Actor?
Note that things like buying and equipping events will all go in their own script since those aren’t considered expensive and don’t have long unyielded sequences
}
Should put every script in my game inside an Actor?
The answer to both questions depends on your specific game needs. Generally, it’s best to use multiple scripts for expensive remote events, as this will help reduce lag and improve performance. As for putting every script inside an Actor, this depends on the complexity of your game. If you are making a complex game, then it may be necessary to use Actors in order to compartmentalize the scripts and keep the game running smoothly. On the other hand, if your game is relatively simple, then you may not need to use Actors at all. Ultimately, it’s up to you to decide what’s best for your game.
On top of that,
While actors can help to organize your game code, they are not necessary for every script. Actors should be used primarily for expensive remote events such as network traffic, AI calculations, and heavy physics calculations.