The Daily Click ::. Forums ::. Klik Coding Help ::. does anyone know how to make a ring menu? (i.e. Secret of Mana)
 

Post Reply  Post Oekaki 
 

Posted By Message

NMasutaa



Registered
  26/12/2004
Points
  301
11th April, 2008 at 17:06:44 -

Does anyone know how to make a ring menu like the one in Secret of Mana? And also how to pause the game when the ring menu shows up?

 
n/a

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
12th April, 2008 at 05:23:02 -

I havn't played the game but I believe I know what you mean.

Without going into the details, it would be best to look at trigonometry (to make things move in a circle) and there are numerous ways to pause the game, probably the most common way people do it is by putting the main game events into a group and disabling the group when you want to pause.

 
n/a

NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
12th April, 2008 at 09:51:15 -

Use values, resized pictures and change the position of the menu.

 
I have proven new mathematic formula to be true...

2D > 3D

Image


Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
13th April, 2008 at 09:23:17 -

you could use a circular double-node reference based list to store all the menu items. Then just compute the items position as follows:

x = center point of circle
y = ditto ^
xMenu = x location of the menu item
yMenu = y ^
c = radius of circular menu
itemID = item's ID in the menu
currID = ID of menu item currently selected in list.
arcDist = angle of arc between two menu items
rotSpeed = menu rotation speed

For this code I will assume that each menu item is a separate active object.

>upon pressing left
- currID ++

>upon pressing right
- currID --

>Always
- set arcDist = 360 / (size of menu)
- set targetAngle("menu item") to (arcDist(itemID - currID) + 90)

>if (angle("menu item") < targetAngle("menu item"))
- add to angle("menu item") : (rotSpeed)

>if (angle("menu item") > targetAngle("menu item"))
- subtract from angle("menu item") : (rotSpeed)

>Always
- set xMenu to (x + c*cos(angle("menu item"))
- set yMenu to (y - c*sin(angle("menu item"))

 
n/a

NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
13th April, 2008 at 12:25:17 -


Originally Posted by Snerlin - taco advocate
you could use a circular double-node reference based list to store all the menu items. Then just compute the items position as follows:

x = center point of circle
y = ditto ^
xMenu = x location of the menu item
yMenu = y ^
c = radius of circular menu
itemID = item's ID in the menu
currID = ID of menu item currently selected in list.
arcDist = angle of arc between two menu items
rotSpeed = menu rotation speed

For this code I will assume that each menu item is a separate active object.

>upon pressing left
- currID ++

>upon pressing right
- currID --

>Always
- set arcDist = 360 / (size of menu)
- set targetAngle("menu item") to (arcDist(itemID - currID) + 90)

>if (angle("menu item") < targetAngle("menu item"))
- add to angle("menu item") : (rotSpeed)

>if (angle("menu item") > targetAngle("menu item"))
- subtract from angle("menu item") : (rotSpeed)

>Always
- set xMenu to (x + c*cos(angle("menu item"))
- set yMenu to (y - c*sin(angle("menu item"))



Well easier si if you make menu markers (irems, equipment etc.) in different sized.

When Global value A=1
- Set position of (Equipment marker) (0,0) from player
- Set position of (Items marker) (10,0) from player
etc. (eample positioning!) and
-Set (Equipment marker) direction into ...

And make different sized pics of the menu markers into the directions, like down is largest, up is smallest etc.

I think this is much easier to understand than snerlins ring menu.

 
I have proven new mathematic formula to be true...

2D > 3D

Image


Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
13th April, 2008 at 13:04:10 -

or you can just scale them in runtime.

Image Edited by the Author.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click