Currently Im working on the monster system (hide/unhide/spawn/respawn) etc and I would like to know how the pro do this?
Currently I have so much code that I dont even know what I did nor do I have an overview anymore. And of course it is not working correctly.
Now I was wondering how the pro do this?
A game with 5000+ monsters per map.. A player log in but of course he should only load the monsters which are in a certain radius.
While running the server will check if near the characters are monsters -> true = unhide and false = do nothing.
And a second check for if monsters are too far -> true = unhide and false = do nothing.
Of course there is 1 big list with all the monster data and 1 list per player which contain the data which monsters are shown and which not.
But now what about the monsters which are dead? A third timer for them ? If the death time from a monster finished then he will respawn and everyone in the monster radius will get an input into his list that the monster is there?
If anyone could tell me "step-by-step" how the monster system should work? Like
- Player log in and only unhide the monster in his area.
-Timer to check players current position and unhide monsters if there are some in his area..
The more I work on this the more my brain starts to think different and I make everything more complex than it actually is...