FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sprite image size

 
Post new topic   Reply to topic     Forum Index -> ArcLib
View previous topic :: View next topic  
Author Message
HienTau



Joined: 16 Jun 2005
Posts: 12

PostPosted: Tue Jun 13, 2006 2:25 am    Post subject: Sprite image size Reply with quote

Hello,

I'm an arc newbie and tried to use my own sprites. In a minimalistic example (no sprite.setSize() or similar) I tried to load my own image (64x98). For reasons I don't know about the size of the sprite varied depending on the window resolution and was almost never as I had expected, leading to strange blurring. I also tried to use bitmaps instead of pngs (and I also resized the images to powers of two), but that didn't make a difference. Can somebody help me out?

Regards,
HienTau
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Tue Jun 13, 2006 11:06 am    Post subject: Re: Sprite image size Reply with quote

Hi, maybe you could send me a zip file with source + art so I can know exactly what type of 'blurring' has occurred? ( clayasaurus@gmail.com )

With Arc, the Window resolution is always virtually 800x600, so if you make your resolution be 800x300 the screen would appear to be 'squished.'

The reason I do this is so that when you resize the screen, things are still drawn relative to the mouse coordinates so you can still click on things even if they start to look 'squished.'

If this is too much of a problem I could make you a function that disables this.

~ Clay
Back to top
View user's profile Send private message AIM Address
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Fri Jun 16, 2006 7:48 pm    Post subject: Reply with quote

I found out your problem, there were two things wrong. One of the things I've fixed in my code was in the arc/gfx/texture.d file I changed "SMOOTHING_ON" to "SMOOTHING_OFF." Download the new package with this fix here --> http://svn.dsource.org/projects/arcgames/downloads/zipfiles/arc/arcpkg1.zip

The second problem was your texture size. In reality, opengl only likes power of two texture sizes, but with gluBuild2DMipMaps I use you can use any texture size you want, however the crisper images will still need to be close to the power of two sizes.

I sent you updated art for your dude through email, though you may want to draw him a belt.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> ArcLib All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group