Users browsing this thread: 1 Guest(s)
What's this ??!! A wild RONDO has appeared !!!
#3
depending on what your trying to minimize the approach could change drastically,
if you were trying to minimize memory, pack your sprite as a stream of tiles, hypothetical situation of 24 x 24 sprite (3 tiles by 3 tiles), pack like so,
Code:
[XY][XY][XY][00][10][20][01]
[11][21][02][12][22][XY][XY]
[XY][XY][XY][XY][XY][XY][XY]
preferably frame after frame too, but the point being, getting your sprites tiles only requires, the offset and size.
this approach ofc lends itself to much larger sprites better than it does smaller, memory vs compute I guess,
Code:
for (var X; X < width; X++)
   for (var Y; Y < height; Y++)
       spriteTile[X, Y] = tiles[offset + X + (Y * width)];
ofc I have no clue what your working with so this is as rough as possible to let you do as you wish with it
Reply
Thanked by: puggsoy, Lexou Duck, Ton


Messages In This Thread
RE: What's this ??!! A wild RONDO has appeared !!! - by Bombshell93 - 06-20-2015, 09:30 PM

Forum Jump: