Who starts the game?
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
31 posts
• Page 2 of 3 • 1, 2, 3
Re: Who starts the game?
by Rob Cashwalker » 14 Jun 2010, 20:16
When I was introduced to Magic, we did the cut process, then picked up the entire deck to reveal the bottom card.
Magic was intended to be a game that could be played without any additional equipment other than the deck, so this sort of cut and reveal method is relatively in-line with the spirit of the game.... But when you think about how un-random computer shuffling actually is, then how folks complain when the shuffle doesn't seem random enough (mana screw/flood) this would be a double-whammy.
I'd say just simulate a 2D6 roll, and be done with it. Bonus points for using some sort of graphical representation of the two dice.
Magic was intended to be a game that could be played without any additional equipment other than the deck, so this sort of cut and reveal method is relatively in-line with the spirit of the game.... But when you think about how un-random computer shuffling actually is, then how folks complain when the shuffle doesn't seem random enough (mana screw/flood) this would be a double-whammy.
I'd say just simulate a 2D6 roll, and be done with it. Bonus points for using some sort of graphical representation of the two dice.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Who starts the game?
by mtgrares » 14 Jun 2010, 21:51
Yeah there was some problem with the computer going first but thankfully some other problems like Timewalk and Counterspell have been fixed.DennisBergkamp wrote:I think this should be fine... I know rares said there was some problems with cards like Timewalk, attacking on turn one with Raging Goblin, and also the AI starting on turn one. Timewalk works fine, and also Raging Goblin attacks fine on turn one... I don't see any problems with the AI going first, as long as the turn counter starts at 0.
I hope no one minds me pretending to be a rules lawyer. Below from the comprehensive rules, make sure to also checkout the Magic Set Faqs for explanations of specific cards, wizards.com/magic/rules.
Choosing a random card and comparing the converted mana cost is the fun way to see who goes first and sounds fine. It would be nice (but not sure if it is possible) if Forge could "In a match of several games, the loser of the previous game chooses who takes the first turn."103.2. After the decks have been shuffled, the players determine which one of them will choose who takes the first turn. In the first game of a match (including a single-game match), the players may use any mutually agreeable method (flipping a coin, rolling dice, etc.) to do so. In a match of several games, the loser of the previous game chooses who takes the first turn. If the previous game was a draw, the player who made the choice in that game makes the choice in this game.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Who starts the game?
by Rob Cashwalker » 15 Jun 2010, 04:12
I just played with the latest SVN version, and the dialog for this showed up after being asked to mulligan. The decision to go first happens before looking at your hand. The decision to mulligan for each player then happens in Active Player, Non-Active Player order.
Granted, the AI can't mulligan yet... and frankly this jump into the middle of the turn structure makes it more difficult. (The easy solution I thought of was inserting a phase index before the human's current first phase. It checks to see if it's turn zero, then calculates the mulligan, if it's not turn zero, then skip ahead.)
Edit - Also now notice that the cut-to cards have had the same CMC, yet the Human has gone first in each case. It probably should try the next card until a clear winner is determined.
Granted, the AI can't mulligan yet... and frankly this jump into the middle of the turn structure makes it more difficult. (The easy solution I thought of was inserting a phase index before the human's current first phase. It checks to see if it's turn zero, then calculates the mulligan, if it's not turn zero, then skip ahead.)
Edit - Also now notice that the cut-to cards have had the same CMC, yet the Human has gone first in each case. It probably should try the next card until a clear winner is determined.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Who starts the game?
by Marek14 » 15 Jun 2010, 07:58
The problem is that cutting the deck to determine the first player is not random enough. If the average CMC in both decks is not exactly the same (and it hardly is), one player will get an unfair advantage.Beached As wrote:Just made it so the cut to card is placed on the bottom.Rob Cashwalker wrote:At FNM, we always use a die roll. Most often I see two D6 or D10, some folks use a true D20 (not the Spin-Down life counter, because it's not "random enough").
There are a number of cards that are so iconic of specific decks, that high-level players could make a damn good guess of the rest of the deck based on that one card. (Arcbound Ravager, for example)
So Forge isn't a tournament.... Ahh, but think of how dire the situation is when playing fantasy quests, where every small advantage you can get is necessary. Some of us might know the card-counts of the AI deck so well, that if you know that one of the 1x or 2x cards is definitely at the bottom of the deck (after a physical cut, the cut-to card becomes the bottom card, this should be implemented here if it isn't already) then you may consciously or unconsciously change your game plan to accommodate.I thought cutting the deck to decides who goes first has a more magic feel to it as opposed to using hard statistics. But if people agree that using an artificial coin toss is better then i would be more than happy to change it.Marek14 wrote:The rules state that the turn is to be decided randomly. No peeking allowed
Re: Who starts the game?
by silly freak » 15 Jun 2010, 08:04
i think the important thig is "mutually agreeable". i think, since the computer has no preferences, he agrees to everything
so basically any method is suitable. we could make a choice between "player starts", "computer starts", "cut decks" and "fair dice roll"/"coin toss"
when i have a choice between a computer generated coin toss in the background and cutting the deck, with both cards visible to the player, I'd choose the latter because it feels more natural.
so basically any method is suitable. we could make a choice between "player starts", "computer starts", "cut decks" and "fair dice roll"/"coin toss"
when i have a choice between a computer generated coin toss in the background and cutting the deck, with both cards visible to the player, I'd choose the latter because it feels more natural.
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: Who starts the game?
by MageKing17 » 15 Jun 2010, 19:13
When I play casual Magic, we tend to cut because none of us tend to run decks with absurdly tilted mana curves, and because we're too lazy to pull out a coin and flip it (or roll dice, or any other more random method). The thing is, however, that we don't discount lands as valid cuts, as your code does. Instead, we count lands (and other cards with no cost... I'm looking at you, Lotus Bloom and Ancestral Vision) as having a lower CMC than 0-cost cards (I think the rules themselves have a similar distinction, although I could be wrong there).
-
MageKing17 - Programmer
- Posts: 473
- Joined: 12 Jun 2008, 20:40
- Has thanked: 5 times
- Been thanked: 9 times
Re: Who starts the game?
by Marek14 » 16 Jun 2010, 04:31
No, the rules treat lands and Ancestral Vision as having CMC 0.
silly freak: To me, the idea of determining first player by cutting the deck feels EXTREMELY unnatural. Of course, that might be because I usually play at prereleases, but still...
silly freak: To me, the idea of determining first player by cutting the deck feels EXTREMELY unnatural. Of course, that might be because I usually play at prereleases, but still...
Re: Who starts the game?
by MageKing17 » 16 Jun 2010, 04:46
I had thought they were treated differently for the purposes of clashing, but I was wrong.Marek14 wrote:No, the rules treat lands and Ancestral Vision as having CMC 0.
Yes, I can see how the venue changes your perceptions.Marek14 wrote:silly freak: To me, the idea of determining first player by cutting the deck feels EXTREMELY unnatural. Of course, that might be because I usually play at prereleases, but still...
-
MageKing17 - Programmer
- Posts: 473
- Joined: 12 Jun 2008, 20:40
- Has thanked: 5 times
- Been thanked: 9 times
Re: Who starts the game?
by Beached As » 16 Jun 2010, 06:20
Hmm, it seems that theres slightly more people in favour of using random chance, but not by much. Therefore, i think its probably best to give the option to the user. I would like it somewhere on the option menu (i.e. under use LAF Fonts) but right now i'm unsure how to do it as i have no experience in doing anything visual in java. Also, i've been quite busy with exams so i guess i won't be to work on forge for the next couple of days. I guess that gives people time to finalize their thoughts on this issue...
- Beached As
- Programmer
- Posts: 110
- Joined: 23 Feb 2010, 07:48
- Has thanked: 0 time
- Been thanked: 0 time
Re: Who starts the game?
by mtgrares » 17 Jun 2010, 19:02
I understand that using the mana cost isn't 50/50. Hopefully the user can choose the method: dice or mana cost. (Games and computer programs are all about giving the user "freedom of choice".)
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Who starts the game?
by Beached As » 18 Jun 2010, 08:40
Ok I just added the coin toss code and fixed the old code so that it occurs before the mulligan (still puts the card at the bottom after the mulligan). If someone could add an option in the option menu on the start up screen with allows the user to select whether to use the deck cutting or coin toss to start the game, that would be great.
- Beached As
- Programmer
- Posts: 110
- Joined: 23 Feb 2010, 07:48
- Has thanked: 0 time
- Been thanked: 0 time
Re: Who starts the game?
by Rob Cashwalker » 18 Jun 2010, 11:45
I've been noticing that the Cancel and OK buttons on the status text area become stuck as Yes and No from the Mulligan decision. I think I've narrowed it down to only when the Computer goes first.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
ButtonUtil - changing Input button text
by mtgrares » 18 Jun 2010, 16:50
You need to call ButtonUtil.reset() which will reset the buttons to OK and Cancel. ("Util" classes have only static methods.) ButtonUtil lets you easily enable or disable buttons used by Input. ButtonUtil.enableOnlyOK() will disable the Cancel button and enable the OK button.
And because I'm a perfectionist, here is ButtonUtil.
And because I'm a perfectionist, here is ButtonUtil.
- Code: Select all
package forge;
public class ButtonUtil
{
public static void reset()
{
getOK().setText("OK");
getCancel().setText("Cancel");
getOK().setSelectable(false);
getCancel().setSelectable(false);
}
public static void enableOnlyOK()
{
getOK().setSelectable(true);
getCancel().setSelectable(false);
}
public static void enableOnlyCancel()
{
getOK().setSelectable(false);
getCancel().setSelectable(true);
}
public static void disableAll()
{
getOK().setSelectable(false);
getCancel().setSelectable(false);
}
public static void enableAll()
{
getOK().setSelectable(true);
getCancel().setSelectable(true);
}
private static MyButton getOK() {return AllZone.Display.getButtonOK();}
private static MyButton getCancel() {return AllZone.Display.getButtonCancel();}
}
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Who starts the game?
by friarsol » 23 Jun 2010, 13:43
I would prefer coin toss over cut and reveal, even though when I first started playing the cut reveal part was used often. I'm fine with giving the user a choice. And really, the coin flip doesn't determine who goes first, it determines who gets to choose who goes first. I haven't tested the latest changes, but in a multigame match you shouldn't randomly choose who goes first every game. Instead, the first match is random and the loser gets the choice beyond that.
Related, as the options for play add up, I feel they should be saved somewhere, I don't think this has quite happened yet, and I don't want to make sure the checkboxes I want are off each time I load the program.
Related, as the options for play add up, I feel they should be saved somewhere, I don't think this has quite happened yet, and I don't want to make sure the checkboxes I want are off each time I load the program.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Who starts the game?
by silly freak » 23 Jun 2010, 15:16
i know this is very annoying. I have a "framework" for storing values, it's used for all the paths etc. but it doesn't really allow writing values back easily, left alone automatically querying GUI components. holidays are right ahead, so maybe I could implement it next month...
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
31 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 66 guests