Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I want to load all my game's images on the game's startup and have a loading bar to show it's progress. I already know how to create and display the loading bar, but I can't figure out how to load the images, and then add the image's frames to it's array.

Not using SLick

share|improve this question
    
How big are your images? Are you sure they won't be loaded pretty much instantaneously, thus not requiring a progress bar? –  Thomas Jan 23 '13 at 4:25
add comment

1 Answer 1

Loading an image in Java is easy:

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;

BufferedImage image = ImageIO.read(new File(fileName));

But I have no idea what you mean by "add the image's frames to it's array".

You are not using Slick, but are you using LWJGL? If so, you need to create a Texture from this image before you can use it. Do you need help with that?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.