Hi
I used chunk system for my game to load the map, it has a seed and works perfectly (all players see the same thing) the problem is that I want to add ai enemies but they don’t see the terrain. How would I fix that? Also security and anti exploit measures don’t matter to me this is just a private game for me and my friends.
even though you don’t care about exploiters, there’s still no reason to do it on the client, you can do all of this in server,
If you refuse,
You can code the enemies in the client side.
It’s way better for optimalization if you do it client side. Like minecraft has worlds made out of thousands of chunks but player only generates the ones around him. Server wouldn’t handle generating this whole map which would have to be hidden from the player anyway or else it would lag a ton/crash. Also how would I code the enemies client sided but so that every player sees them?
this does not help optimization, at all. You would still crash in the client side, just tell them you need a good PC
This only is good for stuff like tweening but that’s it to my knowledge
you can like put up a server side code that like does the movement code and replicate it to clients
You don’t crash on the client side. Bro I made the script I made it work. Theres like 40k chunks to generate. Its all saved in a table and when players walks by them they create themselves and then delete after.
Source? Sorry for being rude but your own computer crashes right? Not the server?
Doing loading on the client side is good in this case. Roblox does a bit of that with physics objects.
You don’t need a good PC to load things.
You also don’t only do tweeting in the client. Any visual effects, animations, and some objects should only be rendered on the client.
Why not? Everyone sees and collides with the same thing. You would still have the same number of parts of the server created them. There are delays with server rendering (although it doesn’t really matter that much), and it really doesn’t take much to create and render a bunch of blocks.
For the OP. Creating it on the client side is fine, but it’s be much harder to find a way to make the AI functional.
I made one the same way lol. Really useful at times