Changing screen scaling mode

Discussion and feedback on Construct 2

Post » Sat Mar 21, 2015 7:27 pm

Hi! Is there any way to change Fullscreen Scaling mode (Project Property) at start of the game?
In my case I want to use Letterbox Scale when game is running on mobile devices, and have no scaling (1:1) when game runs at desktop browsers.
Condition "Is on mobile device" fits perfectly, but then I can`t change this scaling mode. Browser objects has "Request Fullscreen" - but it dont have option to make scale 1:1, works only "on click" and hide browser interface...
I`m experimenting a lot with Canvas Size property and Layout Scale but not achieved desired results! :( Please help me find solution.
B
12
S
3
Posts: 56
Reputation: 893

Post » Sat Mar 21, 2015 7:40 pm

As far as i know there is no way of changing that during gameplay, as its the index.html that sets the different scaling property.

Not 100% sure it will work, but it should in theory.
1. Export the game several times, for all the different modes you need.
2. Save the index file with different names in the same game folder.
3. Create a landing page where you check if the game is on mobile and/or whatever checks you need, then use the Browser plugin and to goto URL and point to the index you need loaded.
Frosty Elk AB
www.frostyelk.se
Have no fear, We come in peace!
B
13
S
3
G
1
Posts: 106
Reputation: 1,169

Post » Sat Mar 21, 2015 7:58 pm

Thank you Frosty Elk for reply! As my experiments shows - Scaling property sits not in index.html, but somewhere in data.js or c2runtime.js so having 2 different index.html is not enough, I must have 2 version of the game to go to from "landing page". Not very elegant solution but it will works if I will not find anything better! :)

P.S.: Hm... I have an idea of having 2 differet index.html:
1. index.html original exported from C2
2. And edited index.html where game is inside of iframe with fixed size!
B
12
S
3
Posts: 56
Reputation: 893


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests