Very Large Graphical Animation Thread

Hello!
I’m wondering about making very large amount of animation for a game framework. It has worked for a while until I increased the amount of graphics. Now I’m facing memory heap limitations, as usual, but moreover I discover average speed to load Images in Java.
So I load Images using Java Advanced Imaging library (JAI ImageIO) but I still wonder if it’d be better loading on the streams first instead of the full data of each Image used for Animation. What would you decide?
???

First of all, it doesn’t matter how they’re loaded. It would still require the same amount of RAM. Memory heap just means you don’t have enough RAM to support how many graphics your trying to use.

What a nice demo you have got! Thank you!
Did you manage to include more levels? ???
My project is a bit different it should include more Animated Objects. For the moment I’m stuck in some loading settings, therfore I’m waiting for my mac os x java embeded platform in place of this f… Celeron with no ram inside! LOL

Umm, I’m assuming your talking about my Mario project. No, there are no more levels currenty but the way I programmed it, I can easily add new levels when the gameplay is finished.

However, the setup I have and with the code I’m using to render my Mario game, I can run quite a lot of animated things on screen at any one moment.

Thats probably not the problem? I don’t see how 2d images could take up that much ram ever.

Unless you have a particle engine that spews pictures of famous actors I doubt your going to run out of ram just from images. If your getting an out of memory warning or something you probably have an infinte loop that loads something maybe. Ive had that before.

that’s right for small pics, but if you intend to have a full screen animated, for exemples like “Super Mario” or “VRally” etc. I mean that a screen of million of pixels (1024768) cannot get a big cache of Images loaded offscreen.
Make that calculation, uncompressed pixels use with a 8 bits color-mode about 1 Byte (let’s have 8 bits for one byte), this is 1024
768 Bytes for a full screen scene, that is 1024768 Bytes * 24 frames per second stream = 18,874,368 B/s = 18 MB/s (8 bits 1024768 @ 24 fps movie-like ) 8)

Why would you need a full screen, animated image for a game like Super Mario?

Considering the fact that the poster still has not posted his computer’s specs, this can still be true. On my brother’s desktop (extremely old and slow, outdated), I had a 800x600x32 screen drawing 1,850 16x16 tiles (static, non-moving), and it capped his RAM to 100% and ran less than 1 FPS. On my PC, I can get about 70 FPS sometimes higher depending on what I have running.

here are the various computers specs (one stand-alone Animation runs @ 24 fps as seen in Demo ):
1° eMac 1Ghz 1GB DDR RAM 64 VRAM
2° Celeron D 2.8 GHz 1GB DDR RAM 128 VRAM
3° Celeron 2.4 GHz 480 MB DDR RAM 64 Shared VRAM
;D it all works but JVM loops in cache memory after 300 images loaded , goal is 2000 images to be loaded one by one.
Thus I’ll try to load the opened InputStreams only.

That seems very excessive. How can you need so many images for a single level?

You never mentioned if you tried the -Xmx switch to increase your heap size.

imagine that every character needs a hundred of combinaisons, say like a Street fighter… Even I tried with 1024 Xmx it does increase mem space significantly but does not change the problem of caching data.
Well I said to change the loading methods to InputStreams, but I’m not readyfor the moment.

You break up each character into many small sprites rather than permuting them and representing each of them as one large sprite. For example, in a fighting game, you have different sprites for the head, each limb, the torso, etc. That should easily cut down the number of images.

Thank you for you support… let’s have a while to watch one of the Sun conference demonstrating Java Swing capabilities, even though it doesn’t cover all of that we discuss here it still aid.
Animation Effects (really amazing) ( French spoken… easily translated if you know a bit of French :D)
out of the entire Desktop Java 2005 Sun Conference in Paris