How do I assemble or stack two sprite images to conserve game size/speed?

0 favourites
  • 3 posts
From the Asset Store
500 monsters and creatures images for card games - Set 1
  • I'm not a game programmer, but determined to learn. I am attempting my first game – a simple Boggle-styled spelling/word game that requires alphabet tiles that look like Scrabble tiles. Each alphabet tile could appear in three different colored states. Is there any advantage to creating only 3 blank tiles (one for each possible state), and then 26 alphabet letters with transparent backgrounds that stack on the colored tiles? Wouldn't this reduce my total sprites considerably?

    Thanks in advance, and apologies for my noobiness.

    Randy

    Tagged:

  • That's a great question, and can apply to all kinds of situations, characters with different outfits or weapons and many other things.

    in your case, with just 3 colours, your total number and size of sprites will still be relatively quite small. So, it will come down to trading a slight memory improvement with a little more complicated code.

    Since this is your first game, I would recommend keeping it simple and go with making the full tile set in each colour.

    Although, there is a third option - make one set with the tile background white and black lettering, then use "Set Color to rgbEx(xxx,xxx,xxx)" to make the tile the colour you need. The background will change, but the lettering will stay black.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • creating only 3 blank tiles (one for each possible state), and then 26 alphabet letters with transparent backgrounds

    Yes, this will use less memory, especially if you crop the unused transparent space on the letters. But you need to decide if the extra effort worth it. If the images are quite small, the difference may only be a few megabytes. So you can do whatever is easier for you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)