Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'GGPOEvent' object has no attribute 'frames_ahead' #1

Open
StormyNight2020 opened this issue Nov 27, 2023 · 0 comments

Comments

@StormyNight2020
Copy link

I receive this error while running my simple game inspired by the example game included with this repo. During my cbk_on_event callback, I'm trying to handle GGPO TIMESYNC events just as the example game suggests in order to idle the session for the given number of frames:

if event.code == ggpo_py.GGPOEventCode.GGPO_EVENTCODE_TIMESYNC.value:
self.session.idle(round(1000 /60 * event.frames_ahead))

The reference to event.frames_ahead is causing the issue. I'm not familiar with pybind11, but from what I can tell from py_ggposession.cpp in the src folder, all of the other GGPOEvents with specific attributes are binding them (like SYNCHRONIZING_WITH_PEER) except for the TIMESYNC event. Perhaps adding the binding for the frames_ahead attribute would do the trick?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant