resizing canvas in html

0 favourites
  • 3 posts
From the Asset Store
Simple resize and rotate events for any sprite, quick and easy event sheet that you can use for your own projects.
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • 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" >

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)