Results 1 to 8 of 8

Thread: Game runs out of memory and crashes. A lot.

  1. #1

    Game runs out of memory and crashes. A lot.

    I have 16 GB of ram available. I would like to be able to allocate 8 GB of memory to this game, because it's evidently required in order to play certain games/load more than a few force of will or MTG or yugioh or pokemon sets.

    I recently got a complaint from the game (followed by a crash) where it told me it was using 2.8 GB of ram, and that it gets unstable when it uses more than 3.2 GB of RAM. Why?
    is this game running in x86 or something?

    seriously, though, I need to be able to give the game more RAM to work with when I'm trying to build decks. not to mention when I try to load the deck again later. I actually tried to load one of my decks on an empty table just now, and the game crashed while trying to load my 20 card magic stone deck. I understand it has to load and process the whole set of cards, but still.

    And no, I cannot turn off full-size textures. It renders the cards impossible to read.

    If you could give me a hand in figuring this out, that would be awesome. Either a way to allocate more RAM to the game, or a way to launch it in x64.

  2. #2
    Hey TaigaCait, Welcome to the community

    TableTop Simulator is a 32 bit game, so in this situation your capped to under 4Gb.

    How big are these decks textures your using as a single 20 card deck on an empty table shouldn't put you anywhere near the memory limit ?

  3. #3
    Well, that's just the problem. The cards themselves are organized in sets, with each of these sets being loaded as a "custom deck" as far as I can tell, in order to improve the efficiency for the person who manages the mod. I think this probably also is more efficient in terms of loading the files themselves, because if they were stored as individual cards, then the game would probably crash on loading a single deck just due to loading too many things at once.

    Here's where the problem lies: the decks I'm building span multiple sets, and due to the size of the text on the cards, the textures are of a fairly decent quality- meaning they're rather large.
    my ruler is in a set with 4 other two-sided cards, so those all get loaded at once when I pull out my ruler
    my main deck has 60 total cards which are from across 4 different sets- Lapis Cluster starter decks set, L1- Curse of the Frozen Casket cards set, L2 - Legacy Lost cards set, and VIN3 - Vingolf All Star Rulers cards set.
    the set for the lapis starter decks has a total of 55 different cards in it, which isn't too bad.
    the L1-CFC cards set has 95 cards (the rulers are two sided, so they're stored in their own set. since I'm not using any of them, they're not loaded)
    the L2-LEL cards set has 95 cards (same situation)
    the VIN3 cards set has 90 cards (again, the same situation.)

    so all in all, when I pull my deck out of the bag, it has to load 6 images -two with 5 cards worth of information each, and the other 4 adding up to 335 cards worth of information- technically 339 because each of these also has a single image for the backs of the cards. I think it optimizes this, though, because it's the same image each time, so probably just 336.

    so uh. yeah.

    now I think it's a bit apparent why there's a problem.

    if TTS could somehow have a "optimize memory for playing CCGs" option or something where it only keeps the sections of the "card set" images it needs (I have no idea how you would go about doing this, because just from a programmer's stand point it seems like it would be really irritating), then that might help a bit.

    Although, now that I think about it...
    I did somehow get really lucky about not crashing the game with sheer volume of stuff the first time when I was building this deck. It seems like as long as I do it slow enough, I can occasionally manage to load way more sets of cards at once. This really really shouldn't make a difference on whether the game crashes or survives, but I can kind of understand why it would make a difference.

    I'm still crossing my fingers for an x64 version of the game, though...

  4. #4
    Couple of follow up questions for you.

    What is the individual size in Pixels for one of these cards ?

    How many Cards are you placing together in one Deck image and what is the layout number in column and rows ?

    You could well be better off producing much smaller deck images. In most cases combining decks to save memory is a sensible thing to do but if your only using a couple of cards from each image
    for your custom decks. Then you could well find doing the exact opposite will have a positive effect.

  5. #5
    I actually have no idea, since I'm not the one managing the workshop mod, but let me go take a look.

    Ok, let's see... it looks like most of the image layouts are 10 wide by 7 tall, with the average card resolution being 742 pixels wide by 1037 pixels tall.
    edit: most deck images have 69 cards and one solid black space in the last slot, it seems

    Honestly, while recreating the images in order to optimize the cards I have loaded would probably eliminate the memory problem, having to create an entire new custom card set each time I want to build a new deck (or, god forbid, having to create new custom card sets each time someone else wants to play against me with a different deck) would get terribly inefficient very quickly. Even more so considering I don't have any of the resources that are actually used in this workshop mod, which means I would have to go through the mod's JSON file and download every single image linked therein, then divide them up into individual card images so that I can recombine them at will.

    It's not really a very feasible option to fix this problem, to be honest. If this were any kind of game where I'd be using the same set of cards for a very long period of time, and anyone I played against would be exactly the same, then it would be reasonable, but this is a CCG similar to Magic: The Gathering. I imagine if I were to try to build a standard or modern deck for MTG with the MTG deck building workshop mod, I would very quickly run into the exact same issue.
    Last edited by TaigaCait; 02-19-2017 at 04:48 PM. Reason: additional information I forgot

  6. #6
    Quote Originally Posted by TaigaCait View Post
    I actually have no idea, since I'm not the one managing the workshop mod, but let me go take a look.

    Ok, let's see... it looks like most of the image layouts are 10 wide by 7 tall, with the average card resolution being 742 pixels wide by 1037 pixels tall.
    edit: most deck images have 69 cards and one solid black space in the last slot, it seems

    If that's accurate then that's a big problem. that gives you a total image size of 7420 x 7259 which is nuts for a single deck image

    Deck images, Really, Really want to be less than 4K so max 4096 x 4096

    For good quality, to keep inside these limits your images want to be in 5 wide by 4 high layout and that's a maximum without reducing your cards too much.

    with the individual cards tweaked down just a tad to 733 x 1024. to make a better fit.

    Not the sort of news you probably want to here but if those numbers are right then issues with CCG card games are not unsurprising at all and its only going to get worse the more sets you add

  7. #7
    I'll have to run some tests later today to see if that's even possible with these cards. The text on some of them is rather small, so if we reduce the resolution too much it'll become illegible

  8. #8
    Changing from742 pixels wide by 1037 pixels tall to 733 pixels wide by 1024 pixels tall. will look near identical as your only shaving a handful of pixels (about 1%)
    and that's just so your "4 tall" in the deck image will add up to a nice power of two (4096)

    what's killing you is having so many cards of that size on a single sheet,
    breaking it down into smaller numbers will most definitely help in the long run.

    Who ever first put these sets together has imbedded a problem that can only be properly fixed by starting again.

    This is all assuming your quoted numbers are correct.

Similar Threads

  1. [CRASHES] Game crashes when a new game is loaded in during a multiplayer game
    By mangobus45 in forum Technical Support
    Replies: 1
    Last Post: 01-02-2017, 06:28 PM
  2. [SOLVED] Game crashes when I join games, and it crashes when people join mine
    By blackgrue in forum Technical Support
    Replies: 6
    Last Post: 06-06-2016, 04:46 PM
  3. [SOLVED] Since v6.7, memory consumption is even higher and causes crashes
    By Wakke in forum Technical Support
    Replies: 2
    Last Post: 03-05-2016, 07:11 PM
  4. Game often crashes to desktop on linux when host closes game
    By SmileyChris in forum General Discussion
    Replies: 1
    Last Post: 08-17-2015, 03:29 PM
  5. Game crashes when trying to load custom game
    By BlazeLeeDragon in forum General Discussion
    Replies: 3
    Last Post: 06-03-2014, 02:50 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts