Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  Widget "controls"  (Read 3092 times)

0 Members and 1 Guest are viewing this topic.

_people_

« on: 10, August 2014, 21:46:47 »
Some old code in my combatBalance stream was a functional prototype of a feature which allowed widget "controls" (checkboxes, buttons, etc.) to be added to the client's widgets. The goal behind this was to make it easier for the server to communicate with player input for the ultimate goal of tradeskills.

In this code, widgets have a group of controls which have callback functions for activation (ex. buttons clicked) which could then send values of other controls for the server. I had a widget set up that would allow the player to drag items into a "smithing" menu, check a few checkboxes, and send the items and checkbox states to the server.

I'd like to look into that again for future implementation of tradeskills. However, being that development is different than it was (IIRC Smacky wasn't active at the time) I'd like to ensure I'm not stepping anywhere I shouldn't. Is there any progress as far as the client's concerned that would interfere with or obsolete this implementation?
-- _people_ :)

smacky

« Reply #1 on: 11, August 2014, 21:58:24 »
I think I'm missing something.

The method of player input (ie, clicking things, gestures [uggh!], typed /commands and bound keystrokes, etc) is separate from the method of sc/cs communication (ie, ideally 'binary'-type cmds [some tidying of existing ones is needed, eg, to not send a 4-byŧe word when a single byte, or sometimes less, will do] or if necessary 'string' cmds).

That said, I had a working general system of widget controls in some version of SECoND to literally control widgets (eg, show/hide, minimize/maximize) and was long planning to improve/rewrite the slightly crude and unfinished checkbox, button, etc system used in eg, the options menu.

In short, yeah those would all be good projects but, IIUC, several separate projects. Note also that if you start adding/changing server/client cmds that is almost certainly a Y update,

_people_

« Reply #2 on: 12, August 2014, 01:15:52 »
Right.

Tradeskills and widget controls are two separate features. However, properly-implemented tradeskills depend on a more powerful widget system (unless we want incredibly-complex /commands). What I was asking about was the widget control system (checkboxes, buttons, etc.) that I had mostly implemented when I was fiddling with tradeskills. Tradeskills themselves would require a Y-update, obviously, because we're adding CS_CMD_SMITHING or whatever.

However what I was wondering was, if it would be worth  my time to revisit my implementation of widget controls, or if SECoND would have a better system already in place.

So, when the player applies an anvil or whatever, the server sends the client a message saying "hey, it's time to start smithing". The client receives that and opens an interface with controls on it. Then when the player presses "OK" the values the player specifies (which items to use, any other options the player can pick) is put into a binary CMD and sent back to the server.
-- _people_ :)

smacky

« Reply #3 on: 12, August 2014, 12:50:50 »
Yes, a nice clean, powerful, flexible, and hopefully extensible widget control system should be put in place first. Ideally I'd like to bring in the one from SECoND (if only because I know how it works). Obviously I have no idea what your older code does, so maybe it's better, so merging the two might be best. That said, I totally rewrote and tidied widget.c/h (and related code) for SECoND to both allow the new features and remove old redundancies and bottlenecks. Obviously since then we rolled back the client code so now reapplying a subset of SECoND changes (and possibly merging in your changes too) is maybe not trivial (not
a total nightmare either).

But do this before implementing tradeskills as widget controls themselves are client-only so we can whack them on top of any Z update, and thus preoare the ground for a tradeskills Y.

Tags:
 

Related Topics

  Subject / Started by Replies Last post
0 Replies
1569 Views
Last post 09, August 2006, 05:32:46
by Jer
0 Replies
942 Views
Last post 12, June 2007, 11:40:01
by trepie
5 Replies
860 Views
Last post 09, August 2007, 19:29:29
by Jeffdunham
14 Replies
3236 Views
Last post 09, September 2007, 01:10:22
by subaru
13 Replies
2336 Views
Last post 07, June 2008, 18:15:56
by Animegirl777