Results 1 to 7 of 7
  1. #1
    Alerhau's Avatar
    Alerhau is offline Senior Member
    Join Date
    Jun 2011
    Location
    Sweden
    Posts
    158
    Rep Power
    4

    Default Using Images In Java As A Texture Pack?

    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?
    Currently Developing a Game Called Loaie, You Can Download It From "The Loaie Website".

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

    Default

    BufferedImage#getSubImage(...)

    db

  3. #3
    Alerhau's Avatar
    Alerhau is offline Senior Member
    Join Date
    Jun 2011
    Location
    Sweden
    Posts
    158
    Rep Power
    4

    Default

    How can I use that?
    Currently Developing a Game Called Loaie, You Can Download It From "The Loaie Website".

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    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.

  5. #5
    kammce's Avatar
    kammce is offline Senior Member
    Join Date
    Dec 2010
    Location
    California
    Posts
    194
    Rep Power
    4

    Default

    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.
    My API:
    Java Code:
    cat > a.out || cat > main.class

  6. #6
    Alerhau's Avatar
    Alerhau is offline Senior Member
    Join Date
    Jun 2011
    Location
    Sweden
    Posts
    158
    Rep Power
    4

    Default

    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!
    Currently Developing a Game Called Loaie, You Can Download It From "The Loaie Website".

  7. #7
    Alerhau's Avatar
    Alerhau is offline Senior Member
    Join Date
    Jun 2011
    Location
    Sweden
    Posts
    158
    Rep Power
    4

    Default

    Okay, so. Is it possible to do it with the ImageIcon?
    Currently Developing a Game Called Loaie, You Can Download It From "The Loaie Website".

Similar Threads

  1. Java 3D QuadArray Texture Coordinates
    By ajtgarber in forum Advanced Java
    Replies: 0
    Last Post: 02-13-2011, 04:46 PM
  2. What exactly does the pack() method do?
    By Nosrettap in forum Advanced Java
    Replies: 1
    Last Post: 01-02-2011, 08:32 PM
  3. pack libraries into jar file
    By BigBear in forum New To Java
    Replies: 1
    Last Post: 05-24-2010, 11:19 AM
  4. Replies: 5
    Last Post: 05-11-2009, 04:27 PM
  5. visual web pack
    By Jack in forum NetBeans
    Replies: 2
    Last Post: 07-02-2007, 05:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •