How should a game handle long lengths of time?
For example, if a player orders some rare item from afar, and it is meant to take 2 hours to reach their inventory, what is the best way to go about programming that in BYOND? Surely a 2 hour sleep() would be truly ridiculous.
Furthermore, what happens if the server crashes in that time? They've already paid for the item; they need to receive it.
ID:1312206
Jul 3 2013, 2:56 am
|
|
I personally would write a item delivery scheduler. It would be told what items to deliver to who and when. Then you just save it and load it.
|
How do you do "and when" though? Check every tick if it holds some items to be delivered at that second?
|
Haha, I knew there was a lib out there that would help with this, and I suspected you were the author Stephen. I'm currently developing another section of my project, but once that's done I'll have a thorough look at your library and see if it will facilitate the development of the next section.
(Once I have a concept concreted in my mind I build it, and with the spare mental time start thinking and conceptualizing the next section) I suspect you'll have to deal with me pestering you a bit when that happens :P |
This has given me an idea for my event scheduler library.