UI elements planning

Started by
1 comment, last by TechnoGoth 10 years, 1 month ago

I don't know how to build up a game UI.

To what elements should I tear down the UI.

In the images below lets take the 3rd screen, because it is close what I want.

It is a background image, it is "scrollable". The aqua + the sand

On top/bottom it is a layer where are static elements: control panel, "fish 17/19" text in this case.

There are "sprites" the fishes and other elements.

on some event should be a panel with a button / buttons: Game over, top score, new game.

Mixing layers with opengl + sdk usually a bad idea

Making the whole in sdk elements: usually not this used in games.

Making the whole on a surface/canvas: to much work

How to make a UI similar like this in Android with acceptable performance and not reinvent the wheel or use a buggy frameworks?

classifieds-169989-0-62211300-1393488343

Advertisement
For that style of simple sprite images, you absolutely could use simple UI objects and get reasonably responsive performance.

With simple graphics you can do pretty much anything you want. They may not animate at an extreme framerate, but with a small number of device-resolution UI elements you can expect double-digit framerates even on low-end devices.

If you are planning on more complex graphics or animations, then yes, you will probably need to invest the time to using something more advanced.

As for what the objects are, it looks like you've got it done already. A background image and some fish images, these compose the playing area that can be moved and scaled and manipulated. Also a hud image containing cutouts or two images if you want a pair of top/bottom areas, and then the images for numbers and symbols to draw over the top. For a simple game it could be a maximum of ten or twenty images on screen at a time. That is entirely within range for simple built-in graphical UI elements.

Seems fairly straight forward.

The top panel could be down with a couple of textviews wrapped in a horizontal linear layout.

The rest of the screen is a drawing panel which is a custom class you extend from Surfaceview that handles the rendering of your background image and sprites.

This topic is closed to new replies.

Advertisement