ID:265092
 
Listen up, people; Incursion needs your help.

I'm presently designing a map-based interface for most actions in Incursion. Using functionality from the newest betas, I've got a 17x13 map and there's a 17x1 toolbar below that, with items only visible to the appropriate player.

For deploying units, this toolbar has a nice system where you can drag a number of units right from the toolbar onto a territory, and when you've finished all the deployment you can hit an OK button that appears. (Units that haven't been deployed yet but are ready to go sit on the map in little circles; these circles can be clicked, and if you click them you get an input() box asking how many units should be moved in; this can be used for quick editing, so you can add more or send some back.)

For dice rolls, however, this could get trickier. It's not enough just to have three buttons (1 die, 2 dice, 3 dice) offering choices of what to roll, because there will be times when the user will have extra dice available. Of these 8-sided "general dice", a user may have more than one--though those cases will be rare. My question to all of you is this: How should I handle a clickable interface, avoiding input() boxes wherever possible, that allows the selection of 1-3 dice and 0-n other dice?

My current idea on this is to have 3 checkable buttons (i.e., they can be pushed on and off), and perhaps have a general die indicator if one is available; that indicator can have text attached saying whether it's just one die or 2x, 3x, etc.--or crossed out if it's not in use. Then that indicator could be clicked to bring up a quick input() box to ask how many of the available 8-sided dice should be rolled. Then there'd be a Roll button that would go ahead and complete the roll. This sounds like it might not be the best system, so I'm really looking for suggestions.

Another problem will be redeployment: That is, movement of troops and/or resources from one territory to an adjacent one. I may as well use the same interface for both possible situations: After a conquest, and at the end of a turn. At the end of a turn, any number of redeployments may be done; they can be set up beforehand and then finalized to end the turn.
My idea for a redeployment interface is simpler than some of the others. If there hasn't been a conquest, the user may click one territory and drag to another. In the toolbar I'll show an arrow (which may be a two-way arrow, in the case of a non-conquest redeployment) with armies and resources on either side. These may be clicked or dragged from one side to the other. The only major drawback here is that I'll have to drag only simple units, i.e. 1, 5, or 25+ at a time for armies and either 1 or 10 for resources; it could get a little tedious. Then there will be an OK button and a Cancel button (except post-conquest; no cancellation possible). If OK is clicked, an arrow goes on the board to indicate a redeployment that can be clicked and edited later, and eventually finalized; or, if this is after a conquest, the units are simply moved then and there.
Aside from the problem of how many units to move/drag at a time in this interface, there's also the problem of showing adequately which units are moving and which are staying. I'm thinking of something a bit like this:
A+B <-> C+D
In that case, A and C would be the original units that haven't moved yet, where B and D would represent units that have moved from the other side. I'll just need some kind of plus sign thrown in there to indicate that.
However--and here's a real trick--I'd like some way to specify more quickly that all units or resources be moved, and also a way to specify via an input() box an exact number to move.

To finally complicate this matter, I have it in mind to permit out-of-turn deployment by certain card plays. However, I'd need to show both the deployment toolbar and the dice toolbar for a defender in case they were under attack. As you might imagine, it's tricky business.

All thoughts and suggestions appreciated.

Lummox JR
Note that I may end up stealing anything I say/you say for an upcoming DDT strategy game!

