Adventure Game Studio

Community => General Discussion => Topic started by: jetxl on Sat 23/01/2010 12:30:28

Title: blurry sprites?
Post by: jetxl on Sat 23/01/2010 12:30:28
Hi there.
Recently I noticed that Firefox AND Explorer make magnified sprites look blurry. It wasn't always like this but I don't remember when it changed.
Exibit a:
(http://www.2dadventure.com/ags/Stormtrooper-helmet.png)

Exibit b:
(http://img11.imageshack.us/img11/7363/walkcycle.gif)

And this is how it looks on my screen (normal sprites do look sharp).
(http://www.2dadventure.com/ags/AAndB.JPG)

I've unchecked Tools> Internet Options> Advanced> Multimedia> smart image dithering if anybody was wondering.

Help?
Title: Re: blurry sprites?
Post by: Jim Reed on Sat 23/01/2010 12:49:50
Try Opera. I use it and it doesn't blur sprites.
Title: Re: blurry sprites?
Post by: Babar on Sat 23/01/2010 13:33:21
Yeah, it is a problem with Firefox 3+. They seem to have changed it so that magnification is bilinear instead of nearest neighbour. I guess IE followed suit? There was a lot of complaining about it (even on this forum) a while back.

There is supposedly some fix with some new version of Firefox, allowing the authors of webpages to stop the bilinear magnification, and some weird work-around for the viewers (something involving using your own CSS files), but that never worked for me.

/me hates scotch and jake for convincing him to switch to FF3 ¬¬


EDIT: I just saw it was jetxl who was asking the question, and I realised my response may be considered to be condescending and as if jet doesn't know anything. So....errr....no offense meant!
Title: Re: blurry sprites?
Post by: Calin Leafshade on Sat 23/01/2010 13:52:34
Bleh ok, Let me fix this for everyone in firefox 3.6

goto file/run and type

%APPDATA%\Mozilla\Firefox\Profiles\

this will open a directory with some other folder in something like "dfjhdfg.default" go into that folder and then into another folder called "chrome"

then create a new file called "userContent.css" and put this in it.


img[src$=".gif"] { image-rendering: -moz-crisp-edges; -ms-interpolation-mode: nearest-neighbor; }
img[src$=".png"] { image-rendering: -moz-crisp-edges; -ms-interpolation-mode: nearest-neighbor; }


save and restart FF. bingo!
Title: Re: blurry sprites?
Post by: Babar on Sat 23/01/2010 14:10:59
I had something like this, before, calin:

img { -moz-scaling-method: fast } /* nearest | bilinear | gaussian | … */


I didn't know I had to wait till 3.6, though. Thanks anyhow

Your help will be remembered. I'll pray for your heathen soul to be saved :P.
Title: Re: blurry sprites?
Post by: Damien on Sat 23/01/2010 14:19:29
Got the 3.6 beta (http://www.mozilla.com/en-US/firefox/all-beta.html) and it worked.

Thanks Calin.
Title: Re: blurry sprites?
Post by: Calin Leafshade on Sat 23/01/2010 14:27:13
3.6 has a stable release if you dont like betas

its on www.firefox.com (the main page)
Title: Re: blurry sprites?
Post by: monkey0506 on Sat 23/01/2010 17:39:36
Quote from: Jim Reed on Sat 23/01/2010 12:49:50
Try Opera. I use it and it doesn't blur sprites.

Screw you man. Screw you. :=

I tried Opera for one day (long story but I was using Windows 98 and the latest FF doesn't work on 98). I did not enjoy it. At all. It made me sad, angry, depressed, and bloodthirsty. So if those are traits you strive after, then sure, use Opera. :D
Title: Re: blurry sprites?
Post by: Ryan Timothy B on Sat 23/01/2010 18:28:07
Freakin wicked.  No more blurry images for me, thanks Calin.

I've known about a fix similar to this for earlier versions of Firefox, but I was always too lazy to do it.  Not this time... Not this time! :P
Title: Re: blurry sprites?
Post by: markbilly on Sat 23/01/2010 18:30:07
Anyone got a similar solution for Chrome? :)
Title: Re: blurry sprites?
Post by: blueskirt on Sat 23/01/2010 18:34:21
QuoteIt made me sad, angry, depressed, and bloodthirsty.

It's just a matter of habit. Humans love routines, anytime things aren't like they're used to be, they'll feel angry. I feel sad, angry, depressed, and bloodthirsty anytime I got to use Firefox or IE or someone else's computer, even someone else's Opera since things are never customized like I want them to be, or when a program or website I use everydays get an update that drastically change its look and I can't find anything anymore.
Title: Re: blurry sprites?
Post by: jetxl on Sat 23/01/2010 19:31:45
Ok, Firefox is fixed and crispy again, but I'm a ninny and am still looking for an Explorer solution (even though the french and german governments recommend the world not to use it!) (http://www.sfgate.com/cgi-bin/blogs/techchron/detail?entry_id=55509).

Babar: huh?


edit- I've also unchecked Tools> Internet Options> Advanced> Multimedia> Always use Clear Type for HTML which makes text clear and thin again but obviously didn't effect sprites.
I can't find a quick solution with google. Are we the only people on the internet that get bothered by looking at blurry sprites?
Title: Re: blurry sprites?
Post by: Calin Leafshade on Sat 23/01/2010 19:51:03
ofcourse and because i am supremely awesome i feel i should help.

1. Save the CSS i gave earlier as some file. lets call it userContent.css
2. Go to Tools→Internet Options→Accessibility.
3. Check "Format documents using my style sheet".
4. Browse and select the "userContent.css" file you made in step 1.
5. Restart your browser..

untested since i dont have IE8 on my humble XP machine.

As an aside you shouldnt really use IE on account of it making your penis fall off... jus' sayin'
Title: Re: blurry sprites?
Post by: WHAM on Sat 23/01/2010 20:14:33
Thank you Calin! You have made my day!  ;D
Title: Re: blurry sprites?
Post by: jetxl on Sat 23/01/2010 21:12:59
Nope, didn't work, so IE can fuck off.
Title: Re: blurry sprites?
Post by: InCreator on Sat 23/01/2010 23:01:35
Quote from: Calin Leafshade on Sat 23/01/2010 13:52:34
Bleh ok, Let me fix this for everyone in firefox 3.6

THANK YOU!
Title: Re: blurry sprites?
Post by: Kweepa on Sat 23/01/2010 23:09:33
Yes, indeed, thanks so much for pointing this out!
However, now my forum smileys are all blocky :(
EDIT: Hmm, it appears to depend on the window width! Oh, they are resized a bit from 15x15. Ew.
Title: Re: blurry sprites?
Post by: SinSin on Wed 10/02/2010 10:14:28
Is there anybody who knows how to sort this out on Google Chrome , Sorry I used the G word lolz
Edit : Sorry for re ask lol
Title: Re: blurry sprites?
Post by: markbilly on Wed 10/02/2010 14:27:21
Quote from: Sinsin on Wed 10/02/2010 10:14:28
Is there anybody who knows how to sort this out on Google Chrome , Sorry I used the G word lolz

I already asked. No one seems to have a clue, really...
Title: Re: blurry sprites?
Post by: Darth Mandarb on Wed 10/02/2010 21:02:24
Quote from: jetxl on Sat 23/01/2010 21:12:59... so IE can fuck off.

Now if only the rest of the world would share this sentiment!!
Title: Re: blurry sprites?
Post by: InCreator on Wed 10/02/2010 21:09:23
A call for petition maybe? I'd give my +1  :P Even tough yes, we shouldn't act like this at forums
Title: Re: blurry sprites?
Post by: ALPHATT on Fri 12/02/2010 23:48:58
Quote from: Calin Leafshade on Sat 23/01/2010 13:52:34
Bleh ok, Let me fix this for everyone in firefox 3.6

goto file/run and type

%APPDATA%\Mozilla\Firefox\Profiles\

this will open a directory with some other folder in something like "dfjhdfg.default" go into that folder and then into another folder called "chrome"

then create a new file called "userContent.css" and put this in it.


img[src$=".gif"] { image-rendering: -moz-crisp-edges; -ms-interpolation-mode: nearest-neighbor; }
img[src$=".png"] { image-rendering: -moz-crisp-edges; -ms-interpolation-mode: nearest-neighbor; }


save and restart FF. bingo!


Wow, most helpful thing I read on the internet in weeks.