I guess this could go into the Monster AI sub, but not sure,
Long story short, I have a web browser based game similar to Diablo 2. Everything is server-side and synced with nodejs using websockets.
The game is instanced based and every time a player moves, their position is updated and sent to everyone in that current game (real time).
Here is a simple dev screen to show what I'm trying to talk about:
That monster is piped from the gameserver into this users game. I am at the point where I can run a global game loop that runs every 1.3 seconds and check if the monster is next to the player (to start attacking it), but that's boring! I want monster AI where the mob moves around and attacks the player.
I can obviously do that client side within JavaScript. But, my problem is how do I do that serverside? For example, if the monster starts to agro towards the player, there is no way my server can handle every single request of that monster moving to validate it. It would be thousands of requests. There has to be some type of Monster / Client Prediction right? That's where I'm stuck. Not looking for code, just some design philosophy insights.