Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (407)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / Java 2D / Re: How to load a lot of images or spritesheets efficiently? on: 2012-07-03 06:56:28
Wonderful suggestions. Smiley

My game has no levels. Nearly all my sprites are apart of character animations. I removed a signification amount of sprites, which I didn't really need. I went from about 6000 to 3600. Everything is rendering smoothly.

2  Java Game APIs & Engines / Java 2D / Re: How to load a lot of images or spritesheets efficiently? on: 2012-07-02 23:00:36
Thank you. I'm going to look into it right now.
3  Java Game APIs & Engines / Java 2D / Re: How to load a lot of images or spritesheets efficiently? on: 2012-07-02 15:21:19
I found a great solution for myself!

I just used java.awt.Image (ImageIO.read) and created a class to store every tile information (6000 of them) with a cache expiration time property, Image property, etc. When a file needs to be drawn, it checks if it's loaded, if not, it loads it. Then it updates the cache expire time plus one second, and finally draws. At the end of every scene, I expire unused tiles. My memory use is at 40,000K and my CPU is VERY low too. This works great for me, but I bet it wouldn't work in a lot of other situations.
4  Java Game APIs & Engines / Java 2D / Re: How to load a lot of images or spritesheets efficiently? on: 2012-07-02 07:20:15
I'll give that a try. Thank you for your help.
5  Java Game APIs & Engines / Java 2D / How to load a lot of images or spritesheets efficiently? on: 2012-07-02 05:21:47
I am recreating an old game that was created in the late 90's (I've received permission to use the game images). The game has about 6000 100x100 images, which are mostly character frames for animation. The game (C++) was able to load the images and keep memory usage for the entire game around 50,000K. I know that the original game stored all the bitmaps in a special MultiBitMap format.

I am willing to change the images' format to any format. I just want to get memory usage down significantly. I tried creating 15 (2048x2048, with transparency)  PNG spritesheets, and then loading them using the Slick 2D game library, however, memory usage went through the roof. I thought about making smaller spritesheets, and loading just the sheets I need for the scene, however, it's possible the a single scene would need all the spritesheets loaded to render the scene. I am even considering the DDS file format..

Any suggestions?


Thank you
Pages: [1]
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (92 views)
2013-05-17 21:29:12

alaslipknot (100 views)
2013-05-16 21:24:48

gouessej (130 views)
2013-05-16 00:53:38

gouessej (125 views)
2013-05-16 00:17:58

theagentd (136 views)
2013-05-15 15:01:13

theagentd (124 views)
2013-05-15 15:00:54

StreetDoggy (165 views)
2013-05-14 15:56:26

kutucuk (187 views)
2013-05-12 17:10:36

kutucuk (190 views)
2013-05-12 15:36:09

UnluckyDevil (197 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.075 seconds with 21 queries.