Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Hi, How I can get the size of browser window.
Not the size of the screen.
For example the size of the screen can be 1024*728. But user can resize his browser on 321*500.
Where I can get this numbers?
Develop games in your browser. Powerful, performant & highly capable.
I would also like to know. This will be useful for dynamic canvas resizing, just like on the dynamic websites.
so... Is it any way to get the size of browser window?
I tend to think that we can't, but until someone knowledgefull confirm/disprove it, we'll won't know for sure.
WindowWidth and WindowHeight from System expressions is what you need
Thank you. For some reason the WindowWidth/WindowHeight were lodged in my mind as being equivalent to screen size. They indeed return the browser's active area dimensions.
It turns out that It's the lack off set WindowWidth/WindowHeight (or set aspect ratio) expressions that bothers me. The set canvas size doesn't work as I expected, I can't find a way to dynamically position and scale objects in relation to the browser's dimensions. The "Fullscreen in browser" and "Anchor" behavior doesn't seem to help either...