|
|
|
|
|
by kyle_u
3822 days ago
|
|
Holy crap, I've been waiting for someone to ask me that (I need more coding friends). The entire game is client/server. The client is pure JavaScript, and communicates with the server using only a few messages (select card, move card, etc). Normally, it connects via WebSocket to my Play Framework/Scala app, and the server processes moves and sends the results and a list of potential moves back to the client. If you download any of the native apps (iOS, Android, Linux, Win, OS X), you can play offline. This is the magic of Scala.js. The same code that my server uses gets compiled down to JS, and the client calls it directly, forgoing the socket connection. You can also see offline mode in the browser by replacing the word 'play' with 'offline'. |
|
Yep, that was it. Just tried offline mode and it's super snappy.