Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Coming back to WME (well trying)  (Read 3778 times)

0 Members and 1 Guest are viewing this topic.

Uhfgood

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 117
  • No pain, no game!
    • View Profile
    • Indie Flux
Coming back to WME (well trying)
« on: July 29, 2012, 11:32:13 PM »

Hello, this is Keith aka Uhfgood.  Lately I've been working on a game demo in Adventure Game Studio, and I have come to some problems, so I decided I want to see if I could recreate the progress I've already made in AGS in other adventure game engines.  Specifically WME here.

My user interface is a bit different than the average interface.  It works on a radial (pie, circular) menu, and NOT on buttons.  That is you don't click on a button to execute an action.  Instead you click to open the pie menu, and then you move your mouse in different directions (different angles) in order to select different options.  Then you click to execute the option the "pointer" is on.  The pointer is simply the mouse angle or line from the center of the menu to the mouse position.  This helps with a couple of things, one being that you can get more options in the same area as normal buttons.  Another being you can move the mouse anywhere on screen and still get the option you want.  If these were buttons you would have to have your mouse cursor over (or on top of) the buttons.  Then in the future I plan to have an "express" mode, where you simply click-drag-release to execute an action without the menu even showing up.  The theory being that the player will eventually get used to the controls enough he/she doesn't even have to look at the menu to get the correct option.

Now again I want to mention that this is not a button based menu, it's based on mouse angle.  I want to re-create this in wme.  So not only would I like to be able to get the mouse angle (which should be easy enough with WME's math functions), I would like to be able to draw a line from the center of the menu to the mouse cursor.  (In case drawing a line on screen is a problem in WME, I'm prepared to fake it with sprite frames).  So I'd like to know what the best way to approach this is?  (I think I could make a few static controls, and then script the interaction in separately -- since this doesn't use traditional buttons just animation frames).

In short I want to do this (click on the image in that post to see a video of the ags version in action)
http://www.gamesafoot.com/2012/07/16/el-progress-report-8/

Please do not assume those options (like look at, talk, get, etc) are buttons, because a button needs a rectangular region, and if you move off of it then you can't execute the option, mine on the other hand only relies on the direction the mouse is in relationship to the menu.  In fact you have to close it without doing anything by clicking on the center, which is known as a dead-zone.

Thanks for your time.
Logged
--------------------------------------------
Keith Weatherby II
uhfgood -AT- frontier -DOT- com
Games Afoot Software
Indie Flux - Previews, Reviews, News and more!
--------------------------------------------

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Coming back to WME (well trying)
« Reply #1 on: July 31, 2012, 03:22:08 AM »

I can't offer ready to use code but I can confirm it should be easy to create such a pie menu in wme. All you need to do is check the coordinates of where the player clicks, the coordinates of where the cursor is now and then use very simple maths to find the angle and perform an action based on that.

As for the line, wme doesn't offer vector shapes but you can do it by using sprite rotating & scaling (check entity object in the docs).
Logged
fl*p

Uhfgood

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 117
  • No pain, no game!
    • View Profile
    • Indie Flux
Re: Coming back to WME (well trying)
« Reply #2 on: August 01, 2012, 05:31:21 AM »

I was mostly curious as to how to approach constructing the menu.  Should I make a window in the window editor and then make a static control?  Or maybe just use an entity object (but as I understand it entity objects are placed within a scene and I need to be at absolute screen position).  Another option is creating a multi-frame sprite and switch to the correct frame based on script.  I don't know how to display just a sprite on the screen though.
« Last Edit: August 01, 2012, 06:33:15 AM by Uhfgood »
Logged
--------------------------------------------
Keith Weatherby II
uhfgood -AT- frontier -DOT- com
Games Afoot Software
Indie Flux - Previews, Reviews, News and more!
--------------------------------------------
 

Page created in 0.04 seconds with 23 queries.