How do I make a Texture pack in Java? I mean to have like a big image which I can take pieces off and use them in my game?
Printable View
How do I make a Texture pack in Java? I mean to have like a big image which I can take pieces off and use them in my game?
BufferedImage#getSubImage(...)
db
How can I use that?
The BufferedImage API is a great place to start. Have a look, give it a try, and if you still are stuck, please show us your code and any specific questions you may have.
Are you talking about actually creating a picture composed of other smaller pictures. In which case just look that up TexturePacker or go to: » TexturePacker – Sprite sheet maker, image packer and optimizer . If you already have the image then use BufferedImage.getSubImage(). If you need to know how to use that go to: Getting a Sub-Image of an Image | Example Depot && BufferedImage (Java 2 Platform SE 5.0). If you need further instruction on how to use these then just say so.
Can't get that with the buffered images, would appreciate some help.
So far: I've been reading up on it on many websites without understanding it, please help!
Okay, so. Is it possible to do it with the ImageIcon?