[Suggestion] hqx Sampling

0 favourites
  • 6 posts
From the Asset Store
Get instant inspiration with this drum sample pack!
  • Well, I have a little fixation to try to make my projects to work and look great regardless the resolution (I try to make my games compatible from 480p to 1080p). I want to have one universal game build of the game.

    The latest C2 addition TileMap is great except one problem (for me at least): does not work well with downscaleing. Not a problem when games are based on a fixed resolution, but if you want to support more resolutions you will have to use upscaling (since downscaling create seams) and the images will look blurry or pixelated with the current sampling (point and linear).

    Thanks to anata for pointing out a great solution that is also used in old console emulators <img src="smileys/smiley2.gif" border="0" align="middle">

    Original (1x):

    <img src="http://s22.postimg.org/zcnnrrypp/original1x.png" border="0">

    hq2x:

    <img src="http://s22.postimg.org/r8fjn1cap/hq2x.png" border="0">

    hq3x:

    <img src="http://s22.postimg.org/y05ypw1a9/hq3x.png" border="0">

    hq4x:

    <img src="http://s22.postimg.org/uupydf81t/hq4x.png" border="0">

    The code for hqx is already ported to JavaScript here and here <img src="smileys/smiley20.gif" border="0" align="middle">

    Comparison of different Pixel Scalings

    Pixel Art Scaling Algorithms - Wiki

    hqx - Wiki

    js-hqx was already implemented in another HTML5 game engine and works well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1+'d

  • I would love to have auto scaling for assets to be of broader use. However the design theory running now is that you should use higher assets sizes and down scale. Now of course the OP posted the problem with tilemaps creating seems. so maybe posting about having the tile renderer improved to remove seems might be more likely.

  • This wouldnt work as Ashley doesnt want to make tilemap seamless whichmeans it can only ever work with point sampling?

  • Hmm, isn't hqx under the GPL license? That could make it tough to include. But there are other interpolation filters around that are (imo) better than hqx. Here's one:

    wayofthepixel.net/index.php

    I think the source is in there somewhere? Best ask permission to use it of course..

  • I would love to have auto scaling for assets to be of broader use. However the design theory running now is that you should use higher assets sizes and down scale. Now of course the OP posted the problem with tilemaps creating seems. so maybe posting about having the tile renderer improved to remove seems might be more likely.

    Aside from my TileMap issue, 8-bit games will also receive a graphical boost.

    Hmm, isn't hqx under the GPL license? That could make it tough to include. But there are other interpolation filters around that are (imo) better than hqx. Here's one:

    http://wayofthepixel.net/index.php?topic=13508.0

    I think the source is in there somewhere? Best ask permission to use it of course..

    Looks great Info about the source and algorithm is at Reply #10

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