The Daily Click ::. Forums ::. Klik Coding Help ::. Menu screen examples...
 

Post Reply  Post Oekaki 
 

Posted By Message

Douglas Mathewson



Registered
  26/08/2008
Points
  1
26th August, 2008 at 19:07:36 -

Hi there, I am making a game but I am looking for some examples for introduction menus (e.g. pick save file...) for MMF2 just so that I can get some idea of how to code. Anyone got any links or even any examples that can help me out?


Cheers!
Dougie

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
30th August, 2008 at 13:50:56 -

It's no physical example but you can very easily make a fine-looking menu with only 1 counter and 1 active object. Make a bitmap or something that is the picture of your menu (like a box w/ frame and the actual text choices all in white). Okay now go into the animation editor and create a copy of that first frame for each of the possible menu choices. Now go back and recolor the text of the 1st frame something different, denoting a highlight. Move over to the 2nd frame and recolor the 2nd option, the 3rd frame the 3rd option, etc.

Now jump into the events editor and have a line that always forces this menu active object's animation frame to the value of your counter. Have 2 more lines in there saying: If the player presses "up arrow" and the value of the counter is > 1, subtract 1 from the counter. The other line should check to see if the player presses the "down arrow" and the value of the counter is < (max # of menu choices), add 1 to the counter.

You'd then of course have to check to see if the player makes his / her choices by making events like "If player presses [ENTER KEY] and Value of counter = 1 then jump to Frame 2" for each possibility.

And there you go! A very easy way to show a menu that highlights different selections whenever the player presses the up or down arrows. And since it's done with a picture you don't even have to use texts on that bitmap, you could use different pictures to describe each action highlighted (like a picture of a floppy disk for loading the game).

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
30th August, 2008 at 14:02:28 -

Image

Sort of like this above. I can't use Okelai-Dokelai to save my life but hopefully this illustrates the point better. Just remember you'd need a different animation frame for each of the menu options. This one above would need 5 frames.

Image Edited by the Author.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
31st August, 2008 at 13:04:18 -

If you want more freedom, for example positioning the options in more specific places, or animating them, or doing anything you like with them while you selected an option, it's better to have one active object per option and have it animate/do what you want when the counter's value equals "that" option.

For example:
If counter == 0
- Set animation of "New game" active to "Selected" (or whatever)

If counter != (is not) 0
AND If animation of "New game" != "Stopped"
- Set animation of "New game" active to "Stopped"

And that for every option. You still only need one counter, of course, and selection works the same as Mr Duio explained. Of course, now you can also add the possibility of mouse selection simply by having something like this, too:

If mouse overlaps "New game"
- Set counter to 0

...And the part above would do the rest. Deselection would be a bit more difficult and wouldn't support the keyboard anymore (because keyboard selection means one option always has to be selected...).

 
Old member (~2004-2007).
   

Post Reply



 



Advertisement

Worth A Click