|
Post by xavier on Oct 22, 2016 10:54:09 GMT -8
Hi! I'm trying to find out if it's possible to create a web visualization using a library like threejs. My goal is to create 3D environments (board, pieces, ...) and to improve the playing interactions. Can anyone tell me where I can find the GGP javascript implementation? I noticed that there was supposed to be a javascript implementation on the Stanford course. Or if some work as already been done regarding more interesting web visualizations?
|
|
|
Post by xavier on Nov 22, 2016 4:02:28 GMT -8
I can see this is a really nice community after having more than 60 thread views and 0 replies
|
|
|
Post by alandau on Nov 22, 2016 22:40:59 GMT -8
Hi Xavier, Sorry about that, knowledge about different systems and technical details tends to be pretty scattered. The JS libraries mentioned in the Stanford course haven't been put in version control anywhere or explicitly released under an open-source license, though I've been encouraged in person to just download the .js files from the Stanford website (games.stanford.edu, gamemaster.stanford.edu, etc.). So it's hard to give guidance on those specifically. However, game visualizations are mostly separate from those. The visualizations used on Tiltyard use XSLT to transform XML representing the game state into the visualization. (The Dresden server uses a similar approach, but with a not-quite-compatible format.) I've tried having the XSLT output HTML that contains Javascript within <script> tags, but that's harder than it probably should be; the XSLT processor can mess up quotation marks, for example. And I know Sam would like to support visualizations that use Javascript natively, but (IIRC) wants to figure out if there's a way to do this securely, and allowing code reuse would also be important. The Stanford game repository does use Javascript-based visualizations, but those aren't supported elsewhere so far. You can find them by clicking "Details" and then "View Stylesheet" for one of these games: gamemaster.stanford.edu/showgames
|
|
|
Post by xenos1984 on Nov 23, 2016 4:56:19 GMT -8
I also think that security and code reuse are important issues that need to be solved in order to support JS natively. I guess nobody would really like to package exactly the same code putting some stones on some board with every board game, so one would probably want some kind of library for standard functions.
The current way of using XSLT actually seems rather flexible, if one can transform the XML game state into different XML based output formats, such as HTML, SVG and X3D, and embed them seamlessly into the browser web page. I have used a similar approach for a web project, where XSLT is used on the server, and users can choose between different XSLT styles to view data in a different form (as a table, graphically with SVG or the like).
|
|