0

I have the following goal: I have a multiplayer game where are thousands of characters with unique abilities. These abilities switch on or switch off at particular times - ie. it might switch on at 3pm. and it might switch off at 3.05 pm. I was thinking to implement it as a global counter with events attached to it so that when the time comes, the event gets triggered, and the ability is switched on. How can I achieve that in Java? If I spawn too many threads, it might take down the system because there are too many characters. Which tool (or maybe other method) should I use?

4

1 回答 1

1

试试Quartz 调度器,我们在从小型到大型企业应用程序的项目中使用它。

于 2013-06-30T13:39:18.863 回答