@RonJeffries Heres an example showing some coding for different sized screens.
viewer.mode=FULLSCREEN
function setup()
print(WIDTH,HEIGHT)
device={"iPad Pro","iPad Air","iPhone7 Plus",
"iPhone7","iPhone 5","Watch 42mm","Watch 38mm"}
rectMode(CENTER)
fontSize(40)
font("Baskerville-SemiBoldItalic")
x,y=300,100
xv,yv=3,3
dev=1
if WIDTH<HEIGHT then
tab={vec2(1024,1366),vec2(768,1024),vec2(414,736),
vec2(375,667),vec2(320,568),vec2(156,195),vec2(136,170)}
else
tab={vec2(1366,1024),vec2(1024,768),vec2(736,414),
vec2(667,375),vec2(568,320),vec2(195,156),vec2(170,136)}
end
currW=WIDTH
currH=HEIGHT
end
function orientationChanged()
setup()
end
function draw()
background(0)
fill(255)
stroke(255)
strokeWidth(3)
-- same code for all devices
w=tab[dev].x -- width of device from table
h=tab[dev].y -- height of device from table
ar=(w/h)/(currW/currH) -- aspect ratio
scale(w/currW,h/currH) -- scale of device to largest screen
sprite(asset.builtin.Planet_Cute.Character_Pink_Girl,x,y,101,171*ar)
sprite(asset.builtin.Planet_Cute.Character_Cat_Girl,100,600,101,171*ar)
text("Tap screen to show different sizes.",currW*.45,currH*.25)
text(device[dev],currW*.2,currH*.45)
text(tab[dev].x.." "..tab[dev].y,currW*.2,currH*.4)
noFill()
ellipse(currW/2,currH/2,50,50*ar)
ellipse(currW*.75,currH*.75,100,100*ar)
line(currW/2,currH/2,0,currH)
line(currW*.75,currH*.75,200,100)
rect(currW/2,currH/2,currW,currH)
rect(200,100,100,100*ar)
-- end of same code for all devices
-- calculate motion of sprite
x=x+xv
y=y+yv
if x>=currW or x<=0 then
xv=-xv
end
if y>=currH or y<=0 then
yv=-yv
end
end
function touched(t) -- display different device size
if t.state==BEGAN then
dev=dev+1
if dev>#device then
dev=1
end
end
end