Best way to make a Game Menu ?

Anything libgdx related goes here!

Best way to make a Game Menu ?

Postby albarazer » Sun Apr 29, 2012 4:28 pm

I've been looking for quite some time now to how I should make a nice graphical ui.
I searched and found that many people all do it in a different way, like a Stage with Sprites for buttons, Scene2dUI, TWL (btw where did the gdx-twl.jar backend go?), and even Android's 9patch images. I'm quite lost now on which way to go, and how to start implementing it.

I'd like to create a menu similar to most "quality" Android games or flash games, with just basic Buttons and Textviews (optionally an animated background).

What is the most recent/prefered way to do this?

Thanks.
albarazer
 
Posts: 28
Joined: Fri Apr 27, 2012 11:40 pm

Re: Best way to make a Game Menu ?

Postby Mats » Sun Apr 29, 2012 5:21 pm

I'm very happy with scene2dUI in combination with tablelayouts.
   Image  Image  Image
Mats
 
Posts: 130
Joined: Fri Sep 23, 2011 1:17 pm

Re: Best way to make a Game Menu ?

Postby bach » Mon Apr 30, 2012 6:50 am

albarazer wrote:I've been looking for quite some time now to how I should make a nice graphical ui.
I searched and found that many people all do it in a different way, like a Stage with Sprites for buttons, Scene2dUI, TWL (btw where did the gdx-twl.jar backend go?), and even Android's 9patch images. I'm quite lost now on which way to go, and how to start implementing it.

I'd like to create a menu similar to most "quality" Android games or flash games, with just basic Buttons and Textviews (optionally an animated background).

What is the most recent/prefered way to do this?

Thanks.


The reason why everyone mentions something else is because there are many ways to achieve the same thing :D

Try a few different methods and see what suits the situation best. Scene2d definitely has a few useful tools for UI development. However a simple button does not require you to use a scene and can be achieved with a few lines of code instead.

Bottom line: Use what fits the situation best :)
bach
 
Posts: 713
Joined: Mon Mar 07, 2011 1:50 am

Re: Best way to make a Game Menu ?

Postby Obli » Mon Apr 30, 2012 7:30 am

I totally agree with bach. Everyone create menus differently. So go for scene2d, others for scene2d.ui, and the rest only use sprites.
Obli
 
Posts: 616
Joined: Mon Jan 10, 2011 6:18 pm
Location: Bordeaux, France

Re: Best way to make a Game Menu ?

Postby albarazer » Mon Apr 30, 2012 1:52 pm

Obli wrote:I totally agree with bach. Everyone create menus differently. So go for scene2d, others for scene2d.ui, and the rest only use sprites.


Ok I'll go for scene2d.ui then, it looks good :)
But with for example a Button, I can choose a constructor with Skin, or ninePatch (and others), which one should I use?
NinePatch are just some images I can easilly make with Android's draw9patch.exe, but Skin seems to be very complicated.

Skin somehow looks like the way to go, but I guess there's no editor for it, and writing everything in JSON (?) is quite difficult for ui.
albarazer
 
Posts: 28
Joined: Fri Apr 27, 2012 11:40 pm

Re: Best way to make a Game Menu ?

Postby Mats » Mon Apr 30, 2012 8:45 pm

http://code.google.com/p/libgdx-users/wiki/Skins

I recommend skin. It makes it easy to skin your entire application. However, you may as well just create an individual style and use it for your button, if you don't plan to skin/style your entire app.
   Image  Image  Image
Mats
 
Posts: 130
Joined: Fri Sep 23, 2011 1:17 pm


Return to Libgdx

Who is online

Users browsing this forum: Alexa [Bot], Bing [Bot], Google [Bot] and 9 guests