Open projectdelphai opened 9 years ago
Seeing as most things happen on a move-by-move bases I think a move based solution would be the most effective. Though where to implement this - LocationManager, Location or the move command in CommandPrompts is an issue...
Maybe after the move command, call a trigger that would see if enough time has passed and if it has, respawn the necessary npcs.
Maybe we could count moves as ticks? Then after so many ticks regen the NPC from the file.
ETA: If it's still planned to be server/client, then maybe the server should handle ticks, just to keep them consistent across multiple clients.
For server/client, a global clock makes sense. If that can be implemented in the standalone too, that is great. Otherwise a move counter as ticks is consistent with the rest of the standalone game
I think the only way to implement ticks in a fair way would be after each loop of the gamePrompt()
function. If I knew better how the server is started up then I would know better where to put the serverside Tick Controller (TickController.java?)
I'm going to start implementing this on my fork. Will probably put the TickController in the base package unless someone has a better idea
So if I kill a brotherhood member, after I cross say 20 tiles or once sufficient time has passed, a new brotherhood member should appear.