Show Virtual Pad During Flash?



  • While I know it can be impossible to "know EVERY screen size" that you might come up against and develop for it, I have a slight problem.

    In my game Locker Raid, part of the map is obscured by the top gui. This is easy to fix. Simply lower the maps y position and done.

    However, on my phone, part of the map on the bottom side of the screen is obscured by the, virtual pad. It's not the best, rather gimmicky, and doesn't allow for that complex moves. (Try jumping up, shooting down, and moving left/right in the Mode example)

    So, being at the bottom of the screen, it should be easy to fix, right? Simply limit how far down the map goes so it's not obscured.

    So, problem, how big is any screen the game is going to be played on? I don't know.

    HOWEVER. I can, maybe, find out on a 640x480(i know, i need to update my screen size, i know) where the virtual pad is exactly and then just account for that.

    And then the autosizing will just take that into account too?

    Right?

    So, can I show the vitual pad on flash?



  • Sigh:

    <haxedef name="VIRTUAL_PAD" if="mobile" />
    <haxedef name="VIRTUAL_PAD" if="flash" />
    

    Still though. If I just limit my map according to a 640x480 screen it should adjust for other screens, right?



  • @xhunterko

    It will scale to the different resolutions but you might need to account for the physical size. A 10" tablet will have physically large buttons and will be harder to use/reach the buttons. A phone will have smaller buttons and might be hard to use too. We can use openfl.system.Capabilities.screenDPI to calculate the physical size. (maybe there's a HF var already for this?)

    Also, the aspect ratios vary from almost square to extra wide screen. So with a squareish screen the vpad buttons might be better along the bottom, while on wide screen it might be better with them on the sides (landscape). 16:9 wide screen seems to be the most popular aspect ratio at this time.

    I've yet to deal with all this for my game, but thought I'd share these considerations.


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.