Jump to content

Cross Browser Game


desmo
 Share

Recommended Posts

Hi,

 

I want to write a (pretty simple jump&run) cross browser web game for desktop and mobile browsers. 

As far as I know, phaser.io does not support vector game assets. Is this still correct?

 

I Plan to create 3 different versions of my game assets:

Big (Desktop), Medium (Tablet), Small (Phone)

 

Does this make sense to you? If not, why? Any other approach that worked for you?

How about Android performance? Basically, what is/was important in your projects?

 

Any help/recommendations (asset size (memory), performance issues on mobile devices) are much appreciated.

 

Thanks

 

Link to comment
Share on other sites

Thanks for your reply!

 

Do you have any experiences how well this works on android devices in terms of performance?

 

 

I think you can draw vectors to the canvas, you could auto detect the resolution of the device, then draw them all at the desired size on a spare page and blit from that. Then you will only need one set of graphics.

Link to comment
Share on other sites

Theres probably no need to create that many assets (asset creation is time consuming and difficult and you dont really want to do it three times if you can avoid it, unless you have a team of content creators I guess). Many HTML5 games run at sizes like 800x600, an iPad in portrait nearly supports this so just choose a size that fits tablet & desktop and then you just have to worry about phones.

 

Alternatively, and this is usually better but more complex, have you game render differently for different sized screens. Either show more of the game world for larger screens, or more UI. This is a difficult topic but it saves you creating a ton of assets (you'll probably need retina and non-retina assets anyway).

 

Modern Android devices now perform excellently, so long as you restrict yourself to newer versions of the OS I doubt you'll run into anything too difficult (yes, older devices are dreadful, particularly for web, steer clear if you can). Apple devices have a few quirks for web stuff but most things will just work. You'll have to handle device rotation (which most native apps lock, you cant for web) so thats a thing.

 

If you do go with loads of assets you'll want some sort of smart loader than only gives you the version of the assets applicable to that resolution. In the case of desktop where screen sizes can change during runtime you'll have to handle what happens if users move from a large window to a small one, do you pause the game and grab all the assets again?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...