I just started making a tower defense game and I’m trying to code the enemy movement but I ran into a bit of an interesting problem
I made it so all the positions and things are calculated on the server but I need to send a remote event to the client to render it.
Right now I’m sending an UnreliableRemoteEvent every time EACH enemy is updated (RunService.Stepped), so for 5 enemies, I would send 5 events basically every frame.
I don’t think this is very good for performance, so I was wondering if I should send just 1 event, with a table of data, or if there is any other way to simplify communication between the client and the server.
Just as a side note I was also wondering if there is another way I could move the enemies, maybe to have better performance or to send less data between the client and the server.
I don’t really know…
Do you mean tweening it on the client or smth because I just don’t really think that would work since I the server may become desynchronised.
Or do you mean moving the parts on the server because I’m pretty sure that that causes a lot of lag but idk.
What would you do?
Thank you so much!
I just had a quick look at this and i’m sure it’ll be very helpful!
Also I know this is slightly off-topic but since i’m using CFrames and not humanoid:moveTo, how would I go about animating the character?
I thought about using inverse kinematics, but i’m guessing that’s a bit to complex and i’m just overthinking it a bit!