marvster Posted April 20, 2014 Share Posted April 20, 2014 Hello together, until now I have always used html for game menus as div overlay, because ajax and dom manipulation comes very easy as well as controlling menus via mouse and keyboard. This time I will aim for a seamless ingame menu direct on canvas, as my learning project (jrpg) heavily relies on menus.Are there any good showcases and sources where I can see how to manage complex menus usable via mouse and keys (as the rest of the game is keys only)? As I have seen, most arcade mini games with comes with maximum of two, or three buttons (play, pause, mute) and just one start menu. Link to comment Share on other sites More sharing options...
jpdev Posted April 20, 2014 Share Posted April 20, 2014 hi marvster, From what I can tell from the phaser examples (they are exhaustive and great) there is no native support for complex menus. But from my experience with my mini game memory I can tell you, that buttons and tweens are easy to manage and I think that dynamic/complex menus are achievable, but you would have to write some kind of menu manager for it. (The memory game does not have any menus, but all the cards are buttons and they tween out at the beginning of each game - think of that as opening a menu) So you could make buttons, that when clicked display more buttons. (If you want it smooth and animated use tweens to display them.) In the end the question becomes how many levels does your menu need, how dynamic does it need to be. Put all the possible buttons-images (as long as they are the same size) into one image, load it as a spritesheet.Use this sheet for every button, so you can use the buttons again (not create new ones every time) and have them display what-ever the menu needs via setting the correct frame. For keyboard support you could use a sprite that is the outline of a button that you display over the active button, and on cursor-key-events move above the next button and on enter (or something else) trigger that button. Hope that helps a little,JP Link to comment Share on other sites More sharing options...
ctmartinez1992 Posted April 20, 2014 Share Posted April 20, 2014 I would like to have something to show but, i have never found anything too much complex. One of this days i swear to god i'll right one and be done with it.For the time being you can make some simple, not too complex, menus with tweens and Phaser.Button Link to comment Share on other sites More sharing options...
Heppell08 Posted April 20, 2014 Share Posted April 20, 2014 This give me an idea. I could probably write a menu with states. Its something I already do as well as modifying variables outside the js state file. Depends what you'd need though and how 'complex' it would need to be. Link to comment Share on other sites More sharing options...
marvster Posted April 21, 2014 Author Share Posted April 21, 2014 Thanks for your answers, it seems that I have to take much more time and effort in menu managment as I thought. My basic idea was to have menu as just one state to keep the states as simple as possible:gameOver<>combat<>localMap|worldMap<>menu But maybe I should work this out as:[..] menu <> status | items | equip | cure | switch | skills | class | saveWith each screen completely handled with lists, information container, buttons and focus handler for key-input. If anybody knows a way, or a cool lib of menus direct to canvas, just let me (and others) know. Link to comment Share on other sites More sharing options...
Recommended Posts