You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wait. We need to talk about all the queues and the infinite loop problem and stuff. Right now, the online version works in the dungeon, but my screen won't refresh if someone else sends commands to my map. I have to press a key for the screen to refresh. I can either make it so that when one person moves, everybody IO_Bundles sent to them (not a good idea) or I can ask the Controller to ask for a new IO_Bundle every 500 milliseconds if no key command interrupt was received. I think the second would be better. I also added a lot of print statements to master to make it easier to find out what is causing the bug. But I think the whole queue thing is a bad idea and that you don't actually need to store key commands at all - just run the first command that you receive and if the user is too quick and overwhelmed the controller with too many commands just ignore those. @MatthewBregg
Collaborator
MatthewBregg commented 27 seconds ago
As for the above, yeah, that could be set simply by reducing the sleep.
I think the queues are a better solution than not having the queues, and it's literally more or less the solution from the book.
Dropping commands should be a last resort.
The text was updated successfully, but these errors were encountered:
Exception in Internet.sendStuffToMap(avatar, DO_ABSOLUTELY_NOTHING,...) named: java.io.EOFException
java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2598)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1318)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at src.Internet.sendStuffToMap(Internet.java:100)
at src.io.controller.GameController.sendCommandToMapWithText(GameController.java:199)
at src.io.controller.GameController.updateViewsAndMap(GameController.java:273)
at src.io.controller.GameController.takeTurnandPrintTurn(GameController.java:281)
at src.io.controller.Controller.takeTurnandPrintTurn(Controller.java:110)
at src.io.controller.Controller.process(Controller.java:94)
at src.io.controller.GameController.process(GameController.java:299)
Using internet to sendCommandToMapWithText
at src.io.controller.Controller.sleepLoop(Controller.java:76)
at src.io.controller.GameController.(GameController.java:159)
at src.RunGame$2.run(RunGame.java:220)
at java.lang.Thread.run(Thread.java:745)
Wait. We need to talk about all the queues and the infinite loop problem and stuff. Right now, the online version works in the dungeon, but my screen won't refresh if someone else sends commands to my map. I have to press a key for the screen to refresh. I can either make it so that when one person moves, everybody IO_Bundles sent to them (not a good idea) or I can ask the Controller to ask for a new IO_Bundle every 500 milliseconds if no key command interrupt was received. I think the second would be better. I also added a lot of print statements to master to make it easier to find out what is causing the bug. But I think the whole queue thing is a bad idea and that you don't actually need to store key commands at all - just run the first command that you receive and if the user is too quick and overwhelmed the controller with too many commands just ignore those.
@MatthewBregg
Collaborator
MatthewBregg commented 27 seconds ago
As for the above, yeah, that could be set simply by reducing the sleep.
I think the queues are a better solution than not having the queues, and it's literally more or less the solution from the book.
Dropping commands should be a last resort.
The text was updated successfully, but these errors were encountered: