It is currently 16 Jan 2017, 10:41
   
Text Size

Achivement discussion

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, moomarc, DennisBergkamp, Rob Cashwalker, friarsol, Chris H., CCGHQ Admins

Re: Forge version 1.5.26

Postby drdev » 10 Sep 2014, 00:16

I've started working on another feature off my Forge bucket list: Achievements!

I've set things up so we can easily define any number of achievements in a new Achievements enum, where each Achievement can have up to 3 tiers: Bronze, Silver, and Gold.

At this time, I have 5 achievements defined, though I have ideas for more. Here's the code to give you an idea of how easy it is to define them:

Enum Definitions | Open
Code: Select all
public enum Achievement {
    WinStreak("Win Streak", true,
            "Win 10 games in a row.", 10,
            "Win 25 games in a row.", 25,
            "Win 50 games in a row.", 50,
            new Evaluator() {
                @Override
                public int evaluate(Player player, Game game, int current) {
                    if (player.getOutcome().hasWon()) {
                        return current + 1;
                    }
                    return 0; //reset if player didn't win
                }
            }),
    TotalWins("Total Wins", true,
            "Win 100 games.", 100,
            "Win 250 games.", 250,
            "Win 500 games.", 500,
            new Evaluator() {
                @Override
                public int evaluate(Player player, Game game, int current) {
                    if (player.getOutcome().hasWon()) {
                        return current + 1;
                    }
                    return current;
                }
            }),
    Overkill("Overkill", true,
            "Win game with opponent at -25 life or less.", 25,
            "Win game with opponent at -50 life or less.", 50,
            "Win game with opponent at -100 life or less.", 100,
            new Evaluator() {
                @Override
                public int evaluate(Player player, Game game, int current) {
                    if (player.getOutcome().hasWon()) {
                        Player opponent = getSingleOpponent(player);
                        if (opponent != null && opponent.getLife() < 0) {
                            return -opponent.getLife();
                        }
                    }
                    return 0;
                }
            }),
    LifeToSpare("Life to Spare", true,
            "Win game with 20 life more than you started with.", 20,
            "Win game with 40 life more than you started with.", 40,
            "Win game with 80 life more than you started with.", 80,
            new Evaluator() {
                @Override
                public int evaluate(Player player, Game game, int current) {
                    if (player.getOutcome().hasWon()) {
                        int gainedLife = player.getLife() - player.getStartingLife();
                        if (gainedLife > 0) {
                            return gainedLife;
                        }
                    }
                    return 0;
                }
            }),
    Hellbent("Hellbent", false,
            "Win game with no cards in hand.", 1,
            "Win game with no cards in hand or library.", 2,
            "Win game with no cards in hand, library, or graveyard.", 3,
            new Evaluator() {
                @Override
                public int evaluate(Player player, Game game, int current) {
                    if (player.getOutcome().hasWon()) {
                        if (player.getZone(ZoneType.Hand).size() == 0) {
                            if (player.getZone(ZoneType.Library).size() == 0) {
                                if (player.getZone(ZoneType.Graveyard).size() == 0) {
                                    return 3;
                                }
                                return 2;
                            }
                            return 1;
                        }
                    }
                    return 0;
                }
            });
Current and best values for each achievement will be stored in a new achievements.xml file, which will be automatically updated at the end of each game when achievements are determined. The enum definition defines descriptions and thresholds for Bronze, Silver, and Gold tiers of the achievement, which will determine the type of trophy you'll earn.

I've set it up so you'll get a popup whenever you earn a trophy for an achievement you haven't previously earned.

WinTrophy.png

Eventually, I plan to add a new achievements screen acts as a trophy case for all achievements you've earned, which will also show a "Best" score for applicable achievements like "Win Streak" and "Total Wins".

Let me know if you have any ideas for achievements or thoughts about this feature in general.

Thanks.
-Dan
drdev
Programmer
 
Posts: 1945
Joined: 27 Jul 2013, 02:07
Has thanked: 188 times
Been thanked: 560 times

Re: Forge version 1.5.26

Postby Xitax » 10 Sep 2014, 03:55

Just don't let any of them be lame. You know, those first few Steam "achievements" you barely have to play the game to get.

None of the achievements should be for constructed mode. That would be too easy.

Some ideas:
-Win a draft 8-0
-Complete a set in Quest mode. (regular set, not special set)
-Collect the power 9 in Quest mode.
-Win a game on turn 3 in quest mode. (bronze)
-Win a game on turn 2 in quest mode. (silver)
-Win a game on turn 1 in quest mode. (gold)
-Do an insane amount of damage with one spell.
-Kill yourself and your opponent at the same time.
-Win by unusual means. Opponent life & library >0.

I'm sure more will come to mind.
Xitax
 
Posts: 734
Joined: 16 May 2010, 17:19
Has thanked: 105 times
Been thanked: 84 times

Postby drdev » 10 Sep 2014, 13:25

I actually did want these new achievements to apply to Constructed, and I don't think that makes them too easy. If anything it encourages people to build creative decks in order to achieve them.

That said, maybe I can make achievements for each game mode. Maybe one set for Constructed, one for Booster Drafts, one for Sealed, and one for Quest mode. That way games played in Quest mode don't affect your Constructed achievements or vice versa, plus it would allow different types of achievements for Quest mode like collecting the power 9, which wouldn't work for Constructed.

How's that sound?
drdev
Programmer
 
Posts: 1945
Joined: 27 Jul 2013, 02:07
Has thanked: 188 times
Been thanked: 560 times

Re: Forge version 1.5.26

Postby friarsol » 10 Sep 2014, 14:12

I don't see a problem with having a few that aren't that hard to achieve. Sure you may not be particularly "achieving" anything, but it does inform the players that there are things to be hunted by doing this type of thing.
friarsol
Global Moderator
 
Posts: 6931
Joined: 15 May 2010, 04:20
Has thanked: 215 times
Been thanked: 797 times

Re:

Postby Agetian » 10 Sep 2014, 14:16

drdev wrote:I actually did want these new achievements to apply to Constructed, and I don't think that makes them too easy. If anything it encourages people to build creative decks in order to achieve them.

That said, maybe I can make achievements for each game mode. Maybe one set for Constructed, one for Booster Drafts, one for Sealed, and one for Quest mode. That way games played in Quest mode don't affect your Constructed achievements or vice versa, plus it would allow different types of achievements for Quest mode like collecting the power 9, which wouldn't work for Constructed.

How's that sound?
This sounds really awesome, Dan! I like this idea!

- Agetian
Agetian
Programmer
 
Posts: 2339
Joined: 14 Mar 2011, 05:58
Has thanked: 475 times
Been thanked: 266 times

Re: Forge version 1.5.26

Postby Fizanko » 10 Sep 2014, 15:33

"Brainpower" - manage to click on a button for the 1st time
"Dexterous" - manage to click on a card for the 1st time
"Booh !" - exit Forge for the 1st time
"Chaotic Evil" - have Forge generating a crash/error for the 1st time
"Roadways to hell" - start your first Quest
"Alex, is that you?" - start a quest while having more starting gold than allowed by the game

:D
Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
User avatar
Fizanko
Tester
 
Posts: 737
Joined: 07 Feb 2014, 11:24
Has thanked: 148 times
Been thanked: 79 times

Re: Forge version 1.5.26

Postby friarsol » 10 Sep 2014, 15:45

Edit: Ignore this.. apparently it came off poorly...
Last edited by friarsol on 10 Sep 2014, 17:21, edited 1 time in total.
friarsol
Global Moderator
 
Posts: 6931
Joined: 15 May 2010, 04:20
Has thanked: 215 times
Been thanked: 797 times

Re: Forge version 1.5.26

Postby Fizanko » 10 Sep 2014, 16:06

?
Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
User avatar
Fizanko
Tester
 
Posts: 737
Joined: 07 Feb 2014, 11:24
Has thanked: 148 times
Been thanked: 79 times

Re: Re:

Postby KrazyTheFox » 10 Sep 2014, 18:46

Agetian wrote:
drdev wrote:I actually did want these new achievements to apply to Constructed, and I don't think that makes them too easy. If anything it encourages people to build creative decks in order to achieve them.

That said, maybe I can make achievements for each game mode. Maybe one set for Constructed, one for Booster Drafts, one for Sealed, and one for Quest mode. That way games played in Quest mode don't affect your Constructed achievements or vice versa, plus it would allow different types of achievements for Quest mode like collecting the power 9, which wouldn't work for Constructed.

How's that sound?
This sounds really awesome, Dan! I like this idea!

- Agetian
Seconding this! I'd even ask for a step further and possibly allow for achievements to be collected on a per-quest basis. There's some cool things we could tie into the quest mode with that.

For example, collecting the power nine could unlock, say, an "impossible" difficulty level.
User avatar
KrazyTheFox
Programmer
 
Posts: 676
Joined: 18 Mar 2014, 23:51
Has thanked: 65 times
Been thanked: 192 times

Re: Re:

Postby Agetian » 10 Sep 2014, 19:38

KrazyTheFox wrote:Seconding this! I'd even ask for a step further and possibly allow for achievements to be collected on a per-quest basis. There's some cool things we could tie into the quest mode with that.

For example, collecting the power nine could unlock, say, an "impossible" difficulty level.
Yes, agreed as well! :)

- Agetian
Agetian
Programmer
 
Posts: 2339
Joined: 14 Mar 2011, 05:58
Has thanked: 475 times
Been thanked: 266 times

Re:

Postby Xitax » 11 Sep 2014, 00:50

drdev wrote:I actually did want these new achievements to apply to Constructed, and I don't think that makes them too easy. If anything it encourages people to build creative decks in order to achieve them.
Respectfully, I have to disagree. With all of gos' decks on hand achieving any of these would be a triviality by going and finding the right deck. No brewing required.

EDIT: Also, this would be an excellent time to implement some form of being able to get specific cards in quest mode rather than having to wait for the RNG to provide something. I was thinking that we could create a bazaar item that would allow you to trade some kind of mana gems, earned by winning games, for any card you wish for. This is somewhat similar to how you could get cards in Shandalar by collecting amulets. There are simply so many Magic cards that waiting for something to turn up in the shop or in a bonus booster is frustrating.
Bazaar item: Wandering White Enchanter, offers any white enchantment for white mana gems. Different vendors show up at random, but offer different classes of cards. High power cards cost more gems, could be tied to the price index since price generally follows power, but no card should cost more than 5 or so. White mana gems awarded by winning a match with a white opponent. Multicolored opponents could offer one of their colors each time.
Sorry, I know ideas alone are cheap, but I can't program for squat.
Xitax
 
