window size

0 favourites
  • 4 posts
From the Asset Store
220 Food Sprites in 16x16 pixel size. Perfect for items for a retro style game.
  • hi everyone ^^ today i don't know if this is a bug or it just a mistake of what i did but see what i'm talking about in this capx :

    first of all this is a small example of what i want to fix , when you try it just click P and it will open a manu like ( pause ) in the games but the weird thing is this manu comes in really weird places and the event i did it is : windowhight/2 for y , window width/2 for x . and i don't know where is the problem also i have tried all the full screen options and none of them give a good result by the way the result i want to be created on the middle while the browser if expanded or minimized see these picture of what i have seen :

    <img src="" border="0">

    <img src="" border="0">

  • *bump*

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use the Viewport top/bottom/left/right values instead. WindowWidth/WindowHeight don't work well with scaling.

    x = (ViewportRight("layer") - ViewportLeft("layer")) / 2

    y = (ViewportBottom("layer") - ViewportTop("layer")) / 2

  • ramones , i have tried but the weird thing is that has the same problem .

    but i have tried to just write like this : my window width /2 , my window hight /2 so in action like this : 640/2 , 480/2 and its worked just fine but the problem in this : it need to re-fix in every windows so for every mobile if the game for mobiles .

    the weird thing as i mentioned before is that when i write it like this : windowwidth/2, windowhight/2 it really doesn't do the job i have no idea why o.o ..

    while i'm writing this post i have re-tried and put some text to see where is problem and i found that the window size change so thats why it keep getting new positions , also when i tried yours i always get sprite on 0,0 i don't know why ...

    anyother thing can fix this??

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