Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (534)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Very Large Graphical Animation Thread  (Read 2921 times)
0 Members and 1 Guest are viewing this topic.
Offline broumbroum

Junior Member





« Posted 2007-03-16 09:33:33 »

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?
 Huh

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @ http://b23prodtm.webhop.info
on sf.net: /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #1 - Posted 2007-03-16 13:16:44 »

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.

I don't like you. Check out my site Smiley www.gamedevforums.com
Offline broumbroum

Junior Member





« Reply #2 - Posted 2007-03-16 17:36:42 »

What a nice demo you have got! Thank you!
Did you manage to include more levels?  Huh
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

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @ http://b23prodtm.webhop.info
on sf.net: /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #3 - Posted 2007-03-18 02:59:50 »

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.

I don't like you. Check out my site Smiley www.gamedevforums.com
Offline Coinerson

Junior Member




Introducing the world's cutest zombie, Timmy


« Reply #4 - Posted 2007-03-18 20:25:25 »

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.
Offline broumbroum

Junior Member





« Reply #5 - Posted 2007-03-19 09:34:38 »

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 (1024*768) 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 1024*768 Bytes  * 24 frames per second stream = 18,874,368 B/s = 18 MB/s (8 bits 1024*768 @ 24 fps movie-like )  Cool

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @ http://b23prodtm.webhop.info
on sf.net: /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #6 - Posted 2007-03-19 10:55:34 »

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

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #7 - Posted 2007-03-19 13:31:16 »

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.
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.

I don't like you. Check out my site Smiley www.gamedevforums.com
Offline broumbroum

Junior Member





« Reply #8 - Posted 2007-03-19 16:42:20 »

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
 Grin 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.

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @ http://b23prodtm.webhop.info
on sf.net: /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #9 - Posted 2007-03-19 17:29:57 »

Grin 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.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline broumbroum

Junior Member





« Reply #10 - Posted 2007-03-19 19:01:08 »

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.

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @ http://b23prodtm.webhop.info
on sf.net: /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Offline Eliwood

Junior Member




Stencyl


« Reply #11 - Posted 2007-03-20 02:28:43 »

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.

Offline broumbroum

Junior Member





« Reply #12 - Posted 2007-03-20 08:23:12 »

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  Cheesy)
out of the entire Desktop Java 2005 Sun Conference in Paris

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @ http://b23prodtm.webhop.info
on sf.net: /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (35 views)
2014-07-24 01:59:36

Riven (33 views)
2014-07-23 21:16:32

Riven (21 views)
2014-07-23 21:07:15

Riven (24 views)
2014-07-23 20:56:16

ctomni231 (55 views)
2014-07-18 06:55:21

Zero Volt (47 views)
2014-07-17 23:47:54

danieldean (38 views)
2014-07-17 23:41:23

MustardPeter (43 views)
2014-07-16 23:30:00

Cero (59 views)
2014-07-16 00:42:17

Riven (56 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!