Posts: 734
Joined: 16 May 2010, 17:19
Has thanked: 105 times
Been thanked: 84 times

Re: Forge version 1.5.26

Postby serrasmurf » 11 Sep 2014, 11:12

Hi Dan,
Great that you keep adding so much cool stuff to Forge!

I'd prefer that achievements are both won/logged at every single quest and for all quests together (which is then the sum of its parts)
The reason is that achievements is a way to keep a quest interesting, it becomes a new goal just when you're quest is getting lame.
Some achievements will however be so daunting that they become interesting goals on overall quest level.

Ideas:
- conquering a world: by winning all challenges in a world (you become Shah of Jamuraa, Supreme ruler of Ravnica, etc.)
- draft master: winning 10 different quest draft formats, draft god: win every possible quest draft format
- all possible alternative win conditions
- collect every card with attribute X

did you consider giving "quest points" to all the achievements?
serrasmurf
 
Posts: 312
Joined: 30 Jan 2010, 14:09
Location: The Netherlands
Has thanked: 3 times
Been thanked: 18 times

Re: Re:

Postby friarsol » 11 Sep 2014, 12:19

Xitax wrote:
drdev wrote:I actually did want these new achievements to apply to Constructed, and I don't think that makes them too easy. If anything it encourages people to build creative decks in order to achieve them.
Respectfully, I have to disagree. With all of gos' decks on hand achieving any of these would be a triviality by going and finding the right deck. No brewing required.
Well.. you could do that, just like you could just lookup a YouTube video how to get an achievement on Xbox, but I think that ruins the fun and hunt of the user. If one of the achievements is say, get 25 Storm count in a single turn, and you've never played storm before, you still have to go find (or build) a Storm deck and try it out. If you normally wouldn't play those types decks, and achievements would allow you to, how is that a bad thing? Plus like everything else in Forge, you can feel free to ignore Achievements if they don't do anything for you in Constructed mode. It's not like there's cash rewards we'll be handing out for them or anything.
friarsol
Global Moderator
 
Posts: 6931
Joined: 15 May 2010, 04:20
Has thanked: 215 times
Been thanked: 797 times

Re: Forge version 1.5.26

Postby drdev » 11 Sep 2014, 15:13

Can we move Achievements discussion to a separate stickied topic? I think there's enough to discuss both now and going forward to warrant its own topic.
drdev
Programmer
 
Posts: 1945
Joined: 27 Jul 2013, 02:07
Has thanked: 188 times
Been thanked: 560 times

Achivement discussion

Postby timmermac » 11 Sep 2014, 21:25

Moved posts from 1.5.26 topic to here at drdev's request.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
User avatar
timmermac
Tester
 
Posts: 1319
Joined: 17 May 2010, 20:36
Has thanked: 17 times
Been thanked: 65 times

Next

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 8 guests


Who is online

In total there are 8 users online :: 0 registered, 0 hidden and 8 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 8 guests

Login Form