Display Groups are literally destroying me.

This is more of a crying and a scream more than a question. I am moving on to graphical side of my game and it is actually harder to code than the mechanics of the game.

I really want to cry and give up.

I have been trying to get the damn thing look right with placeholder graphics, I can’t even imagine how hard it would be to make it with actual graphics.

All I want to make the upper rectangle touch the upper edge, lower one to touch the lower edge. They are both in the same display group. I keep coming up with calculations to give to Y values but I keep failing.

THIS IS JUST ONE OF THE SIMPLE PROBLEMS I HAVE SPENT 2 FULL DAYS ON.

Someone magically teach me how to graphics please…

as5zYkw.gif

Hi @cbt,

So this is an issue with aligning objects to the edge of the screen on various devices with different aspect ratios (say a “tall” device like a phone vs. a “wider” device like a tablet)? It doesn’t sound like this is an issue with display groups, but rather in how you’re using the content area. I can assist you with more details…

Take care,

Brent

Oh wow thanks for the quick reply, I wasn’t expecting a reply from a staff member. I’m just too frustrated and wanted to share. And no, this is not an issue with display groups, I’m just too stupid to fully understand the relative positions of objects in a group etc. Also I’m not having problems with different aspect ratios, my problem is with any device actually.

When I’m giving positions I use stuff like 

myObject.width = display.pixelWidth \* 0.2 myObject.height = display.pixelWidth \* 0.2 myObject.y = display.pixelHeight - myObject.height/2

To make it work on different devices. My problem is just as simple as having a few display groups in a larger display group, and positioning them using that technique…

 

What “scale” mode are you using for the content area? “letterbox”? “zoomEven”? This can change the approach toward positioning objects…

Hi @cbt,

So this is an issue with aligning objects to the edge of the screen on various devices with different aspect ratios (say a “tall” device like a phone vs. a “wider” device like a tablet)? It doesn’t sound like this is an issue with display groups, but rather in how you’re using the content area. I can assist you with more details…

Take care,

Brent

Oh wow thanks for the quick reply, I wasn’t expecting a reply from a staff member. I’m just too frustrated and wanted to share. And no, this is not an issue with display groups, I’m just too stupid to fully understand the relative positions of objects in a group etc. Also I’m not having problems with different aspect ratios, my problem is with any device actually.

When I’m giving positions I use stuff like 

myObject.width = display.pixelWidth \* 0.2 myObject.height = display.pixelWidth \* 0.2 myObject.y = display.pixelHeight - myObject.height/2

To make it work on different devices. My problem is just as simple as having a few display groups in a larger display group, and positioning them using that technique…

 

What “scale” mode are you using for the content area? “letterbox”? “zoomEven”? This can change the approach toward positioning objects…