Would this break GS?
dusker24
Member Posts: 30
Hi,
I'm planning a game that has a large number of sprites, with tens of frames of animations per sprite. Although the sprites are small , 60px x 90px. Would something go drastically wrong if you were to create a game with say 3000 png frames of sprite animation?
File size be too large? Potential build problems? Just too much 'stuff'??
Thanks
I'm planning a game that has a large number of sprites, with tens of frames of animations per sprite. Although the sprites are small , 60px x 90px. Would something go drastically wrong if you were to create a game with say 3000 png frames of sprite animation?
File size be too large? Potential build problems? Just too much 'stuff'??
Thanks
Comments
________________________________
【ツ】iPhone Icon Pack 【ツ】 - 【ツ】Graphic Pack【ツ】
Free GS demo: High score simple and advanced; Game Center; App Rating System
Ah, no that's not a problem. About 10 - 20 simple sprites on screen at the most. Just wondering if seriously large numbers of png graphics in GS's image area would crash or cause errors.
___________________________________________________
Game Making Service
Sketch to Vector Service
"Power Orb" Style Template
Targeting System Template
Code for Art- Trading
When an older device (iPhone 3G, iPod 2nd gen, and below) has its RAM usage up near 40MB, it will crash. There are no hard numbers, and Apple won't say, but that is about right.
When you switch Scenes in GameSalad, GameSalad will flush out the RAM. So you basically have 40MB to play with in each Scene.
That 40MB includes all the art, sound fx, music, and code for that Scene.
There are two things to consider about file size in regards to images:
First, when you export the images from Photoshop or whatever, it will tell you the file size. This number will determine the overall file size of your app. Ideally, if possible, you'll want to keep your overall file size down to under 20MB so it can be downloaded over the 3G network. Not critical, but definitely something to be aware of.
Second, regardless of file size, when you import graphics into GameSalad they get converted to 32-bit textures and get stored in memory. A basic rule of thumb is that each pixel requires 3 bytes of RAM.
You can easily do the math and figure out the RAM usage each image will use by multiplying the number of pixels by 3. Applied to one of your 60x90 images, it looks like this:
60 x 90 x 3 = 16,200 bytes = 16.2Kb
Not too bad. But multiply that by 3,000 and you are at 48MB. And that is without any sounds, music, Actors or code. That also does not take into account any background images. Also, if you add bullets, or explosions, or sound effects, or text popups, anything, it all adds to the RAM usage. And it will not get flushed until you change Scenes.
Just something to be aware of!