Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Background screen won't fit the tv
Started by henriquesv Sep 24 2017 08:18 AM

5 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

henriquesv

[GLOBAL: userInfoPane.html]
henriquesv
  • Observer

  • 10 posts
  • Corona SDK

Hello guys!

 

I'm starting with Corona and tvOS.. so I am still a bit confused about a few things..

 

For instance... tvOS and screen size. For what I know, appletv HD is default 1920x1080.

 

So at my code I set background as:

(main.lua)

local background = display.newImageRect( "background.png", 1920, 1080 )
background.x = display.contentCenterX
background.y = display.contentCenterY
 
And its configuration:
(config.lua)
application =
{
content =
{
fps = 60,
width = 1920,
height = 1080,
scale = "letterbox",
xAlign = "center",
yAlign = "center",
 
imageSuffix =
{
["@2x"] = 2,
["@4x"] = 4,
}
}
}
 
 
But what I get is the image smaller than the screen.. leaving blank spaces around the image.
 
What am I doing wrong? It presents the same result both on the simulator and the atv4 device.
 
Thanks for the help!
 
 
 


[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,788 posts
  • Enterprise

You're probably running into TV overscan. Do you notice it with other tvOS apps?

 

Rob



[TOPIC: post.html]
#3

henriquesv

[GLOBAL: userInfoPane.html]
henriquesv
  • Observer

  • 10 posts
  • Corona SDK

Hi Rob! Hello! Not really... but the thing is that the simulator is also showing the blank side blocks :)

Other tvOS apps look just fine =)

Am I doing the right thing above? The images have the correct sizes / resolution?

Thanks so much!



[TOPIC: post.html]
#4

henriquesv

[GLOBAL: userInfoPane.html]
henriquesv
  • Observer

  • 10 posts
  • Corona SDK

Here's a snapshot:
 
The background image has 1920x1080
And its code is:
    local background = display.newImageRect( "background_start.png", 1920, 1080 ) --1920, 1080
    background.x = display.contentCenterX
    background.y = display.contentCenterY
 
It stays the same when uploaded to atv4


[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,788 posts
  • Enterprise

Yea, that all sounds like it should be right. What simulator are you running it in to get the screen shot?



[TOPIC: post.html]
#6

henriquesv

[GLOBAL: userInfoPane.html]
henriquesv
  • Observer

  • 10 posts
  • Corona SDK

Hi Rob! The simulator is Corona's simulator =)




[topic_controls]
[/topic_controls]