Menu System

Started by dectar, February 24, 2011, 02:33:56 PM

Previous topic - Next topic

dectar

Hi,

for an android game what do people suggest is the best way to create a menu system?

1) A separate android activity with button widgets etc (isolated from jpct-ae)
2) Blitting a full menu via jpct-ae
3) 3d objects with a camera facing them head on
4) Any other suggestions?

Im not looking for any example code or anything like that, Im just curious as to what is the general method for developing a menu system for a jpct-ae game so that I can start investigating that method without wasting time on something which people may know to be a dead end.

Many thanks

tyronetudehope

What I'm doing is building menu or UI "components" that can then be blitted to the screen. For text blitting I'm using a slightly modified version of r.a.f.t's GLFont and TexturePack, @raft, I hope this is OK ???. And for the menu item containers, I'm just using dynamically created bitmaps of whatever colour the dev would like his/her menu to be. Am also using TexturePack for this. Then simply handle the click events by polling the click coords with the coords of each menu item and fire your own custom event.

I also thought about having an activity for handling menu operations, however, it made more sense to me to have an OpenGL based menu, whereby, you could, for example display a pause menu over your scene and will allow you to add screen controls to your game, like pause, change weapons, etc.

I hope this helps, it will be interesting to hear other ideas also, I'm sure there maybe better solutions to this.

dectar

Thanks for your reply. I have been thinking about blitting as being my number 1 option as well. I currently for test purposes have an activity with some buttons on it to load different levels but you cant really do much with that kind of menu system and I don't like popping in and out of activities.

So right now, I reckon I will probably do something similar to what you spoke about. Would be nice to have some sort of framework built around blitting for a menu system that would be reusable.

tyronetudehope

Essentially, I'm trying to develop a GUI framework for jPCT, thats as customizable as possible. However, am only in early stages of this. Once the framework starts to take shape, I'll open up the source :)

raft

Quote from: tyronetudehope on February 24, 2011, 03:34:22 PM
@raft, I hope this is OK ???.
sure, they are meant for this ;)

i myself blit images and in game-texts with TexturePack and GLFont. but for menu's i use Android's gui elements, not in another activity but as semitransparent components over GL surface view. you can see screenshots here. (there seem to be a problem with imageshack so some of teh screenshots are not visible at the moment)
http://www.jpct.net/forum2/index.php/topic,1760.0.html

dectar

That game looks pretty damn awesome raft  :)

So all the individual in game objects are blits yes? But the menu screen at the bottom of the page is the android ui stuff? This is an interesting approach. So is this done by having a layout view that is just set to invisible unless its needed or do you render the components on the fly?

I know its not exactly part of this thread but Im interested in the control system in the bottom right of the pictures. Can you give me an overview of how that works? Even just a high level understanding. I have seen similar controls in various games but I wasn't sure how it was implemented. Are you just picking up touch co-ordinates or how does it work?

btw, Is it on the market yet? I searched for it but didnt find anything that looks like this?

Thanks

raft

thanks  :D

yes menu is made invisible during game. it's much easier to make a gui in android.

soft joystick works this way: user puts his thumb on it (exact position doesn't matter ) and slide to desired direction. I do the movement based on distance between touch point and slide point

jumpy is not complete and not in market yet. but you can download development version from the link in that thread

dectar

Hi Raft. Im now using your method for my menu system and its working out very well for me so thanks again for the suggestion.

raft

i'm glad it helped :D i final note, make your view GONE instead of INVISIBLE. according to my tests it performs better

dectar