Ankoku / df-webfort

Web Fortress
ISC License
35 stars 10 forks source link

Replace Queue with first-come-first-serve system #12

Closed Alloyed closed 10 years ago

Alloyed commented 10 years ago

So the old queue code was game-crashingly buggy in a few places. The cases for 0 active users/a single active user on the end of the queue, etc. caused a lot of SIGSEGVs, I tried fixing it but the since I kept running into the issue that having no players isn't actually valid, I figured I'd just start from the bottom and work up.

Now when nobody is playing, anybody can actively choose to play by hitting a button, and so long as you don't press anything you won't ever get asked to play. Any sort of queuing/agreement to take turns then has to happen extrinsically, in chat or whatever. I figure this is not a huge problem because we're all big kids, but if it turns out to be a problem I can always add more structure onto it later.

IMPORTANT: This is a breaking change, you will need to build/replace the plugin for this to work. I have no idea what that means when it comes to windows, so you're sort of on your own there, unless you're willing to replace Windows with Ubuntu, in which case I probably can just copy-paste the binaries I've been making.