Full Screen

Subscribe to Full Screen 3 posts

avatar for evan999333 evan999333 322 posts
Flag Post

I am working on a tile based platform game and have found a strange problem when someone maximizes the swf to full screen. I think I know what causes it but am wondering if there is a way to fix it.

My tiles are all 25×25 pixels big and when someone presses full screen very small lines appear throughout the screen in between the tiles. What I think this is, is flash increasing the size of the tiles but instead of doing a 1:2 ratio (for instance 25×25 becoming 50×50) it is adjusting it to a slightly different size based on the persons screen size. So instead of going 1:2 is might be going 1:2.01 so the tiles go from 25×25 to 50.25×50.25.

What this can do is really mess up my hitTestPoint tests with the player against platforms because the lines shift the tiles slightly.

Anyone know exactly whats happening or how to fix it?

 
avatar for jasonjie88 jasonjie88 302 posts
Flag Post

I have heard that hitTestPoint can become pretty wonky when an SWF becomes full-screen.

 
avatar for player_03 player_03 1249 posts
Flag Post

I don’t think hitTestPoint is affected by the scale of the stage.
I also don’t think you should be using hitTestPoint at all. You should consider calculating the collisions yourself; it isn’t that hard if you’re already using tiles. At the very least, consider doing so for your next game.

(By the way, a common solution to the visual problems you described is to make all the tiles one pixel bigger, so they overlap a little.)