From: David B. <dav...@gm...> - 2011-02-14 15:08:33
|
Hi Aviral, On Mon, Feb 14, 2011 at 1:25 PM, Aviral Dasgupta <avi...@gm...> wrote: > Hi. > I had some time today, after my exam, so I had a good look at TuxMath, and > the LAN Server. Here are a few things that I want to point out: > > XXX Bug #1: The StopServer method will only work if you're running the > server using pthread_create and not if you're using system. It currently > works by setting a (local) flag, which will obviously not work with system, > as the server will be running on another process altogether. Don't have time to test it right now, but I'm pretty sure that StopServer() works both ways. The "quit" flag is in the scope of server.c, which is where RunServer() is, so it ought to work. > XXX Bug #2: The server's sending out a "flurry-of-questions" when the game > starts, but works fine otherwise. Implementing logic similar to that in the > non-LAN game should fix this. That's leftover from our initial design where the client had a queue of questions to pull from, and the server refilled it as needed. It turned out that it was difficult/impossible to keep the clients tightly synchronized. So a couple of weeks ago I got rid of the "queue" in game.c, so now the comets appear immediately when a new question is received from the server. I must have forgotten to get rid of the initial question load. However, the server is still supposed to send enough questions to supply the number of comets that are supposed to appear on the screen initially, with a brief interval between each. > It would be *kinda good* to have a bug tracker. Has the project ever > considered having a *proper* one? Like many other things, considered but "just haven't gotten around to it". > I can't reproduce the bug that you were (David was) talking about > yesterday(?); the one in which a server would "reply" that a game was still > in progress even after all the players had left. > > I don't want to sound pessimistic, but the current system seems hopelessly > broken. I think we should try and fix these bugs, push out a new release, > and rewrite the entire thing from scratch. I'm working on Bug #1: I think > the best solution would be to add another message to make the server quit. See above. But I don't think we should let the clients shut down the server. David |