Skip to content

Coontroller Input Handling #109

@MatthewBregg

Description

@MatthewBregg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions