Point sampling not working with integer letterbox?

0 favourites
  • 8 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hello,

    I don't know if this has to do with Construct r91 still being beta, but when I set my games' fullscreen parameter to "letterbox integer scale" the point sampling doesn't seem to be working.

    Example: http://dl.dropbox.com/u/2725629/html5tests/Astrojone_point/index.html

    The Mario sprite to the left is original-sized and shouldn't look as blurry as it does.

    Tested on:

    Firefox (Windows) - Doesn't work

    Internet Explorer (Windows) - Doesn't work

    Safari (Windows) - Doesn't work

    Opera (Windows) - Doesn't work

    Firefox (OSX) - Works

    Opera (OSX) - Doesn't work

    Chrome (OSX) - Works

    Safari (OSX) - Doesn't work

    Any ideas?


    I asked some other people to test it as well:

    One guy tested in Chrome on Windows 7 - Worked.

    Another guy tested in Firefox on Windows 7 - Worked.

    Another guy tested in Chrome on Windows 7 - Worked.

    Another one tested in Opera on Windows 7 - Didn't work.

    One guy tested on OSX Opera with an old "11 MacBook Pro - Didn't work.

    The second guy tested on Firefox on Windows 7 64-bit with a GTX 560 - Worked.

    Third one was on on Chrome on Windows 7 with a GTX 560 Ti - Didn't work.

    The last guy was on Windows 7 64-bit with Intel HD graphics - Didn't work in Firefox or Internet Explorer, but worked in Chrome

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Point sampling only works when WebGL is enabled, for the time being (browsers don't currently support changing canvas 2D sampling mode, but support is coming soon). Use the 'renderer' system expression to show which renderer is being used ("webgl" or "canvas2d"). The main reason WebGL isn't used on desktop is the graphics drivers are out of date, so try updating them. Mobiles also don't use WebGL for the time being. Hopefully the situation will improve with time, I know it's important for many games but we just don't have much control over it right now.

  • Thanks for the info.

    I updated the example file to see whether the problem is with the renderer, and it appears that you are correct.

    Example: http://dl.dropbox.com/u/2725629/html5tests/Astrojone_point/index.html

    However, if outdated drivers was the issue, how come it still works in some browsers?

    I'm getting canvas2d with:

    Firefox in Win7

    Opera in Win7

    Safari in Win7

    IE in Win7

    Opera in OSX

    Safari in OSX

    I'm getting webgl with:

    Chrome in Win7

    Firefox in OSX

    Chrome in OSX

    As for iOS devices, you are also correct:

    iPad 2 showed canvas2d

    iPhone 3GS showed canvas2d

    iPhone 4S showed canvas2d

    So do you have any idea why some browsers are showing canvas2d while others aren't?


    As I mentioned in the other thread about tearing, I've tried the HTML5 game Browser Quest on all browsers on both Windows and OSX, and I haven't experienced any blurring or anti-aliasing issues whatsoever. How come I'm only getting this with Construct 2 games?

  • Is good to notice that some browsers dont support webgl.

    I know firefox and chrome do.

    Webgl in opera is comming in version 12 IIRC

    And IE and safari I don't remember

  • Different browsers have different rules for which drivers they support. So you will get patchy support across different browsers if you have old drivers. Again, I highly recommend updating your drivers and this will likely enable WebGL for all browsers that support it. Unfortunately IE doesn't support WebGL, and Safari has it disabled by default.

    Browser Quest probably drew all their artwork at double/triple/quad size with the point sampling baked-in to the images. You can do the same for your projects to get around the fact different browsers resize images differently.

  • I understand, but are you sure it's not just Construct 2-specific? Because looking at Browser Quest, it actually seems that they're scaling up their graphics from a sprite sheet.



  • bolosaur - they might use custom Javascript to resize the images in the engine. I suppose we could take a similar approach but for large games it can affect the startup time. It's hard for us to take a general approach that works for all games - custom-coded games like BrowserQuest can use specific hacks to make things work as they need and it doesn't matter if it wouldn't work well for different types of game.

    Have you tried r92 by the way? Should improve the point sampling on WebKit browsers.

  • Ashley

    Ah, that makes sense, yeah.

    As for the r92 update, I think it's really cool that WebKit browsers have been fixed, but since Firefox is still a pretty big market share I suppose the only solution is to wait until HTML5 rendering technologies have become implemented properly in all browsers, like you said in another thread.

    Thanks for the info.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)