From: Henry C. <hci...@gm...> - 2010-10-28 04:29:26
|
Hi guys, henryci here. This is my first email to the list so pardon any etiquette fails. If this is the wrong forum for such an email please redirect me. Even though I've never actually played the tiles version, I believe in the vision because I think it would help with new player uptake. Imagine a simple website which plays tiles on CAO over websockets and pulls in data from Henzel and the learndb. There is currently a document outlining how to get there: https://crawl.develz.org/wiki/doku.php?id=dcss:brainstorm:internal:clientserver However, my impression is this plan has been around for a while but hasn't actually gained much traction. If that is incorrect, I apologize. I think the milestones laid out are well thought out and paint a good picture. But I was wondering about (and volunteering myself for) a different approach. Proposal: 1) Clean up viewmap.cc:showmap() and while doing so remove the #defines for tiles. Instead the code should have different output modes: 'text' and 'tiles' w/o a recompile. There are other reasons why one binary couldn't run both versions of the game, but binary unification isn't the goal of this project. 2) Add a new output mode, 'json', which causes all output to be written to a JSON blob. The same output as the text mode, a map w/ glyphs, list of monsters on screen, etc except all this gets written to a JSON object which is then printed to STDOUT. Now, you should be able to ssh in and play the game in JSON mode. exciting. 3) Write a small python script which creates a websocket server and launches crawl, in JSON mode, forwarding STDIN and STDOUT appropriately. 4) Write a web client which connects via websocket and allows players to play the game, in JSON mode, over the web. 5) Update that client to actually parse the JSON and draw the map and info based on the values in the JSON. Sky is the limit here b/c you can look up monsters in the leardb and show Henzel stats like "this monster has killed you 12 times." At this point working tiles net-play has been achieved. It would then be possible to revisit the previously defined milestones and tweak the JSON format as appropriate. For example, after the refactoring in the second milestone is complete the JSON blobs could become updates instead of full refreshes of the game. Eventually the text and tiles versions of the games can be dropped and every client uses the client/server model reading in the JSON. At this point I'm curious for feedback. Am I completely off the mark and need to go back to newb school? Alternatively, is there something here that I can start working on to show progress and generate excitement? Thanks for your time, -- Henry Cipolla |