Hey all!
I've never seen a well implemented verbcoin, but people keep telling me that there's this hypothetical verbcoin that is really the best UI ever. Since I can't find it (side note: if you've made one, please share, the verbcoin template that comes with AGS counts as one of those horrible ones, and I've seen people complain about the template available on these forums as well), I decided to make it myself. And for that, I need your help!
Some design points I gleaned from these forums on what is the best kind of verb coin:
So what I came up with (I can share the entire game if you like, but I'm not sure it's necessary just at this moment):

(don't be bothered too much by those things in the corners, those were just to test the literal edge cases)
Code: ags
So what I'm asking help for is to make this system as user-friendly as possible, and to have the code as generalised as possible (so it can be made a template for any game), and if there are any potential bugs or improvements. I don't really need help with the art, but if you're willing to provide something I can use better than what I'm using now (thanks, cat!
), then I'd be more than grateful to use it.
Specific things I'm currently unsure about:
Sorry for the long post (hope that doesn't translate to a lack of responses), and thanks in advance for all your help!
I've never seen a well implemented verbcoin, but people keep telling me that there's this hypothetical verbcoin that is really the best UI ever. Since I can't find it (side note: if you've made one, please share, the verbcoin template that comes with AGS counts as one of those horrible ones, and I've seen people complain about the template available on these forums as well), I decided to make it myself. And for that, I need your help!
Some design points I gleaned from these forums on what is the best kind of verb coin:
- Left-clicking where there's no interactable makes you walk there
- Left-clicking where there's an interactable opens up the verb coin around the point you clicked
- If you click in a corner, the verbcoin opens such that it would fit on screen
- Interactions are LOOK, USE, TALK and OPEN INVENTORY
- Right-clicking does nothing (although I don't think I'd ever want to make a generalised UI for both PC and mobile, apparently it's important)
- Clicking outside the verbcoin closes it
- Moving the mouse around without clicking shows whatever is under the mouse (not relevant to mobile, though)
- The eventual game would have keyboard shortcuts, but I've not currently implemented them, as I wanted to get a feel specifically for the verbcoininess of this system
So what I came up with (I can share the entire game if you like, but I'm not sure it's necessary just at this moment):

(don't be bothered too much by those things in the corners, those were just to test the literal edge cases)
// main global script file
int verbCoinX, verbCoinY;//stored coordinates of whatever the user clicks to have the verbcoin pop up
function repeatedly_execute()
{
if ((gVerbCoin.Visible==false) && (tLabel.Text!=Game.GetLocationName(mouse.x, mouse.y))) tLabel.Text=Game.GetLocationName(mouse.x, mouse.y);
// gVerbCoin is the Verbcoin GUI, tLabel is the label showing what interactable is under the mouse
}
function on_mouse_click(MouseButton button) // called when a mouse button is clicked. button is either LEFT or RIGHT
{
if (IsGamePaused() == 1)
{
if (gVerbCoin.Visible==true)
{
if (GUI.GetAtScreenXY(mouse.x, mouse.y)==null)
{
gVerbCoin.Visible=false;
}
}
}
else if (button == eMouseLeft)
{
if (GetLocationType(mouse.x, mouse.y)==eLocationNothing) cCharacter.Walk(GetViewportX()+ mouse.x, mouse.y, eNoBlock, eWalkableAreas);
else
{
verbCoinX=mouse.x;
verbCoinY=mouse.y;
if (verbCoinX<gVerbCoin.Width/2)gVerbCoin.X=0;
else if (verbCoinX>System.ViewportWidth-gVerbCoin.Width/2) gVerbCoin.X=System.ViewportWidth-gVerbCoin.Width;
else gVerbCoin.X=verbCoinX-gVerbCoin.Width/2;
if (verbCoinY<gVerbCoin.Height/2) gVerbCoin.Y=0;
else if (verbCoinY>System.ViewportHeight-gVerbCoin.Height/2) gVerbCoin.Y=System.ViewportHeight-gVerbCoin.Height;
else gVerbCoin.Y=verbCoinY-gVerbCoin.Height/2;
gVerbCoin.Visible=true;
}
}
else //Right-click, which does nothing right now
{
//Room.ProcessClick(mouse.x, mouse.y, eModeLookat);
}
}
//If the player clicks the LOOK icon on the verbcoin
function bLook_OnClick(GUIControl *control, MouseButton button)
{
gVerbCoin.Visible=false;
Room.ProcessClick(verbCoinX, verbCoinY, eModeLookat);
}
//If the player clicks the USE icon on the verbcoin
function bUse_OnClick(GUIControl *control, MouseButton button)
{
gVerbCoin.Visible=false;
Room.ProcessClick(verbCoinX, verbCoinY, eModeInteract);
}
//If the player clicks the TALK icon on the verbcoin
function bTalk_OnClick(GUIControl *control, MouseButton button)
{
gVerbCoin.Visible=false;
Room.ProcessClick(verbCoinX, verbCoinY, eModeTalkto);
}
So what I'm asking help for is to make this system as user-friendly as possible, and to have the code as generalised as possible (so it can be made a template for any game), and if there are any potential bugs or improvements. I don't really need help with the art, but if you're willing to provide something I can use better than what I'm using now (thanks, cat!

Specific things I'm currently unsure about:
- I had initially thought to use radial menus, because apparently they're the best, but ran into issues with screen edges. Along the edge, I'd have to rearrange the button positions, and depending on the number and size of the buttons, and whether the click is near the corner, the buttons would not fit. So currently, it's just a GUI with 4 buttons in fixed positions relative to each other. Does someone have a suggestion that would make radial menus viable, or is it fine as is?
- I'm assuming there's an optimal size of Verbcoin/buttons/mouse to screen ratio. If someone can point to a better one, I'd appreciate it. Currently the resolution is 320x200, the verbcoin buttons are 32px large, and spaced 70px away from each other (corner to corner, not centre).
- CrimsonWizard in another thread suggested a system where once the verbcoin is opened, the mouse pointer would disappear, and one of the buttons would be highlighted to be clicked, moving the mouse in another direction would highlight another button. This system would have the issue of requiring another button to close the verbcoin, and would require a rethinking of the button placements. Is it worth it? Would it be better?
- Verbcoin currently closes when you move the mouse out of the verbcoin range. Should an X button be added to be able to explicitly close it? Or some other system to close it?
- I just randomly set the current buttons and their placement. Do you feel something else would be better? Should inventory be there, or be opened through something else? Disadvantage of having inventory only through the verbcoin is that you may want to check your inventory without wanting to interact with something on screen. What about a settings menu? Where would these go if they weren't in the verbcoin?
Sorry for the long post (hope that doesn't translate to a lack of responses), and thanks in advance for all your help!