Mobile app version of vmapp.org
Login or Join
Turnbaugh909

: Creating a sprite sheet of letters and numbers for a mobile word game I would like to ask for a general advice on how to use Inkscape to create a "sprite sheet" of letters and numbers. I

@Turnbaugh909

Posted in: #ImageSprite #Inkscape #Sprite #Text

I would like to ask for a general advice on how to use Inkscape to create a "sprite sheet" of letters and numbers.

I am developing a Scrabble-like word game and initially was planning to display the letters and values on the letter tiles programmatically:



Unfortunately, while it seemed to work at the emulator (see above) - it fails on real devices (see below):



So my new plan is to create an SVG file in Inkscape and then export it as PNG files (Android wants different resolutions of asset images for different classes of devices)...

For this I have enabled grid 15x15 in Inkscape Document Properties:



and have toggled the Snap bounding box corners.

I have 2 kind of tiles - the small tiles at the game board are 45x45 (here and further - for the drawable-mdpi class of devices) and the big tiles are being dragged and should be 128x128.

That is why I have set the grid to 15x15 when creating small tiles: I'd like to put a letter in the 30x30 cell and its value in the 15x15 cell (at the right and below the letter).

My question is: how to approach this problem in Inkscape in the most effective way and so that I can alway return to the SVG file and adjust it?

I have created 2 text strings - "ABCDEFG...XYZ" and "12345678910":



But how to split and resize them (without distorting the font)?

I have tried selecting in the menu Path - Break Apart and also Object - Ungroup - but there is no effect.

(I was hoping this would split the text strings into letters and I would drag them around in my grid and also resize them).

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Turnbaugh909

1 Comments

Sorted by latest first Latest Oldest Best

 

@Reiling762

I am not entirely sure that I unterstood correctly what you want to do, but I suggest the following:


Create one sample tile with every text aligned as you wish using the corresponding text alignment. I.e., your letter is not only centred optically but also the text-alignment is centred. Your number should be probably right-aligned.
Replace the letter with XXX and the number by YYY.
Save that file.
Write a small program that goes through all letters and for each:

Creates a copy of your file.
Replaces XXX with the letter and YYY with the value in the XML source of the file in that copy. You can always change this file if desired.
Export that copy to whatever format you need using command-line options to Inkscape.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme