resizing canvas in html

Discussion and feedback on Construct 2

Post » Sun Sep 29, 2013 6:56 pm

Hi,

I created a game with a window size of 2048x1536px and the property "Fullscreen browser" set to "Letterbox scale" When I put the game in html I can't redefine the game at 800x600px, it is always displayed on 2048x1536px. This is the code I use html:

     <div id="c2canvasdiv" style="margin: 0 auto; width: 800px; height: 600px;"><canvas id="c2canvas" width="800" height="600">
....
......

How can I resize the game in html? i'm really confused, the size of my game is very big and i can support multiple screen size, but i can't set a smaller dimension. Should I have more versions of the same game? maybe for html and for phone?

Thanks a lot and Best Regards,
Ivan.

B
6
S
2
Posts: 18
Reputation: 1,111

Post » Sun Sep 29, 2013 10:14 pm

figure out how to use scaling my game was made 640*480 and works portrait or the preferably landscape

I have screen shots of both on this thread
B
40
S
11
G
7
Posts: 514
Reputation: 9,646

Post » Mon Sep 30, 2013 9:00 am

I found the solution to my problem: IFRAME TAG

<iframe name="myIframe" id="myIframe" width="800px" height="600px" runat="server"
src="game.aspx" scrolling="no" >

B
6
S
2
Posts: 18
Reputation: 1,111


Return to Construct 2 General

Who is online

Users browsing this forum: mihirolover, TheRealDannyyy and 16 guests