On 22 April 2011 08:16, Jeff Johnson <[email protected]> wrote:
> I've been doing some more digging and found that if I want to do an online
> tiles client right (meaning send game information to the client and not tile
> information), we'll need to implement most of tilepick.cc in the Javascript
> client.  Parts of tilepick.cc know too much, so we'll have to dumb-down the
> information, that's not a problem.
>
> Getting the TILE_GOLD enums into the Javascript client will be easy.  It's
> just a modification of the tile utility.  Getting the enum.h enums into the
> Javascript client is a bigger pain.  I see three choices:
>    1)  Type in all the values by hand.  Not good because they will always be
> out of sync.
>    2)  Write a parser to read enum.h and output Javascript.  Possible, maybe
> fragile and has some dependencies on keeping enum.h around.
>    3)  Wrap all enum.h enums in a macro so it can be optionally compiled to
> emit Javascript.  Nice, but makes enum.h look a bit messy.

To me, option 2 sounds like the most sensible one. It might be
worthwhile to split enum.h into two files beforehand: One for enums
that actually are required for the tiles client (including abilities
as those are going to get tiles at some point in the future) and the
other for the rest (e.g. activity_interrupt_type, attribute_type, ...)
That will require modifications to all files that include enum.h, so
pretty much all of them, but the splitting of large files is generally
welcome, so such a change is likely to be merged into the main code
even independently of the rest of your modifications.

Also, the tilepick mappings differ wildly in complexity. A lot of
tiles simply use enum-to-tile mappings, but some of them use special
checks to decide on the actual tile to be used (depending on the
current branch, for example, on some monster properties etc). The
latter might be too complicated for the client (maybe that's what you
mean by "dumbing down"), but some of the checks could probably be
simplified. Conversely, it might be possible to split the simple
mappings into a text file which is parsed to generate both a cc file
and a javascript one. (Similarly to how art-data.txt is parsed.)

> Also, if I ever get some code that should be committed, what is the process
> to get git access?  Are there code reviews or are commits approved?

You don't commit directly into the main repository, but you can create
a new branch (don't ask me how, though) that the team can then review
and cherrypick whichever commits seem appropriate.

Good luck with your project!

Johanna <- *waves into the round* Still alive, see? :)

------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Crawl-ref-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crawl-ref-discuss

Reply via email to