JoustMania
JoustMania copied to clipboard
Look into python asyncio/callback functions
Currently each controller gets it's own process but the logic loop is as follows: get controller reading do game logic ect.....
instead with async or callback functions we can do as follows: do game logic (new sensor reading come in) process sensor reading continue to do game logic until new sensor reading ect..
This paradigm should make things much smoother especially when paired with an EKF as well.
Need to process both frames for faster and better response: https://github.com/thp/psmoveapi/blob/85d7eadcf818f34163e2ff23556f06934d9643d8/include/psmove.h#L170
currently joustmania uses if move.poll(): which I believe is only using the most up to date data, we should update this to use while move.poll(): to get all data from the controllers
Detecting dropped frames: https://github.com/thp/psmoveapi/blob/85d7eadcf818f34163e2ff23556f06934d9643d8/include/psmove.h#L655