Jibble

Author Topic: Error Message "Error: ad_to_sprite_list: roo many sprite added"  (Read 1438 times)

bonordberg

  • Guest
Hi,

I've just begun a new adventure, and I'm still working on room 1. When I try to lauch the game .exe file, it halts displaying this message:

"An internal error has occurred. Please note down the following information.
If the problem persists, contact Chris Jones.
(ACI version 2.61.747)

Error: ad_to_sprite_list: roo many sprite added"

(Yes, it actually does say "roo".)

I've only added about 430 sprites so far, which is obviously nowhere near the 15000 system limit. Thinking the problem might have somehow been caused by the room script becoming rather long (> 4700 lines) I cut the script down to basically nothing just to see if it would help - it didn't, though.

Any help would be much appreciated.

Thanks,

Bo

// Added 25 July 2004:

Hello again,

I found a way to work around my problem - it seems that AGS only allows 35 or so characters and objects on the screen at the same time.

Bye,

Bo

« Last Edit: 25 Jul 2004, 15:15 by bonordberg »

Gilbert

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
Hmmm, there's a limit of 240 sprites per folder, try adding more folders in the sprite screen.

Scorpiorus

  • 100101101010b
    • Scorpiorus worked on one or more games that won an AGS Award!
    •  
    • Scorpiorus worked on one or more games that was nominated for an AGS Award!
I found a way to work around my problem - it seems that AGS only allows 35 or so characters and objects on the screen at the same time.
Yeah, that is it. I faced that problem testing the CCS plugin. I wonder if the limit of sprites to draw can be increased in the future. Could come in handy if we have many small-sized characters [and objects] on the screen.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Can I ask why you need 35 objects/characters on the screen at one time? There's usually a better way of doing things if this is the case.

Scorpiorus

  • 100101101010b
    • Scorpiorus worked on one or more games that won an AGS Award!
    •  
    • Scorpiorus worked on one or more games that was nominated for an AGS Award!
Yep, usually 35 characters is more than enough. But on the other hand I managed to reach the limit simulating dropable inventory items. Using characters seems to be the best way of doing this. The thing was that 35 10x10 pixel sized characters don't slow the game down that much (compared to a fullscreen sized sprite, for example) but the limit on sprites doesn't allow to have more than that.
I'm also expecting to face a similar problem testing some sort of the AI system I have being working on. NPCs can wander across the rooms but I haven't yet added a code to check if there more than 35 characters walk in the same room. I'd set a constant to specify the maximum number of characters allowed per room but then I need to have a different one for each single room since the number of room objects are also taken into account.
I appreciate it might be of some hassle to increase the limit so I just was wondering if that can be done in future versions.

~Cheers

AGS v2.62 beta 2 - Mittens 2004 Edition:
* Increased max sprites displayed at once from 39 to 50, and improved user-friendliness of the error message if it is exceeded.

Scorpiorus

  • 100101101010b
    • Scorpiorus worked on one or more games that won an AGS Award!
    •  
    • Scorpiorus worked on one or more games that was nominated for an AGS Award!
Hehe, thanks for pointing me, strazer! I don't know why I always browse threads starting from the oldest ones and don't check the sticky topics first.

Thanks for increasing it, CJ! 50 will just do fine.