Advertisement

Animation Loading Time.

Started by October 12, 2000 09:07 AM
4 comments, last by kroiz 24 years, 2 months ago
Hi Friends ;-> I''m making this animation which i need for it 23 frame. what better loading it as 23 BMPs or one big one. tnx.
0 error(s), 0 warning(s)
normally its better to load it as one bitmap, it kinda makes it easier to loop through and you never have to reallocate it''s memory if you keep referencing it. It''s especially better if you have many things that have 23 animation frames to have them each as their own bmp, if you ever get to that point having that many seperate bmp''s in memory will be killer to the system.
This Space for rent.
Advertisement
actully i do have a lot of animation and they do take long
to load, (like 3-4 sec), they are 8 set of animation each
contains 23 BMPs thats 184 BMPs.
so i worry that i won''t have anough space for my game sprites
and background pics on the Video Mem.
I''m pretty sure if you run out of video mem, it starts saving it to system mem.

You should prolly save your animations as 320x240. The average computers don''t have enough memory to play a higher res animation. I''m assuming you''re talking about a cutscene or something.

When you''re done with the animation, delete it, then you''ll have room for your sprites and backgrounds.
O.k tnx
0 error(s), 0 warning(s)
I don''t know how big the bmp is, but I would suggest compressing it. The Windows SDK gives a detail explaination of the rle encoding it uses for compressing a BMP. If you don''t mind coding the routines you can most likely compress it a good deal more than RLE does. This is assuming you are spending 3 or 4 seconds with the hard drive lit up. If the light is only occasionally blinking then reading less data won''t help you much. You should be I/O bound and if you aren''t then there is something wrong. If you are reading 184 seperate files then concatentate them together. This gives less of a chance of them being fragmented on the drive assuming you defragment occasionally. If you are an avid game player all those installs and uninstalls really screw up the allocations on the hard drive. The overhead on a bmp is rather small so it doesn''t make much differance if you simply concatentate them or actually make them into a single bmp. Making it a single file will do more for you than making it a single bmp.

Memorywise you are better off with seperate BMPs. The reason is that you want to localize access to memory. Each referance should be as close together as possible to the previous one. You want the second row of the frame to be as close as possible to the first one and not 22 rows away. With one animation sequence where you use all the frames it doesn''t really matter and might be an advantage. The advantage would be that all pages of the animation sequence would be resident before you complete the first frame so you wouldn''t have pauses in the as the swapping system works. If you start combining frames in differant sequences to create differant animations then it starts to make a bigger differance. The pages holding the frames you don''t need might be displacing ones you need more. This is only an issue if you exceed physical memory, but it is a game so that is a definite possiblity. If you are using more memory than physically present then you really need to actively manage memory in a real-time application, but failing that you at least want to localize access.
Keys to success: Ability, ambition and opportunity.

This topic is closed to new replies.

Advertisement