Right now my game engine is plain Scala, and compiles to JavaScript, Scala (JVM), and Native through LLVM. The client is Scala.js, talking either to a local JS game service, or over a websocket to Scala for server games. I wrote a dumb depth-first solver, and a few other clients. All of these pieces speak the same API language, composed of the minimum amount of message types, namely the following:Requests: "Select Card (id)", "Select Pile (id)", "Move Cards (ids, src, tgt)", "Undo", and "Redo".Responses: "Card Hidden (id)", "Card Revealed (id)", "Cards Moved (ids, tgt)". Each response also carries a sequence of possible moves.I bring this up because I think it would be really cool if my client could use PySolFC's (or anyone else's) games on the server. I hate making or porting solitaire games, so using the community's hard work is pretty appealing.
It looks like there's already a pretty clean separation between PySolFC's UI and logic.
What's the pythonic way to run a headless server, passing game messages back and forth? Would this be simple for PySolFC?
--
You received this message because you are subscribed to the Google Groups "FOSS Card Games" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foss-card-games+unsubscribe@googlegroups.com.
To post to this group, send email to foss-card-games@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/foss-card-games/4de7816e-cf3a-45c5-a4d9-1087f1d89ff8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Kyle!See below for my reply,
On Sun, May 21, 2017 at 9:55 PM, Kyle Unverferth <ky...@kyleu.com> wrote:Right now my game engine is plain Scala, and compiles to JavaScript, Scala (JVM), and Native through LLVM. The client is Scala.js, talking either to a local JS game service, or over a websocket to Scala for server games. I wrote a dumb depth-first solver, and a few other clients. All of these pieces speak the same API language, composed of the minimum amount of message types, namely the following:Requests: "Select Card (id)", "Select Pile (id)", "Move Cards (ids, src, tgt)", "Undo", and "Redo".Responses: "Card Hidden (id)", "Card Revealed (id)", "Cards Moved (ids, tgt)". Each response also carries a sequence of possible moves.I bring this up because I think it would be really cool if my client could use PySolFC's (or anyone else's) games on the server. I hate making or porting solitaire games, so using the community's hard work is pretty appealing.It is.It looks like there's already a pretty clean separation between PySolFC's UI and logic.Possibly. I'm still not intimately familiar with the code.What's the pythonic way to run a headless server, passing game messages back and forth? Would this be simple for PySolFC?Python supports:1. Plain synchronous and async sockets.2. HTTP servicing using https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface .
3. https://en.wikipedia.org/wiki/Twisted_(software) , https://docs.python.org/3/library/asyncio.html and possibly similar async/events frameworks.4. There's also https://en.wikipedia.org/wiki/Pyjs for compiling python into JS and https://en.wikipedia.org/wiki/Jython for compiling to the JVM , and https://en.wikipedia.org/wiki/Cython for compiling to C (etc.)Is there anything else you need?
--
You received this message because you are subscribed to the Google Groups "FOSS Card Games" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foss-card-gam...@googlegroups.com.
To post to this group, send email to foss-ca...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/foss-card-games/4de7816e-cf3a-45c5-a4d9-1087f1d89ff8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ok, I may spend some time trying to get a "headless" PySolFC running.
Have you been able to get it running on OSX? I'm testing it in a Linux VM.
To unsubscribe from this group and stop receiving emails from it, send an email to foss-card-games+unsubscribe@googlegroups.com.
To post to this group, send email to foss-card-games@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/foss-card-games/f7a9dd5f-e6ed-48d9-902d-23f76b8c0d02%40googlegroups.com.