from Hacker News

Show HN: Multiplayer NES Server in 77 Lines of Go

by ola on 5/27/15, 1:02 AM with 19 comments

  • by sschueller on 5/27/15, 6:48 AM

    mmm, not sure if doing this counts as using 77 lines of code:

      import (
    	"github.com/gin-gonic/gin"
    	"github.com/gorilla/websocket"
    	"github.com/olahol/melody"
    	"net/http"
    	"sync"
      )
    
    But still impressive.
  • by andrewliebchen on 5/27/15, 4:17 AM

    It might be simple, but it's certainly not simplistic :)
  • by eynix_ on 5/27/15, 12:43 PM

    I don't get the difference between github.com/gorilla/websocket & github.com/olahol/melody. Does someone have a clue ?
  • by tokenrove on 5/27/15, 2:05 PM

    It would be nice to see state-synchronization using rewinding like GGPO, instead of just sending the inputs which introduces a lot of latency.
  • by geff82 on 5/27/15, 3:25 PM

    So how many stories "X in Go" or "Y in Rust" a day will we have in future? Its a bit much currently...
  • by SpaceManNabs on 5/27/15, 6:33 AM

    Is there any documentation around? I have no idea how any of this code works, and it doesn't seem to similar to the web apps that I have seen before. Haven't worked with melody before either...
  • by mappu on 5/27/15, 6:56 AM

    What's the best solution in Go to support graceful degradation for browsers without websockets / networks that disallow it?
  • by oknoorap on 5/29/15, 12:39 PM

    well done, impressive.