Author Topic: TGA limit?  (Read 654 times)

b1tsh1ft3r

  • Newbie
  • *
  • Posts: 16
  • Karma: +1/-0
    • View Profile
TGA limit?
« on: February 23, 2018, 04:27:10 am »
Ive been using the following:

 jo_sprite_add_image_pack("STG2", "000.TEX", JO_COLOR_Black);

At first, i received the error stating i needed to increase the max file size in the image pack, which i did in the makefile by explicitly defining a max number.

I have 299 tga images in the same STG2 folder with 000.TEX as the first file which lists out all of the 299 .tga files which are listed in numerical order (1.tga, 2.tga, ..., 298.tga, 299.tga)

 jo_sprite_add_image_pack is getting to about 52.tga before it states it cant find 53.tga. the error is consistent and seems as if the seek and reading of files gets lost along the way somehow after loading quite a few?

am i doing something wrong here? Maybe i am using this function in an in correct way overall by trying to load too many sprites and there is a better method to achieve the same results?

My original thought was that i would take a 320x240 tilemap image and split it into 16x16 tiles (300 of them) and load them into ram and then load the tilemap itself and draw, but it does not seem to be working as planned.

Any suggestions are welcome!
« Last Edit: February 23, 2018, 04:53:07 am by b1tsh1ft3r »

ponut64

  • Full Member
  • ***
  • Posts: 182
  • Karma: +13/-0
    • View Profile
Re: TGA limit?
« Reply #1 on: February 23, 2018, 05:53:31 am »
It is my understanding that the file-names need to be reasonably unique or else it's going to throw unpredictable errors.

e.g. in my face FLOORA, FLOORC, FLOORB & WALLA, WALLB, WALLC would cause the first .tga file with that leading name become all targa files that are similar.

I hope that helps.

mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 158
  • Karma: +6/-1
    • View Profile
    • Jo Engine
Re: TGA limit?
« Reply #2 on: February 23, 2018, 08:29:12 am »
Hi,

That's because you reach the limit of the filesystem.

You have to separate files in multiple folder.

I don't remember the limit but it's on Sega's documentation (something like 32 files)

Anyway, loaded hundred of sprites from CD is not the good way because it will be very slow on real hardware.

You should make tileset using JoMapEditor.

You will also reach the limit of simultaneous sprites in Jo Engine which is 255 but it can be extended to 65535 if I add an option in the Makefile.

b1tsh1ft3r

  • Newbie
  • *
  • Posts: 16
  • Karma: +1/-0
    • View Profile
Re: TGA limit?
« Reply #3 on: February 23, 2018, 04:00:26 pm »
Ah, i see...

Ok not a problem. I think i know how to perform the same thing i want but in a different manner. Is the option to allow more sprites simultaneously available as an option to define in the makefile currently?

XL2

  • Sr. Member
  • ****
  • Posts: 350
  • Karma: +81/-1
    • View Profile
Re: TGA limit?
« Reply #4 on: February 23, 2018, 04:23:56 pm »
Yes, with jo max sprites (look at conf.h for the options). I use more than 500 different sprites in some maps in the FPS demo and it works fine with 16 colors.

 

Sitemap 1 2 3 4 5 6 7 8 9 10 
SMF spam blocked by CleanTalk