Hi Henry, You are correct, that's a better way to do it. I was hoping for a nice shortcut to duplicate the Tiles GUI easily. :)
Are you are proposing to send only the delta's (new state changes) or a full representation of the state data? Are delta's tracked already or would we need to store a duplicate copy of each state data object? How would we determine what should be sent and what should not be sent? For example, looking at the player class, should the 'berserk_penalty' be visible to the user in some form? I'm not sure I can judge properly on many cases. Maybe we start off very restrictive and only add items that are less obvious as needed. For your Step 2 (deltas to JSON), I image it's just a function like: string MakePlayerDeltaJSON(player * you); And that function just pick the fields it wants to export and returns a huge string worth of data. Is that what you are thinking? If so, this sounds easy enough without me knowing much about the other state objects. The message window stuff appears to assume a local GUI, in message.cc, message_window::out_line() it directly calls 'cprintf()'. This looks sticky, and I'm not sure the best way out of it yet. The more that I think about this overall approach, I guess these JSON blobs could be used to record and playback a game, right? Is there any ability to do record/playback now? I haven't seen any, but I'm not familiar with all aspects of non-tiles or online play mode. Keep the great ideas coming! Best Regards, Jeff
------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________ Crawl-ref-discuss mailing list Crawl-ref-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/crawl-ref-discuss