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

Web based front-end #31

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Web based front-end #31

wants to merge 5 commits into from

Conversation

lk16
Copy link
Contributor

@lk16 lk16 commented May 7, 2020

I am working on a web based front-end for goboy, using websockets.

  • video is sent frame-by-frame as base64 encoded PNG
  • input is sent back from the browser over the same websocket

The current state is crude but working implementation, which I just hacked up in the last hour or so.

Screenshot:
Screenshot_2020-05-07_21-58-43

How to run? Something like this:
go run --tags gtk_3_10 ./cmd/goboy/main.go -frontend web ~/yellow.gbc
Then go to http://localhost:8080/ to play.

Some things to be improved:

  • sound is still sent via the oto.Player, this could be sent over the websocket as well
  • current implementation assumes at most one button press/release per "frame"
  • converting from 3D array of bytes to PNG is slow (this is independent of this PR, I have some fixes on another branch)
  • the html and js code are not that great.
  • the jquery library is outdated. I reasoned that we don't want to depend on external resources, so the jquery is in the repo.

Please check it out and let me know what you think!

@codecov
Copy link

codecov bot commented May 8, 2020

Codecov Report

Merging #31 into master will decrease coverage by 2.89%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
- Coverage   71.13%   68.23%   -2.90%     
==========================================
  Files          23       25       +2     
  Lines        2494     2600     +106     
==========================================
  Hits         1774     1774              
- Misses        685      791     +106     
  Partials       35       35              
Impacted Files Coverage Δ
pkg/gb/io/dummy.go 0.00% <0.00%> (ø)
pkg/gb/io/pixelgl.go 0.00% <0.00%> (ø)
pkg/gb/io/web.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbdadbd...39ea116. Read the comment docs.

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

Successfully merging this pull request may close these issues.

None yet

1 participant