On 14 December 2010 22:41, Adam Borowski <kilob...@angband.pl> wrote:
> On Tue, Dec 14, 2010 at 09:37:20PM +0100, Johanna Ploog wrote:
>> On 14 December 2010 20:53, Adam Borowski <kilob...@angband.pl> wrote:
>> >> Storing tiles strings (instead of numbers) would fix both of these
>> >> issues, but would bloat the save file nastily.
>> >
>> > Here's a crazy idea: what about instead saving a hash of the filename?
>>
>> If you mean the stringified enum that also is used for vault
>> definitions, how is that a crazy idea?
>
> This stays unchanged, right?

It _does_ change occasionally but _really_ rarely, like you've
originally got just one version (say TILE_DOOR) and then we add
variants, so the base version is renamed to something appropriate
(e.g. TILE_DOOR_BROWN). In that case, if the enum is no longer valid,
falling back on the default tile should be okay.

> But then, I realized that this may be an overkill, and it wouldn't be that
> costly to produce a "palette" of tiles present on the level.  It appears
> that most levels have only 10ish distinct tiles, and hardly ever more than
> 20.  Storing a list of that 10-20 names wouldn't be too bad.

Since variants would be handled by the hash, yeah, not a lot of distinct tiles.

> Mostly, yeah.  We still need to save tiles that have been explicitely
> modified, but this way the rest (ie, everything on the level in a vast
> majority of cases) can be tossed away.

With "explicitly modified" = "defined in vaults", right?

Cool, sounds like a plan.

Johanna

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Crawl-ref-discuss mailing list
Crawl-ref-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/crawl-ref-discuss

Reply via email to