With regard to temporary status(es) and all that, excluding them from implementation initially would simplify the task of getting a basic online tiles version up and running, certainly, but when it does come time to implement them you can use a delta-based implementation for those as well (so as to prevent having to send a 'status' => 'berserk_exhausted', or other status-related conditions) on every turn.
Could just as easily add a 'add_status' => 'berserk_exhausted' and then - 10 turns later, or whenever send a 'remove_status' => 'berserk_exhausted' and depend on the client to continue to display "Exhausted" until a "remove_status" is received to clear it. Regards, Robert Burnham On Thu, Mar 31, 2011 at 2:57 PM, Jeff Johnson <[email protected]>wrote: > 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/crawl-ref-discuss > >
------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/crawl-ref-discuss
