Posts: 1,556
Threads: 77
Joined: May 2011
For those who want to know why.
I had a large sprite sheet, and I wanted to split it. I did split it but the problem is that the sprite sheet contains sprites used in multiple dat files. And they are at the middle of the sprites directory list in the dat files. and I don't want to miss with any sprite number below the split one.
so,
is it ok to write a file(x-x),col: x number which is higher than the real one in order to prevent usin' a fake sprite (imaginary sprite) to fill the missing/blank sprites numbers? I know it works but will it take the same memory as if it is the large sprite?
Any help appreciated....
Thanks given by:
Posts: 2,340
Threads: 78
Joined: Mar 2008
the numbers in the brackets don't do anything (x-x)
the col*row result needs to fill the gap
if you use a line that has w: 1 h: 1 for this gap filling purpose it will of course take less memory than a full sprite
if you just use the same dimensions you did before it will probably be using the same memory
i would however advise you to simply change all the following pic numbers so you don't have to use a gap
Posts: 1,556
Threads: 77
Joined: May 2011
Are U sure U understood me well? again.
file(0-24): sprite\sys\AC.bmp w: 159 h: 159 row: 5 col: 5
file(25-49): sprite\sys\AC2.bmp w: 159 h: 159 row: 5 col: 5
file(25-324): sprite\sys\asdf.bmp w: 159 h: 159 row: 10 col: 30
file(325-349): sprite\sys\AC3.bmp w: 159 h: 159 row: 5 col: 5
file(350-374): sprite\sys\AC4.bmp w: 159 h: 159 row: 5 col: 5
file(375-399): sprite\sys\AC5.bmp w: 159 h: 159 row: 5 col: 5
file(400-424): sprite\sys\AC6.bmp w: 159 h: 159 row: 5 col: 5
file(425-449): sprite\sys\AC7.bmp w: 159 h: 159 row: 5 col: 5
file(450-474): sprite\sys\AC8.bmp w: 159 h: 159 row: 5 col: 5
file(475-499): sprite\sys\AC9.bmp w: 159 h: 159 row: 5 col: 5
I splited asdf into 6 parts:
asdf1,asdf2,asdf3,asdf4,asdf5,asfd6
I need sprites in asdf1 only so
file(0-24): sprite\sys\AC.bmp w: 159 h: 159 row: 5 col: 5
file(25-49): sprite\sys\AC2.bmp w: 159 h: 159 row: 5 col: 5
file(25-324): sprite\sys\asdf1.bmp w: 159 h: 159 row: 10 col: 30
file(325-349): sprite\sys\AC3.bmp w: 159 h: 159 row: 5 col: 5
file(350-374): sprite\sys\AC4.bmp w: 159 h: 159 row: 5 col: 5
file(375-399): sprite\sys\AC5.bmp w: 159 h: 159 row: 5 col: 5
file(400-424): sprite\sys\AC6.bmp w: 159 h: 159 row: 5 col: 5
file(425-449): sprite\sys\AC7.bmp w: 159 h: 159 row: 5 col: 5
file(450-474): sprite\sys\AC8.bmp w: 159 h: 159 row: 5 col: 5
file(475-499): sprite\sys\AC9.bmp w: 159 h: 159 row: 5 col: 5
And I didn't fix the
file(25-324): sprite\sys\asdf1.bmp w: 159 h: 159 row: 10 col: 30 to prevent using an imaginary sprite to fill the gap and at the same time don't want to miss up with the sprite numbers below it. It worked, but is that gonna use the same memory used in a w: 159 h: 159 row: 10 col: 30 sprite sheet?
thanx in advance..
Thanks given by:
Posts: 2,340
Threads: 78
Joined: Mar 2008
i think so yes
but i cannot tell you for sure
you can't use a gap file because you already have too many bitmaps right?
Posts: 2,591
Threads: 259
Joined: Feb 2008
simple question - why do you need a gap this large? why don`t you just make the gap smaller and change the pic numbers? i would understand it if there`s a gap so you can reach image #140 so you can transform into your hero, but such a large gap seems useless to me...
www.lf-empire.de
Once I had a fortune, it said: "Leave now. Life is short. Time is luck"
Don't dream your life, live your dream!
Posts: 2,340
Threads: 78
Joined: Mar 2008
09-29-2011, 05:00 PM
(This post was last modified: 09-29-2011, 05:01 PM by YinYin.)
because he probably doesn't want to change almost 400 pic numbers
edit: but that's still the best bet
also consider that the amount of frames inside one file is limited
you cannot display the amount of pictures you have loaded (one frame for each)
Posts: 1,556
Threads: 77
Joined: May 2011
Well, I tested it out by myself in some of my friends pc's. and it worked just as I wanted, no lagging at all. Thanx anyways.
Thanks given by:
Posts: 2,340
Threads: 78
Joined: Mar 2008
well
when overloading your ram with bitmaps you usually either crash your game right away or it works without lag
the only lag i ever get is at run time when a large amount of screen filling bitmaps is shown in sequence and that doesn't have much to do with how much the game has loaded