Skip to content

String table sizing - rational? #107

Closed
@kalmard0

Description

@kalmard0

I'm working on an ink-based game. I have a function in the game that creates a character sheet, listing the player's posessions. There are about 30 possible items (global boolean variables) and the text is generated dynamically depending on whether the player has each item.

This funcion, when more than ~10 items are present, crashes inkcpp due to the string table filling up.

Of course I can increase the size of the string table and call it a day, but I would like to understand this problem in a bit more detail.

  1. Is this expected behavior? Or is it possible that I messed up my code or there's a memory leak?
  2. What's the overhead of the string table's size? Are we talking bytes per unit, or kilobytes per unit?
  3. Why not have a significantly larger default size?
  4. What size should I set to ensure that this never-ever-ever can happen in my game?

As a short-term solution, I'm planning to send a pull request that allows overriding the default size via a define. But if you'd rather just me set a significantly higher default size, that works too.

The ink script is proprietary, but if absolutely needed, I can spend some time creating a derived version as a proof-of-concept for this crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions