Game not positioning right?

Does anyone know why when I test my game on the emulator and Kindle fire. Everything works perfectly fine, although when I test it on my HTC. The part of the top of the screen get cut off. Anyone know why it’s only cut off on that device, but works perfect on the others?

Hi @SPRS88,

Most likely this is related to how you’ve set up the content area in config.lua. Can you please post that relevant code for the staff/community to inspect?

Thanks,

Brent

Honestly I’m not really sure how that works, so the code is exactly as it is when you open a new game. The thing that’s not making much sense to me, is that it was fitting perfectly fine. Until I went to test it again a few days later. Would I need to set the size on each device in the config.lua file?

Hi @SPRS88,

We’ll still need to see the “content” block from your config.lua code. There’s not much we can do without seeing that first.

Thanks,

Brent

Oh yes sorry, here’s the code from my config.lua file.

application = {
 content = {
  width = 320,
  height = 480,
  scale = “letterBox”,
  fps = 30,

  --[[
        imageSuffix = {
      ["@2x"] = 2,
  }
  --]]
 },

    --[[
    – Push notifications

    notification =
    {
        iphone =
        {
            types =
            {
                “badge”, “sound”, “alert”, “newsstand”
            }
        }
    }
    --]]
}

Hi @SPRS88,

I don’t see anything wrong with your config.lua setup, so the issue is probably outside of that.

There are really too many factors involved in the content area and positioning of objects, especially with “letterbox” scale, for you to approach this without knowing why it’s behaving that way. Have you watched the videos and read the various tutorials/guides on working with content area? It’s very important that you learn about and understand the content area concepts, so that when things like this happen, you instantly know why and can fix it within a couple minutes. :slight_smile:

https://docs.coronalabs.com/guide/basics/configSettings/index.html

http://youtu.be/RwVlzJtQWd8

Brent

Hi @SPRS88,

Most likely this is related to how you’ve set up the content area in config.lua. Can you please post that relevant code for the staff/community to inspect?

Thanks,

Brent

Honestly I’m not really sure how that works, so the code is exactly as it is when you open a new game. The thing that’s not making much sense to me, is that it was fitting perfectly fine. Until I went to test it again a few days later. Would I need to set the size on each device in the config.lua file?

Hi @SPRS88,

We’ll still need to see the “content” block from your config.lua code. There’s not much we can do without seeing that first.

Thanks,

Brent

Oh yes sorry, here’s the code from my config.lua file.

application = {
 content = {
  width = 320,
  height = 480,
  scale = “letterBox”,
  fps = 30,

  --[[
        imageSuffix = {
      ["@2x"] = 2,
  }
  --]]
 },

    --[[
    – Push notifications

    notification =
    {
        iphone =
        {
            types =
            {
                “badge”, “sound”, “alert”, “newsstand”
            }
        }
    }
    --]]
}

Hi @SPRS88,

I don’t see anything wrong with your config.lua setup, so the issue is probably outside of that.

There are really too many factors involved in the content area and positioning of objects, especially with “letterbox” scale, for you to approach this without knowing why it’s behaving that way. Have you watched the videos and read the various tutorials/guides on working with content area? It’s very important that you learn about and understand the content area concepts, so that when things like this happen, you instantly know why and can fix it within a couple minutes. :slight_smile:

https://docs.coronalabs.com/guide/basics/configSettings/index.html

http://youtu.be/RwVlzJtQWd8

Brent