I recently discovered that simple looking things can really eat a lot of memory. The player graphic in my game project of instance. I got this dude, you have probably seen him before:
- Stand (12 frames)
- Walk (16 frames)
- Run (16 frames)
- Jump (3 frames)
- Parry (8 frames)
- Combat stance (8 frames)
- Attack (12 frames)
- Death (12 frames)
- Dead (1 frame)
Then multiply these animations by eight since I have eight directions on him, I'll do the math really quick.. (12+16+16+3+8+8+12+12+1)*8=704. That is 704 frames of animation for one guy. Well, that's pretty neat. It should look really smooth then and it does. Then we have the equipment that is pasted on top of the guy, these are rendered in the same manner. So that is 704 frames of animation for each item he is going to carry. Right now I have on him these things:
I looked up a review on geforce6600 (pretty much an average card). In that test it could transfer around 8-10mb worth of textures per frame, I needed 64MB! clearly something had to be done.
Now I load the sprite sheet as a single file but then in system memory I chop it up into smaller manageable sizes, 256x256 or 512x512 depending on situation and upload that to the graphics memory. And presto! The frame drop was gone. :-) This change in drawing architecture resulted in more but smaller texture changes/bindings (around 1MB per texture). However, my Asus laptop still get the frame drop. It is equipped with an nvidia8400MB graphics card (mobile graphics chipset). I guess laptops are inherently slow at data transfer, especially my dirt-cheap laptop.
Sorry about the rather lengthy post... I got more things to write but that will have to wait until next time.
Thanks for reading!

- Stand (12 frames)
- Walk (16 frames)
- Run (16 frames)
- Jump (3 frames)
- Parry (8 frames)
- Combat stance (8 frames)
- Attack (12 frames)
- Death (12 frames)
- Dead (1 frame)
Then multiply these animations by eight since I have eight directions on him, I'll do the math really quick.. (12+16+16+3+8+8+12+12+1)*8=704. That is 704 frames of animation for one guy. Well, that's pretty neat. It should look really smooth then and it does. Then we have the equipment that is pasted on top of the guy, these are rendered in the same manner. So that is 704 frames of animation for each item he is going to carry. Right now I have on him these things:


I looked up a review on geforce6600 (pretty much an average card). In that test it could transfer around 8-10mb worth of textures per frame, I needed 64MB! clearly something had to be done.
Now I load the sprite sheet as a single file but then in system memory I chop it up into smaller manageable sizes, 256x256 or 512x512 depending on situation and upload that to the graphics memory. And presto! The frame drop was gone. :-) This change in drawing architecture resulted in more but smaller texture changes/bindings (around 1MB per texture). However, my Asus laptop still get the frame drop. It is equipped with an nvidia8400MB graphics card (mobile graphics chipset). I guess laptops are inherently slow at data transfer, especially my dirt-cheap laptop.
Sorry about the rather lengthy post... I got more things to write but that will have to wait until next time.
Thanks for reading!
Create a custom theme





