Hamish <
thomas....@gmail.com> wrote:
> Thanks for the advice Björn,
>
> I think I'll stick with three spritesheets, each measuring 25 by 40
> tiles. 1000 slots makes for a tidy index and plenty of room for
> expansion.
>
> Just to clarify, my textfile should look like
>
> 000 bandit
> 001 bandit with knife
> 002 bandit with club
> ...etc
That looks just fine to me. The most important thing is that
the file can be processed easily with a bit a code.
>
> Also one other question - The item graphics take up multiple slots
> (tetris style) Im guessing I should sort these by size and shape
> leaving the gaps empty? and if so how would I index them?
You could perhaps add the size of the item graphics, in horizontal
and vertical tiles it takes up, in the text file. Also, mark the
unused tiles in the item graphic somehow.
Again, the important thing is that the text file can be easily
processed with a bit of code.
For example (and this is off the top of my head, so might not be
suitable):
In the tile graphics:
AABBBCCC
AxxxCCxx
A, B, and C are items, x marks "unused" parts. The text file could
be something like:
000 (0,0) (2,2) 3 boomerang (aka item A)
001 (2,0) (3,1) - another item (aka item B)
002 (4,0) (4,2) 6,7 item foo (aka item C)
etc
First field is index number,
second gives top left coordinates,
third is width and height in tiles,
fourth lists "unused" tiles separated by commas,
counted from zero to (width*height)-1 (or just "-" if no unused ones),
and fifth is the item name
This is more work for you, but should make it easier for the coder