How to get HTML5 to fit / fill different resolutions? (Q)

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi guys!
    I cant wrap my head around how to get my HTML5 game fill or fit inside the browsers / window on different devices with different resolutions.

    So far I made the scaling with CSS but that takes the interactivity away.

    So all hints, advice tips are welcome.

    I tried with some javascript but cant get the canvas to be drawn.

    Best regards/ Daniel

    Best Regards // Daniel KO Pettersson
    Please login to see this link.

    • Please login to see this link.
    • Please login to see this link.
    • Please login to see this link.
    • Please login to see this link.
  • I'm still working (fighting) on this. I´m trying with iframes for now

    Best Regards // Daniel KO Pettersson
    Please login to see this link.

    • Please login to see this link.
    • Please login to see this link.
    • Please login to see this link.
    • Please login to see this link.
  • As long as I tick "Resize display to fill window size" it seams to scale properly.
    (thanks to Please login to see this link. who explained)
    A landscape project scales fine, a portrait project scales fine.

    But it seams that the orientation of the scale is bound to the width and height settings of the project and cannot be changed in run time nor between frames.

    I'm working on a project that will have one landscape layout an one portrait layout.
    If anyone know anything about adjusting this, feel free to tell :)

    Best Regards // Daniel KO Pettersson
    Please login to see this link.

    • Please login to see this link.
    • Please login to see this link.
    • Please login to see this link.
    • Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!