Noob & Screen sizes

Get help using Construct 2

Post » Tue Sep 11, 2012 10:45 pm

Hi everyone,

I have already read the tutorial about supporting multiple screens, but I am stil in doubt...

A friend and I want to design a game for Iphone/Ipad and Android, and we have decided to use C2. But we still do not know how big should the background be to adjust to every device.
I mean, among our target devices, the iPad 3 has the highest resolution (2048x1536) so if we design our game with a background of that size, will it adapt to other devices or should we create antoher project with smaller (or different) size??

We have in mind two different games.

One is static (no scrolling) and the other with scrolling (both vertical and horizontal), so which should be the size of the background in both cases so they adjust to every device??

Maybe, the answer is in the tutorial but as a noob I am a bit lost, sorry

Thank you in advance, and apologies for my poor english.
B
5
Posts: 25
Reputation: 377

Post » Tue Sep 11, 2012 11:41 pm

http://www.scirra.com/tutorials/73/supporting-multiple-screen-sizes/page-1

---> http://www.scirra.com/tutorials/73/supporting-multiple-screen-sizes/page-2

Have you read through the second page, above? That should answer your question, I think.
B
28
S
6
G
5
Posts: 248
Reputation: 5,463

Post » Wed Sep 12, 2012 6:38 am

http://www.scirra.com/forum/multiple-resolutions-solid-example_topic50496.html

This could also be helpful.teahousemoon2012-09-12 06:38:50
B
28
S
6
G
5
Posts: 248
Reputation: 5,463

Post » Wed Sep 12, 2012 8:24 am

First of all thank you so much for your response.

I have read that manual several times and I believe that I have learnt it by heart... but I still can not figure out how to design our games...

I mean, in the case of the static (no scrolling) game, if I design the game in a 1024x768 background, will it "strecht" to adjust in an iPad3? or will it be reduced to work in a lower resolution device?

I suppose that the other case (vertical & horizontal scrolling) game will be more difficult, because if I create a 8000x8000 background and, for instance that backgroud has a city where the game takes place, how will it adapt to every device, I mean will the 8000x8000 background be proportionally "reduced" to devices size??

Thank you so much for your assistance!
B
5
Posts: 25
Reputation: 377

Post » Wed Sep 12, 2012 8:53 am

The supporting multiple screen sizes tutorial is a complete waste of time for mobile devices.

As far as I can tell, very few people are using C2 for mobile HTML5

After a month of groping in the dark and trying many different options, we took this approach:

1) use crop full screen mode.
2) make the backgroud 1024x1024 and center it.
3) make the screen size iphone 4 resolution = 640x832 and 960x536
3.5) use anchors to glue HUD bars, buttons etc to the corners/edges so they expand out to fill available space on longer thinner devices.
4) every tick examine the screen width/height and see if its changed.
5) if the size has changed, scale all layers except background to best fit keeping aspect ratio
6) Hack the index.html to make the browsers address bar go away in iphone and android
7) Export a version of the project with retina display switched off for the ipad 3. (have to detect in in js).   ipad 3 will scale up ipad one resolution, which is 1024x768 - tool bars etc. you wont be able to tell the difference.
8) have separate layouts for portrait and landscape modes, and you have to store the state of your game as when you switch layouts, it destoys everthing.
9) Export a version for the PC with fixed size or letter box scaling and landscape mode.
10) had problems getting anything to work properly on iphone3 - decided not to support it (the only way to detect it is to run a speed test in js).
11) C2 has no concept of modal dialogues, and no way to disable users clicking on sprites, even if they are invisible and hiden under layers/bottom of z-depth. you have to design your game with all the user input in a small a number of groups as possible, and then disable groups to switch of game input while diplaying psudo-dialogs.
12) dont forget to select the option in the touch settings to make mouse input act as touch.

I implemented swipe also, to swipe in left and right layouts with settings, info etc. There is no gesture support, so I wrote my own just tracking the touch coordinates.

Good luck.nutmix2012-09-12 09:51:52
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Wed Sep 12, 2012 9:09 am

Wow! Thank you for your prompt response...

Now I feel quite dissapointed because my friend and I have very little programming experience, and we thought that C2 would be the answer to our praises, but it seems it is not...

I will keep investigating C2 but if it is so complicated to adapt to mobile devices, I do not know.... what else can I do?

Thank you so much.
B
5
Posts: 25
Reputation: 377

Post » Wed Sep 12, 2012 9:44 am

Im guessing that appmobi and phonegap solve a lot of the mobile issues. These are not an option for us as we do casino style games, which are not allowed in the appstore, and also we dont want to pay apple 30%.

If you wrote the games in js and HTML5, you would have the same issues.

I did a few prototypes in Impact, and this has similar issues (and you need to know javascript).nutmix2012-09-12 09:48:43
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Wed Sep 12, 2012 11:39 am

We were thinking of using C2 + phone gap (We had not heard of appmobi before)...

How difficult will be to develop something (C2 + phonegap) that works in the most part of the devices??
B
5
Posts: 25
Reputation: 377

Post » Wed Sep 12, 2012 2:49 pm

I disagree with @nutmix's assessment and as far as I am aware the 'supporting multiple screen sizes' tutorial techniques work well for most games, including our own demos. All you should need to do is set the project's fullscreen mode to 'Scale' and draw backgrounds a little larger than necessary to ensure aspect ratio changes don't end up showing empty space. I really don't recommend using separate layouts for portrait/landscape! This goes against the design of Construct 2 and it's really no surprise you'd struggle if you did that.

I would strongly recommend using the techniques in 'supporting multiple screen sizes' as a starting point. If you have trouble or it's not doing something you need, post to the forum and we can help you figure it out in a way which works nicely with C2. If it's still a struggle, we can always add new features to C2 to better support it, without forcing you to jump through hoops, and making sure it's a smooth and easy experience.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Wed Sep 12, 2012 3:21 pm

One thing to add.

Don't even think of using a 8000x8000 px sprite as a background or anything. Do you think "The Legend of Zelda" (NES or SNES versiones) has a 8000x8000px background to represent the whole map? The map is subdivided in N backgrounds to represent the whole thing and the game loads the current piece (background) of the map on demand (something like that).

First. If you want that, you have to subdivide your 8000x8000px background in multiple little pieces.

Second. IPAD or Iphone (any version) doesn't support that size for textures (4096x4096px for IPAD 3 & Iphone 4S and 2048x2048px for IPAD 1, 2 & all other iphone versions).

Third. A 8000x8000px image turns to be a 244mb image on VRAM (killing any device with 256mb shared memory and maybe 512mb shared memory devices too because we are not taking in account the SO, other apps and of course your game).
B
29
S
6
G
5
Posts: 148
Reputation: 5,084

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests