@noio That long reply cheered me up! Thank you!
We cant wait for your Kingdom release. We'll be buying it for sure.
First of all I must tell that we made our rules to try to stick to them and achieve the result that skydsgaard had in mind. But as you pointed, Crawl rotates pixels, and it looks awesome. (Last time we met, Skydsgaard and I, we played it and it was so fun that we didn't stop too much looking at the render
.
Actually, we are not rendering to a small texture and then scaling it, but doing it the "bigpixels" way. First we thought that pixels should not be allowed to intersect halfway with other pixels (althought from the begining we didn't render to a smaller tecture and then scaled it, because we thought that would allow us to implement other effects, like chromatic aberrations, or blur, ....
Your aproach, not only has the advantage of beeing 'cheaper', because you render to a smaller screen, but also that when you rotate something, since it looks you are using the "nearest pixel" aproximation, you do not end with rotated squares (or romboids), nor blurred pixels on screen. When you scale your texture, you have squares and that is how they are displayed.
I must admit that it took me more time than expected to adjust scaling, to make it look good (I had several quirks due to rounding issues). And if you played the Hyper Light Drifter beta, and you stare at it, you will find they also are having some issues with pixels (they will probably have it fixed for the release, because it is pretty noticeable in some tiles with some patterns like this floor with lots of lines
, only on certain resolutions .. in that video it looks perfectly crisp, but if you have the chance to play it, do it)
<Technical stuff>Our actual approach is that we have all positions (camera/viewport, actor and props positions, bounding boxes, etc.. ) in floating point. And we select a "Base Resolution" (that would be the ideal resolution to play the game). Then, having the viewport or screen resolution, we calculate the scale factor and the "logic viewport".
For example:
base resolution: 300 x 200
screen window: 665 x 610 (pretty weird, but is for having an example)
find the scale factor:
665.0 / 300.0 = 2.22
610.0 / 200.0 = 3.05
we select the smaller one, and round it down, so we end with a scale factor of x2
665.0 / 2 = 332.5
610.0 / 2 = 305.0
logic viewport = 332.5 x 305.0
scale = 2
and we pass that to the shader, that can make the calculations and the rounding to the pixel on the vertex shader (and we can enable / disable easily from the shader the 'big pixels can intersect' or not)
<End of technical stuff>So, as I said, at the begining, we didn't want pixels to be halfway into other pixels, until we viewed how the parallax looked .. yeah .. I guess that when you talk about de parallax jiggles, you talk about the effect that you have of the layers chasing each other when they are too close.
You can also find that on great games like Super Time Force: look at the botom layers how they move relative to each other, that looks like they are chasing each other:
Look at the gameplay video (put it on HD)
, or jump to this point and take a look at the trees:
https://www.youtube.com/watch?v=4Eps9hRmahU#t=101 .
But once you play, that is barely noticeable, the game is fast, and so very good looking that you have to stare at it to see it. (In our case is what we do, first we play them, we enjoy them, and then ... we start looking for all the details, to find what makes that game feel so good).
For example, although we haven't been able to play Chroma:
https://www.youtube.com/watch?v=mkOFy3i1Gsk by
@Claw, we looked carefully at tha video, and we like how smooth feels the parallax, so we decided to allow the pixels to be intersected halfway. We hope they make a ton of money with Titan Souls, so they can come back to finish Chroma !
Looks amazing!
So I recorded our game with GifCam
http://blog.bahraniapps.com/gifcam/ (direct download here:
www.bahraniapps.com/apps/gifcam/gifcam.php ), with the MC moving much more slower that it would do in the game, so we can view the differences.
I have 3 variations (Neither of them have blurred pixels, because we still respect the "screen pixels"):
Hard cam, hard parallax: the camera (or viewport) starts at big pixels positions so it can not start in a half 'big pixel', and the parallax bigpixels can not intersect other layers bigpixels.
Soft cam, hard parallax: the camera can start at a fraction of a pixel, and the parallax bigpixels can not intersect other layers bigpixels
Soft cam, soft parallax: camera and parallax are allowed to intersect halfway of a big pixel.
And that last one is, for now, what we decided to have. We think it allows us to have closer layers, one to each other. At the end it is an effect that can not be completely avoided, unles you start to have blurred edges and anti-alias.
The main problem is that we want to have sharp pixels (beeing it screen pixels or 'big pixels'), so we round each layer position to the start of a pixel, so for example if we have a layer (A) moving a 1.3 pixels/frame and another one (B) at 1.4 pixels/frame, what we end having is this :
position A | 1.30 | 2.60 | 3.90 | 5.20 | 6.50 | 7.80 | 9.10 | 10.40 | 11.70 | 13.00 | 14.30 | 15.60 | 16.90 | 18.20 | 19.50 | 20.80 | 22.10 | 23.40 | 24.70 |
position B | 1.40 | 2.80 | 4.20 | 5.60 | 7.00 | 8.40 | 9.80 | 11.20 | 12.60 | 14.00 | 15.40 | 16.80 | 18.20 | 19.60 | 21.00 | 22.40 | 23.80 | 25.20 | 26.60 |
rounded A | 1 | 2 | 3 | 5 | 6 | 7 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 22 | 23 | 24 |
rounded B | 1 | 2 | 4 | 5 | 7 | 8 | 9 | 11 | 12 | 14 | 15 | 16 | 18 | 19 | 21 | 22 | 23 | 25 | 26 |
rounded Diff | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 2 | 1 | 2 | 2 | 1 | 2 | 2 |
And so we end with this unavoidable 'chasing effect' where layers are getting further-closer-further-closer ..
Sooooo ... if anyone has a solution for this, It would be great to know !
About the screen, putting or not bars, and so one .. we are not still satified, nor convinced of how to manage that. I think that once we have tested gameplay we could form a better opinion. Perhaps
@Omnus is right about the main resolutions, but there will still be people playing it in some less common ones ... and at the end the point is to not have different experiences in different screen resolutions.
Thanks for all comments!