Sign in to follow this  
BloodWarrior

GUI Images on Mobile Phones

Recommended Posts

Heyas Just to sound off some concepts On my current game Im using an image(s) for the splash screen and for the game menu itself. This looks great but of course it means that the size of the display is fixed directly to the size of the used images. How do you guys handle this? I mean it will look great on any phone with a 208x208 res, not so bad on anything bigger (it centers the image and paints background color) but awful on anything that has a smaller screen as it will clip out the screen. Do you guys manually paint your GUI using draw methods? or do you do images as well? Maybe multiple versions per phone specs? Yours Truly K

Share this post


Link to post
Share on other sites
Use a couple of different images that are different sizes i.e.. one for large screens like your phone, a slightly smaller one for medium screens and a really small one for older phones with really small screens.
Then just use a preprocessor to define the three seperate builds and then //ifdef to select which one to use for the current build.

Share this post


Link to post
Share on other sites
No no, thats cool.

If you guys are using multiple versions per phone spec (in this case screen size) that is more than fine by me.

My current J2ME project is only for portfolio purposes so Im not interested in making it work in several type of phones. Just want to prove i can do something useful using J2ME.

I just wanted to make sure that I was actually doing it right (even if limiting myself for one configuration)
Had someone told me that there was some method for doing this that was better (besides using a TiledLayer to draw the GUI) i would take into consideration and improve my code.

Thanks mate,
Its good to know im still on the right track

Yours Truly
K

Share this post


Link to post
Share on other sites
I follow a similar path that Buster2000 takes. Above all, the games I make must be portable due to the large number of handsets that must be covered, in order to do that I scale the menus accordingly for all screen sizes. The scaling can be art changes, scrollable options, or what is most likely, a combination of the two.

Share this post


Link to post
Share on other sites
Most commercial games will have many different versions for different devices.

But if you want to minimize the number of versions one thing you can do is not use one full screen image, but instead have separate smaller images to "build" a background. For instance, have some graphics that can be tiled to form a nice border and a smaller image with the game/studio name or logo in the center. If you detect that the resolution of the phone you're running on is not big enough you can draw the screen without border.

Another option is to use simple rendered effects like star fields, animated gradients, animated fonts and avatars over a simple background, etc. that can be rendered properly by getting the resolution at runtime.

Also, if you want to resize images, here's some code.

shmoove

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this