Slick Forums

Discuss the Slick 2D Library
It is currently Sun May 19, 2013 2:44 am

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Fri Apr 20, 2007 9:21 pm 
Offline
User avatar

Joined: Wed Apr 04, 2007 7:25 pm
Posts: 35
Location: UNC-CH
Hello all,

I'm having trouble drawing sprites from this specific image: http://www.molotov.nu/Graphics/Angband/ ... unds32.gif

It *will* draw in swing (i.e. using swing.ImageIcon).

Anytime I draw anything from the image, it only shows up as white. I've tried everything I could think of to alter the gif. I've even taken a screenshot of the image and made a new image out of the screenshot. For some reason, Slick just doesn't want to draw it.

As a side note, I can draw sprites from other images that are a part of this set, i.e.: http://www.molotov.nu/Graphics/Angband/ ... assm32.gif and http://www.molotov.nu/Graphics/Angband/ ... ures32.gif

Could someone else check and see if they can draw any 32x32 sprites from the image, just to make sure I'm not going crazy?

Thanks!

_________________
www.bryandenny.com


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 20, 2007 10:16 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Depending on your hardware, it could be the size of the image, try cutting it down to under 512x512.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 20, 2007 10:44 pm 
Offline
User avatar

Joined: Wed Apr 04, 2007 7:25 pm
Posts: 35
Location: UNC-CH
kevglass wrote:
Depending on your hardware, it could be the size of the image, try cutting it down to under 512x512.

Kev


I don't know why I didn't think of that. That worked, thanks!

_________________
www.bryandenny.com


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 20, 2007 11:07 pm 
Offline

Joined: Wed Mar 21, 2007 7:59 pm
Posts: 96
Thats kind of Scary.

BunnyHunters uses 800x600 splash screens and some very wide sprite strips.

Is this going to fail on some hardware? if so, what hardware?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 21, 2007 2:25 am 
Offline
Regular

Joined: Wed Feb 07, 2007 4:04 am
Posts: 107
Jeff wrote:
Thats kind of Scary.

BunnyHunters uses 800x600 splash screens and some very wide sprite strips.

Is this going to fail on some hardware? if so, what hardware?


I replied in the bunny hunters thread. http://slick.javaunlimited.net/viewtopic.php?p=1951#1951


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 21, 2007 7:32 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Yep, it'll white rectangle on anything without greater than 512x512 support. Mostly OpenGL devs keep textures below this - we've talked about a feature in the RFE that would stitch multiple images together into one glorious bigger image - but yet to implement.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 21, 2007 8:52 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Added "BigImage" support in build #129 - allows images to be bigger than hardware allows by creating a proxy for multiple tiled sub-images.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 22, 2007 11:43 pm 
Offline

Joined: Wed Mar 21, 2007 7:59 pm
Posts: 96
What about SpriteSheets?

Can you make a SpriteSheet out of a BigImage?

Thanks

JK


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 5:59 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
I could add that, but it'd be a mistake to do so, the performance impact could potentially be substatial. You'd be far better off to pre-process your sprite sheets into a hardware appropriate format - i.e. 512x512 sheets.

If you still want to go this route I'll add it, but I'd really advise against.

EDIT: Seems the API is there already, just hasn't been tested.

Kev


Last edited by kevglass on Mon Apr 23, 2007 6:18 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 6:02 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
I spose we could support a subimage operation that generates a new texture, but that could be terribly expensive.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 4:53 pm 
Offline

Joined: Wed Mar 21, 2007 7:59 pm
Posts: 96
Okay. Just a bit of a pain since I made my sheets long and narrow.

It also really limits how useful sheets of combined sprites are.

All in all I'm not gonna mess with this til at least post JavaOne,
sorry ATI people.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 6:52 pm 
Offline
Oldbie

Joined: Tue Nov 28, 2006 6:18 pm
Posts: 429
The ImagePacker tool on this site's front page auto-assembles sprite sheets and packs them into squares for you.

http://homepage.ntlworld.com/config/imagepacker/

Slick has a class to read these in too.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 7:22 pm 
Offline

Joined: Wed Mar 21, 2007 7:59 pm
Posts: 96
Jon wrote:
The ImagePacker tool on this site's front page auto-assembles sprite sheets and packs them into squares for you.



Already looked at it.

It packs multiple sprite sheets into one image.

It doesn't pack individual cells into the sprite sheet, which is my issue.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 7:52 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
It can do both, single images forming a sprite sheet, or sprite sheets forming a greater sprite sheet.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 7:54 pm 
Offline

Joined: Wed Mar 21, 2007 7:59 pm
Posts: 96
I gave up on trying to do that. There didnt seem to be a good way to set
the sprite image borders.

I could divide a given cell into sprite-frames, but I couldn't set it so each cell was a sprite frame.

If you know a way to make it work pls clue me


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group