# One pixel equals what?

#1

When I use set position blocks in Hopscotch (which is a lot), it asks for a x number and a y number. I have been using these measurements without question, but when it comes to a project I’ve been working on that uses real-world measurements, I just have to wonder, by default, what is the measurement of one of these units in real life?

## This solution seems to work

Problem with solution: Pixels measured at different lengths depends on whether you measure it via height or width.

Solution to problem with solution:

#2

I let me put together something and then I will publish it. Great question by the way.

#3

Do you mean (for example) when you have,“move forward: 1” what unit 1 is? Because I think it changes between different sized devices and doesn’t have a definitive length

#4

Precisely. And it doesn’t change on different devices. There is just more or less of this strange measurement.

#5

Here. Also 1 ‘unit’ is 1 pixel.

#6

But if I play someone else’s game that they made on their phone and it has a line that is an inch, it will be bigger than an inch on my tablet screen won’t it? So how do we know that 100 pixels is constantly 1 inch?

#7

It is consistent to one inch on their screen, and then it blows up the measurement on your screen.

#8

Good point. I always wondered how they keep 1 pixel to 1 pixel on an iphone.

#9

Hmmm that would be interesting to make a pixel converter like yours but for every device. Would take a long time to do tho

#10

You can use math (yes, it’s so easy)!
Measure the width of your iPad’s screen, then divide it by width of iPad screen in pixels… That’s how many pixels per unit you have^2! (I think)

#11

Well that one took me about a minute or 2 to make. I kinda just threw it together. I didn’t even have a 97.25 background on it! I also asked Siri how many inches were in a pixel and how many centimeters were in a pixel and so on.

#12

Wow, great idea. I wish I thought of that. Though I wouldn’t measure it by 768, I would measure it by the width or height value, depending on how you are measuring it.

#13

Ok I changed the instructions

#14

Woah! That would work for any device! Woohoo! I think we have a solution!

#15

It might be a little bit off then. idk what type of device your using but different screens could have different sized pixels but your Siri might have given you measurements specific to your device

#16

I wonder if it would be possible to tell what type of device someone else is using by doing some sort of measurement on someone else’s projects and how much Hopscotch had shrinked down or blown up a projects measurments for it to be played.

#17

Disregard this post

#18

You mean how many pixels are there?

#19

What is the measure of one pixel’s side?

#20

Don’t we need to know how many pixels are on one length to that?