[{"data":1,"prerenderedAt":251},["ShallowReactive",2],{"project-9608653":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":42,"post_text":44,"what":45,"said":78,"maker_in_thread":161,"shape":166,"grid":170,"attempts":212,"same_week":213,"maker_shows":43,"maker_hidden":243,"reader_version":244,"card":245},"9608653","melody-jsnes","Multiplayer NES Server in 77 Lines of Go","title","Show HN: Multiplayer NES Server in 77 Lines of Go","https:\u002F\u002Fgithub.com\u002Folahol\u002Fmelody-jsnes","github.com","ola",1432688522,2015,127,19,177,2565,7,"notable","games","multiplayer nes demo","web_app",[24,25,26,27],"multiplayer nes","websockets","go websocket","jsnes","debated",-0.012,{"positive":31,"neutral":32,"mixed":33,"critical":32},4,5,1,15,{"idea":36,"execution":37,"docs":40,"performance":41},{"positive":33,"critical":31},{"positive":38,"critical":39},2,0,{"positive":33,"critical":39},{"positive":39,"critical":33},[43,33,33,33,33,32,43,39,33,39,39,43,39,32,32,43,43,43,32],3,null,{"problem":46,"audience":44,"pricing":44,"motivation":53,"time_to_build":44,"stack":60,"openness":76,"stage":77,"team_size":76},{"value":47,"source":48,"evidence":49},"Lets two players play an NES game together in the browser","inferred",[50],{"id":51,"by":11,"text":52},"9609719","The server works by using HTML5 Websockets (https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWebSockets) which allows browsers to do full duplex communication with the servers (they can…",{"value":54,"source":55,"evidence":56},"Demo Go websockets with a simple project","maker",[57],{"id":58,"by":11,"text":59},"9611528","I think that would be a beyond the scope of this project which is to demo Go websockets, I wanted to keep it as simple as possible and not hack the JSNES source code. Although it…",[61,66,72],{"value":62,"source":55,"evidence":63},"Go",[64],{"id":65},"post",{"value":67,"source":55,"evidence":68},"Melody websocket framework",[69],{"id":70,"by":11,"text":71},"9611288","It's a higher level framework built on top of github.com\u002Fgorilla\u002Fwebsocket . Some features include * Clear and easy interface similar to net\u002Fhttp or Gin with event handlers. * A…",{"value":73,"source":55,"evidence":74},"JSNES",[75],{"id":51,"by":11,"text":52},"unknown","prototype",{"praise":79,"objections":99,"requests":119,"questions":124,"alternatives":146},[80,92],{"value":81,"source":82,"evidence":83},"Impressive demo for its size","commenter",[84,88],{"id":85,"by":86,"text":87},"9609708","sschueller","mmm, not sure if doing this counts as using 77 lines of code: ``` import ( \"github.com\u002Fgin-gonic\u002Fgin\" \"github.com\u002Fgorilla\u002Fwebsocket\" \"github.com\u002Folahol\u002Fmelody\" \"net\u002Fhttp\" \"sync\"…",{"id":89,"by":90,"text":91},"9624159","oknoorap","well done, impressive.",{"value":93,"source":82,"evidence":94},"Clean, not simplistic",[95],{"id":96,"by":97,"text":98},"9609305","andrewliebchen","It might be simple, but it's certainly not simplistic :)",[100,112],{"value":101,"source":82,"evidence":102},"Title overstates it: emulation is in JavaScript and imports are large",[103,104,108],{"id":85,"by":86,"text":87},{"id":105,"by":106,"text":107},"9609731","mrweasel","Also the NES emulation is done in Javascript, making the 77 lines a little less impressive. It's \"just\" server for handling multiplayer part.",{"id":109,"by":110,"text":111},"9609973","vog","Indeed, the title is a bit misleading.",{"value":113,"source":82,"evidence":114},"Input latency from sending inputs rather than state sync",[115],{"id":116,"by":117,"text":118},"9611382","tokenrove","It would be nice to see state-synchronization using rewinding like GGPO, instead of just sending the inputs which introduces a lot of latency.",[120],{"value":121,"source":82,"evidence":122},"State synchronization with rollback like GGPO",[123],{"id":116,"by":117,"text":118},[125,132,139],{"value":126,"source":82,"evidence":127},"Difference between melody and gorilla websocket",[128],{"id":129,"by":130,"text":131},"9610913","eynix_","I don't get the difference between github.com\u002Fgorilla\u002Fwebsocket & github.com\u002Folahol\u002Fmelody. Does someone have a clue ?",{"value":133,"source":82,"evidence":134},"Best Go option for fallback when websockets are blocked",[135],{"id":136,"by":137,"text":138},"9609747","mappu","What's the best solution in Go to support graceful degradation for browsers without websockets \u002F networks that disallow it?",{"value":140,"source":82,"evidence":141},"Is local multiplayer for other games possible this way",[142],{"id":143,"by":144,"text":145},"9612455","edc117","That's really neat - forgive my ignorance on the subject, but how possible is something like this for local multiplayer games in general (outside of NES)? With all the streaming…",[147,154],{"value":148,"source":82,"evidence":149},"SockJS",[150],{"id":151,"by":152,"text":153},"9609794","jkarneges","Something using the SockJS protocol. A quick google search for \"sockjs go\" brings up multiple options.",{"value":155,"source":82,"evidence":156},"socket.io and go-socket.io",[157],{"id":158,"by":159,"text":160},"9610861","rvrv","Maybe socket.io and go-socket.io. Socket.io support multiple transports.",{"comments":43,"answered":38,"key":162},[163,164,165],{"id":70,"text":71},{"id":58,"text":59},{"id":51,"text":52},{"commenters":167,"max_depth":31,"maker_replies":43,"first_comment_mins":168,"lifespan_hours":169},16,196,60,[171,173,175,176,179,182,184,186,188,190,192,196,199,200,202,205,208,209,210],[85,39,43,172,86,39],"project\u002Fmixed\u002Fidea",[105,39,33,174,106,39],"project\u002Fcritical\u002Fidea",[109,39,33,174,110,39],[177,39,33,174,178,39],"9610454","reedlaw",[180,39,33,174,181,39],"9610011","shultays",[96,33,32,183,97,39],"project\u002Fpositive\u002Fexecution",[129,38,43,185,130,39],"project\u002Fneutral\u002Fdocs",[70,38,39,187,11,33],"maker\u002Fneutral\u002Fdocs",[116,43,33,189,117,39],"project\u002Fcritical\u002Fperformance",[58,43,39,191,11,33],"maker\u002Fneutral\u002Fidea",[193,31,39,194,195,39],"9612012","other\u002Fneutral\u002Fnone","geff82",[197,32,43,185,198,39],"9609656","SpaceManNabs",[51,32,39,187,11,33],[143,32,32,201,144,39],"project\u002Fpositive\u002Fidea",[203,32,32,204,198,39],"9612894","maker\u002Fpositive\u002Fdocs",[136,206,43,207,137,39],6,"project\u002Fneutral\u002Fnone",[151,206,43,207,152,39],[158,206,43,207,159,39],[89,18,32,211,90,39],"maker\u002Fpositive\u002Fexecution",[],[214,219,224,229,234,238],{"id":215,"name":216,"points":217,"category":218},"9588128","Visa Explorer",582,"data",{"id":220,"name":221,"points":222,"category":223},"9604203","jsblocks",337,"languages",{"id":225,"name":226,"points":227,"category":228},"9583384","jsgraphs",328,"dev_tools",{"id":230,"name":231,"points":232,"category":233},"9610509","An old rotary phone converted into a mobile phone",222,"hardware",{"id":235,"name":236,"points":237,"category":228},"9583976","InboxSDK",176,{"id":239,"name":240,"points":241,"category":242},"9598972","Typedetail.com",137,"creative",false,"v2",{"id":246,"name":5,"line":6,"ai":243,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":247,"top":18,"kw":248,"maker":11,"domain":10,"tier":19,"attempts":39,"strip":249,"url":9,"mix":250,"praise":81,"objection":101,"sub":21},9608653,-0.01,[24,25,26,27],"3111153010030553335",[31,32,33,32],1793990925087]