Lummox JR wrote:
(Units that haven't been deployed yet but are ready to go sit on the map in little circles; these circles can be clicked, and if you click them you get an input() box asking how many units should be moved in; this can be used for quick editing, so you can add more or send some back.)

This would need lag testing, but personally I'd really want to avoid input() here. Very ugly thing to drop in the middle of your map-based interface.

What if clicking on a circle with units caused a little popup graphical menu? That is, client-side you could place three or four objects immediately above that circle, each indicating a number of units. The player can click on a number or click on the circle again to make the menu go away.


My question to all of you is this: How should I handle a clickable interface, avoiding input() boxes wherever possible, that allows the selection of 1-3 dice and 0-n other dice?

Perhaps the same approach?
Lummox JR wrote:
To finally complicate this matter, I have it in mind to permit out-of-turn deployment by certain card plays. However, I'd need to show both the deployment toolbar and the dice toolbar for a defender in case they were under attack. As you might imagine, it's tricky business.

I'm doing the same things with my Space Strategy game, allowing players to move or create fleets sometimes when it's not their turn. I have been thinking what would be the best way to program this. I'm having a "current player" variable and a player state, and I'm using #defines like "ATTACKING" for it. Using combinations of these variables I can handle those situations, but it feels like it can me many combinations that must be handled.

What is your approach? Would love to hear other ideas.


/Andreas
In response to Deadron
Deadron wrote:
Note that I may end up stealing anything I say/you say for an upcoming DDT strategy game!

I'm a big fan of cool interfaces, so feel welcome to usurp any interface idea you see from me.

(Units that haven't been deployed yet but are ready to go sit on the map in little circles; these circles can be clicked, and if you click them you get an input() box asking how many units should be moved in; this can be used for quick editing, so you can add more or send some back.)

This would need lag testing, but personally I'd really want to avoid input() here. Very ugly thing to drop in the middle of your map-based interface.

I agree, though it has the values of expediency and easy typing. (Some people prefer typing, and often enough I'm one of them; I intend to add verb support for all this stuff later.)

What if clicking on a circle with units caused a little popup graphical menu? That is, client-side you could place three or four objects immediately above that circle, each indicating a number of units. The player can click on a number or click on the circle again to make the menu go away.

I like this approach better. Perhaps the best way to go about it would be to allow only one such box per player, which would make it easier to handle.

One of the big issues with my interface coding, actually, is that gameplay for a particular color may be handed off to someone else at any given time, like if they disconnect. Eventually this will be used to handle when players go idle for too long, and other extreme cases. So anything that's displayed using an /image or client.screen has to be prepared to be shown to someone else.

My question to all of you is this: How should I handle a clickable interface, avoiding input() boxes wherever possible, that allows the selection of 1-3 dice and 0-n other dice?

Perhaps the same approach?

I could see using number boxes for the general dice (then again, I'd vastly prefer almost anything else), but not for the choice of 1, 2, or 3, which should be a quick choice whenever possible. My original thought was to have an area off to the side where unused dice sit; dice clicked would move from the unused pile to the roll area, or vice-versa. But I couldn't think of either a good place to put them or a good way to label them as "unused but available".

Lummox JR
For dice rolling, you could do the following:

Have a die icon in the main panel that you click on to initiate rolling. A small vertical strip would pop up that contained small images of one, two, and three dice clustered together. Running the cursor over each would highlight it. Clicking on one would close the strip, and begin your rolling procedure.
In response to Gazoot
Gazoot wrote:
To finally complicate this matter, I have it in mind to permit out-of-turn deployment by certain card plays. However, I'd need to show both the deployment toolbar and the dice toolbar for a defender in case they were under attack. As you might imagine, it's tricky business.

I'm doing the same things with my Space Strategy game, allowing players to move or create fleets sometimes when it's not their turn. I have been thinking what would be the best way to program this. I'm having a "current player" variable and a player state, and I'm using #defines like "ATTACKING" for it. Using combinations of these variables I can handle those situations, but it feels like it can me many combinations that must be handled.

What is your approach? Would love to hear other ideas.

Keeping track of the current player is done through turnorder[turnindex], which points to a /player datum which in turn connects to a mob. (It's necessary for me to use the /player datum because gameplay can be handed off to another player.) I use a WhoseTurn() proc to return the current player. State within the turn is controlled through a couple of state variables, in a way that I find a little unwieldy at present. I can streamline more once it actually works.

Actually, when I spoke of out-of-turn deployment that was a bit misleading, because a player could deploy reinforcements in the middle of their own turn in the same way if they chose not to at the beginning of the turn. (I may in fact amend the rules of Incursion to allow a card to be acquired following a conquest, provided enough resources are moved into the conquered territory. This would further extend the possibilities for playing reinforcements.) The Reinforcements card in my game is worth its full value at the beginning of the turn before any attacks are made--or when it is captured from a defeated player--but only half that if it's played later or out-of-turn. Thus it's more likely to be the resort of a desperate defender.

Anyway the real concern is when armies are deployed out of turn. Partial deployment must be possible, for expediency, but I think it must also be possible to manage defense rolling at the same time--at least by the idea I've had in mind. The way I implement a dice interface is thus critical; it should be small and out of the way. My concept has been for a player who turns in a Reinforcements card at an unusual time to receive an allotment of units, but to deploy them at their own pace.

An alternate idea I have, which might prove more workable, is this: During an attack, the attacker or defender may not play a card until after the roll is complete--or rather the card they choose play is not officially played until then. Anyone not involved in an attack may play cards at will, as appropriate. If a defender or potential defender plays Reinforcements, they must deploy their new units while the attack phase waits for them to finish. It's perhaps not as "nice", but it's the way a regular human board game would play out.

Lummox JR
In response to Skysaw
Skysaw wrote:
For dice rolling, you could do the following:

Have a die icon in the main panel that you click on to initiate rolling. A small vertical strip would pop up that contained small images of one, two, and three dice clustered together. Running the cursor over each would highlight it. Clicking on one would close the strip, and begin your rolling procedure.

Ah, now that's got merit. But how do I handle the 8-sided general dice? Same way?

Lummox JR
In response to Lummox JR
Lummox JR wrote:
Skysaw wrote:
For dice rolling, you could do the following:

Have a die icon in the main panel that you click on to initiate rolling. A small vertical strip would pop up that contained small images of one, two, and three dice clustered together. Running the cursor over each would highlight it. Clicking on one would close the strip, and begin your rolling procedure.

Ah, now that's got merit. But how do I handle the 8-sided general dice? Same way?

Lummox JR

Sure! Just have a little icon of an eight-sided die. You could make only appropriate dice types and numbers show up in the dice strip. That way, you'd only need one die icon on the control panel that would serve all your dice needs.
In response to Deadron
This brings up an ancillary question: Many of the administrative commands use input() because they'll be selecting from lists of player names. Is this still appropriate?

There is something to be said for a browser-based interface here, since I'll be using the browser for the rules anyway. But gads, that just gets complicated. Do you have any thoughts on that?

Lummox JR
In response to Lummox JR
Lummox JR wrote:
There is something to be said for a browser-based interface here, since I'll be using the browser for the rules anyway. But gads, that just gets complicated. Do you have any thoughts on that?

I'd say either use it a lot for client stuff (possibly rolling, etc) or don't use it...it will probably be confusing for people to have a small subset of things controllable through the browser, but it would probably be acceptable to have most commands happen through the browser.
In response to Deadron
Deadron wrote:
I'd say either use it a lot for client stuff (possibly rolling, etc) or don't use it...it will probably be confusing for people to have a small subset of things controllable through the browser, but it would probably be acceptable to have most commands happen through the browser.

Game commands won't be browser-related; just clicking on certain things will pop up pages in the browser, is all, like for rules explanations or clarifications of what certain icons mean. Any army icons that appear in the text output, for example, can be clicked to show a page with their icons. (And now, that will actually work, somewhat, since the icons will be viewable.)

Lummox JR
Here's a little something to give you an idea of what the interface looks like right now.


Figure 1: Random territory selection at the beginning of the game. At the lower right corner is the turn indicator, which is not active during this stage unless territories are chosen manually (not implemented yet).


Figure 2: The "Deployment" toolbar and the red circles with units inside are not visible to other players. Only 3 of 5 units this turn have been deployed; an OK button would appear if all 5 were ready, to finalize them.

Lummox JR
In response to Deadron
Deadron wrote:
What if clicking on a circle with units caused a little popup graphical menu? That is, client-side you could place three or four objects immediately above that circle, each indicating a number of units. The player can click on a number or click on the circle again to make the menu go away.

Driving in to work today (sigh, that's a phrase I wish I didn't have to use again), I realized that, of course, the player clicking to send the menu away is probably not ideal...the standard behavior would be to treat the whole thing as a drag operation in which they clicked on the initial item, a menu popped up, and they dragged to the desired item with a selection rectangle following them, and on release of the mouse the selection would be made.