Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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]
 

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

The first screenshot will be displayed as a thumbnail.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (27 views)
2014-07-29 18:09:19

Riven (16 views)
2014-07-29 18:08:52

Dwinin (14 views)
2014-07-29 10:59:34

E.R. Fleming (35 views)
2014-07-29 03:07:13

E.R. Fleming (13 views)
2014-07-29 03:06:25

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

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

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

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

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