New games every week!
No, That Ain't Happening! Blog
2nd April 2019
Continued Tweaking at the scaling issue.[/highlight]
Tried for the past few hours to see if I can get any vague "screen size" stuff to work.

-=-=-

Some web-devs are absolutely convinced that their code is spot-on, but even really simple tests show.. They aren't.. At all!!!
"This code gives you the DPI of the screen".

.. No it doesn't!
It gives you the amount of pixels you have to play with, and divides it by the reported scaling factor. Retina devices use scaling factors of 2, 3 or more, so all DPI reports will take the resolution of the screen, divide it by 2, and say "Hey, your DPI is xyz"
But it isn't. Because the size of the screen isn't taken into account.
They make use of the "div width:1cm" thing, to help decide that "if 1cm is this many pixels, then the screen must be that many cm's wide" theory, but that's completely fudged to begin with because .. surprise... CSS doesn't actually give a munky's about Centimeters's (or inches) unless you're PRINTING.. THAT's the only time is makes any kind of difference..
All the screens, no matter the physical size, will return the exact same value for a 1cm wide div.

And so you carry on searching the web, and everyone's assuming "This worked for me.." but then you test their code on MORE THAN ONE THING, and it's blatantly obvious that it didn't work for them, they just happened to get lucky on that one single device that they happened to try it on.

And then there's good old Zoom, which totally breaks everyone's efforts even more.

Nope.
That ain't happening.

I'll have to try to find a nice middleground to estimate the amount of "lift" that objects need when you're picking them up.
I've now added a fairly decent "lift" to the letters in the Name Select menu.
If you use a "Mouse", they're perfectly centered to the mouse's co-ordinates.
If you use a "Touch", the letter bubbles should be slightly higher than your finger/thumb/etc, so should be vaguely readable.
It's still not perfect on a smaller device, because "x pixels higher" is tiny in phone-land. I'm trying to figure out how best to do that.

It should hopefully be better than it was, though.
*shrugs*

Let me know how you get on.
Views 72, Upvotes 17  
Shoebox
New games every week!
Site credits : Jayenkai, one crazy fool who has far too much time on his hands.
(c) Jayenkai 2023 and onwards, RSS feed 81

Blog - No, That Ain't Happening! - AGameAWeek