Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK limitations reached ?

Author
Message
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 19th Feb 2012 20:50 Edited at: 19th Feb 2012 20:51
Hello

i'm currently working on my isometric RPG Style Game (in Tier1). My problem is that i need characters with a lot of animations ... therefore a lot of spritesheets.

If i load every image/spritesheet at the beginning i will obviously face a memory problem.

if i load a sprite sheet only when i need it (and delete it after) during the game, image's loading stops the game's mainloop during precious miliseconds... it's becoming unplayable.

Is there any suggestions and/or workaround ?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 19th Feb 2012 20:57
hardware memory for the specific platform is not an AppGameKit limitation.

you need to implement a multithreading loading system, flush away unused asset, and load new ones on the fly.

I would suggest you move over to T2, else you are going to get a bit stuck
anwserman
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 19th Feb 2012 21:18
I would say there's more here to the problem than what the original poster specified. Perhaps your sprite sheets are too big? Too many different sets of different images on them? Perhaps instead of loading multiple images, use AGK's commands to color existing images instead of loadin in pre-colored images.

Is your game unplayable because you're using time based movement? Put a sync() after each time load image is called to keep the timesincelastframe value down.

Hi there. My name is Dug. I have just met you, and I love you.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 19th Feb 2012 21:37 Edited at: 19th Feb 2012 21:38
@anwserman :

What does mean "sprite sheets too big" ? it's very relative My spritesheets are 128x128 per tile on a 512x512 image (4x4 Tiles) per direction (8 directions) for only one animation (but i have the "stand" animation, the "run" animation and the "attack" animation for the moment)

So i have 24 (3x8) images of 512x512 each to load (minimum) for each character in PNG Format (with alpha channel).

Maybe converting some PNG images to other image type with an alpha color could reduce the memory used ?

@bjadams : i thought about Tier 2 and multithreading ... but i want to be sure that is a Tier1 limitation and there's no other solutions
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 19th Feb 2012 22:01
24 images of 512 each is quite a lot!
How many characters do you have?
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 19th Feb 2012 22:23
at the same time on the screen ? one with this number of images .. other non-playable characters will have less animations.

But i'm worried because it seems in Tier 1 it cannot be possible to have a lot of different sprites without splitting the game with loading screens ...

i wanted to make a game with a minimum of contents without breaking it with too many loading screens.
basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 19th Feb 2012 23:11
@ mikemax: you can have as many sprites as the hardware support.

look at the example in codebase:
http://www.thegamecreators.com/?m=codebase_view&i=cdf1d7cba76890d584ced55d0c8a55c0
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 19th Feb 2012 23:27
basjak, the problem is not the number of sprites . it's the number of different images used to create the sprites

But i have maybe an idea i need to verify the rendered effect before
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 20th Feb 2012 00:43
You would lose detail, but reducing the size to say 64 and scaling up the sprite would give you a bit more headway memory wise. Reducing the colour palette to 256 will over half your image memory size again, but you will lose transparency effects and would have to assign the transparency to a colour. It may be worth it to help squeeze more in or reduce the load time.

MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 20th Feb 2012 02:02
Thanks for suggestions but i have tried to reduce size and reduce colors and it looks very small and/or ugly

I have also tried to optimize number of images loaded playing with the SetSpriteFlip (mirroring) .. It works well when characters are symetric ... otherwise only the eagle eyes could be hurt by this "scene mistake" during the action it could do the trick ... and it reduces memory size about 40%
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 20th Feb 2012 02:24
Oh yes, I forgot that. My isometric engine used 5 sets of sprites and I flipped the rest. As you say you need em to look symmetrical ideally. But is a good saver again. I would be surprised if colour reduction made any real difference to quality, but scale obviously will.

Login to post a reply

Server time is: 2024-11-23 04:24:46
Your offset time is: 2024-11-23 04:24:46