How do I use anchor for my app?

Get help using Construct 2

Post » Sat Jan 03, 2015 12:00 am

Hi. I'm planning and trying to figure out how to make a ios game with construct 2.
What I need is a sort of bar at the bottom that always is there, the same with a top bar (sort of menu and header).

I want this to work on both iPhone 5's and iPhone 4's (different screen heights). I tried out using the anchor but it didn't do anything! It seems like the anchor behaviour doesn't work at all? Or am I using it wrong, perhaps?
Website Twitter Indie Developer
B
20
S
6
G
4
Posts: 206
Reputation: 2,954

Post » Sat Jan 03, 2015 12:35 am

B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sat Jan 03, 2015 11:46 pm

@codah I've read ashley's tutorial and just finished with the other 2, as they are very helpful, I don't think they really solve my problem! :/
I've solved how to support the screen sizes of iPhone 4 & 5 by centering everything (I thought I would be able to keep doing that to avoid the problem) but now I need to have a bar at the bottom to stay at the bottom somehow, and I feel like anchor would be the best solution if I actually knew how it worked and such :P
Website Twitter Indie Developer
B
20
S
6
G
4
Posts: 206
Reputation: 2,954

Post » Sun Jan 04, 2015 3:48 am

I'm not sure how they don't address your needs. You want to support 2 aspect ratios, 3:2 and 16:9. The height or width don't matter as such, it's just the aspect ratio.

What I've done on 2 projects is:
set Scale outer on my project
set Window size to the 16:9 aspect ratio
make the layouts' width to the 'wider' aspect ratio (e.g. 3:2)
make sure the important stuff is in the 'safe zone' of 16:9

I did use Anchor on one of those projects to keep buttons on a button bar in position.

So anyway what happens when you try to use Anchor, even in a test project? Can you provide a capx?

note: I have no iPhone app experience, but as far as I can see the above holds true.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Tue Jan 06, 2015 1:43 pm

Figured it out with anchors! You need to have the actual object on the window edge for it to work, so dumb of me xD
Website Twitter Indie Developer
B
20
S
6
G
4
Posts: 206
Reputation: 2,954


Return to How do I....?

Who is online

Users browsing this forum: draiza and 6 guests