-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Serial Transfer to share High Scores in Part 2 #42
Comments
I think this would be simple enough. We could have a “versus” mode where by doing well one player could send ships over to the other side like in some versions of Tetris. Both systems could also trade high scores when linked. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@quinnyo maybe you're interested in this? |
Yes, I'm keen to have a go at this. To clarify the scope, let me know if I've got this right:
Also, maybe I'm missing something, but it looks like the score keeping for Part 2 hasn't been implemented yet? |
I've been slowly trying to crack this as well, but I don't have much experience with serial transfers...
From what I've read this is most likely going to be implemented somewhere in #39 |
I think that was the idea (to leave it to exercise to the reader) but I think it would be better at this point to leave #39 to focus on "introducing separate "scenes", and the transitions between them" while a proper score system can be presented in another lesson. I created #82 about that. It also looks like a scoring system would require first some basic notions about rendering decimals etc so that could be a separate task as well, as suggested by @XoToM in #81. In parallel, this task (Serial Transfer) can now give those details for granted and just "expect" to find high score data somewhere known and focus on the exchange/protocol/sync part. |
Yep, seems like a good plan, this issue shouldn't really care about the scoring system, we can just "imply" the values to "send" are stored somewhere and the one we'll received will be saved locally |
That alone I'm anticipating to be quite difficult: syncing two Game Boys is very error-prone in the face of any bit being possibly lost. Timeouts are essentially mandatory, since then the two GBs' very byte boundaries will get desynced—but I doubt any emulator supports that, further complicating testing. Knowing myself, that would translate to a lot of bringing up edge cases, and thus more back-and-forth than usual on the implementation. Thus I'd suggest the following steps:
Footnotes
|
Thanks for the suggestions and advice!
To be sure, I'm not expecting it to be easy. The error detection and handling will likely be one of the more significant parts of the impl/development. (The challenge of it is probably largely responsible for my interest in the subject.) |
This lesson will introduce how to work with the 2 serial registers SB (0xff01) and SC (0xff02) in order to get a variety of multiplayer capability in the game.
As a starting use case, this code should be used to add a very simple multiplayer feature to Part 2: share the saved high scores between different Game Boys.
Note
When trying to transfer a bit when the other GB isn't connected, the bit received is 1. I don't think that's documented anywhere?
The text was updated successfully, but these errors were encountered: