0
\$\begingroup\$

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

\$\endgroup\$
1
  • \$\begingroup\$ How big are your images? Are you sure they won't be loaded pretty much instantaneously, thus not requiring a progress bar? \$\endgroup\$
    – Thomas
    Commented Jan 23, 2013 at 4:25

1 Answer 1

1
\$\begingroup\$

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?

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .