Achivement discussion
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Achivement discussion
by drdev » 13 Sep 2014, 20:47
I just finished refactoring the Achievements code to support separate sets of achievements for each game type. As part of this, Achievements are no longer an enum but rather a set of classes, accessible using FModel.getAchievements(gameType).
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Achivement discussion
by KrazyTheFox » 14 Sep 2014, 03:04
I've finally crossed almost everything off my list of things to get done on the main branch today (that sure was a lot) and I've just started looking through the achievements code.
It's all looking great and really simple to use, but I must ask if this can be made non-abstract:
That way an Achievement can use overloaded evaluate methods without having to implement every one of them. For example, the following could be used to track matches without any losses:
Or even:
I think that change would really open this up, though the current system would need some re-writing to allow for that.
Might I propose:
Let achievements know something happened:
Update the achievements with new info: (Replaces current updateAll())
Update the achievements with new info:
It's all looking great and really simple to use, but I must ask if this can be made non-abstract:
- Code: Select all
protected abstract int evaluate(Player player, Game game, int current);
That way an Achievement can use overloaded evaluate methods without having to implement every one of them. For example, the following could be used to track matches without any losses:
- Code: Select all
protected int evaluate(Player player, Match match, int current) { return -1; }
Or even:
- Code: Select all
protected int evaluate(QuestEventDraft draft, int current) { return -1; }
I think that change would really open this up, though the current system would need some re-writing to allow for that.
Might I propose:
Let achievements know something happened:
- Code: Select all
FModel.getAchievements(gameType).notify(player, game);
Update the achievements with new info: (Replaces current updateAll())
- Code: Select all
public void notify(Player player, Game game) {
for (Achievement achievement : achievements.values()) {
achievement.update(achievement.evaluate(player, game));
}
save();
}
Update the achievements with new info:
- Code: Select all
private final void update(int score) {
if (score == -1) {
return; //Doesn't accept this kind of update
}
if (score > best) {
//And so on...
}
}
-
KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Achivement discussion
by drdev » 14 Sep 2014, 04:31
So I've made some progress on creating an Achievements screen. I've set it up to look like a trophy case, with placards on each shelf for the achievement name and the best/current scores for each achievement. The combo box at the top allows switching between the achievements for different game modes.
Next up I'll add tooltips for each trophy that will give the details of what's required to achieve each tier of the achievement, then work on fleshing out some more achievements. Krazy, I'll keep your suggestion in mind in terms of supporting other types of achievements.
Let me know what you think.
Thanks.
-Dan
Next up I'll add tooltips for each trophy that will give the details of what's required to achieve each tier of the achievement, then work on fleshing out some more achievements. Krazy, I'll keep your suggestion in mind in terms of supporting other types of achievements.
Let me know what you think.
Thanks.
-Dan
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Achivement discussion
by Agetian » 14 Sep 2014, 04:41
This looks really cool, Dan! Thanks for the feature!drdev wrote:So I've made some progress on creating an Achievements screen. I've set it up to look like a trophy case, with placards on each shelf for the achievement name and the best/current scores for each achievement. The combo box at the top allows switching between the achievements for different game modes.
<...>
Next up I'll add tooltips for each trophy that will give the details of what's required to achieve each tier of the achievement, then work on fleshing out some more achievements. Krazy, I'll keep your suggestion in mind in terms of supporting other types of achievements.
Let me know what you think.
Thanks.
-Dan
The only issue I can see is that the scaled trophies and the case look somewhat blurry... will there be higher resolution representations later (just curious)?
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Achivement discussion
by drdev » 14 Sep 2014, 04:43
Yeah, I'm hoping to find better looking trophies. Any help here will be appreciated, as I don't have the graphics skills to make them from scratch, which limits me to finding free ones online, which often lack the necessary transparency at the edges.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Achivement discussion
by Agetian » 14 Sep 2014, 05:09
Umm I'm no great artist but I'll see if I can 3D-model the trophies for you based on the pixel art you're using... No promises but I'll see what I can dodrdev wrote:Yeah, I'm hoping to find better looking trophies. Any help here will be appreciated, as I don't have the graphics skills to make them from scratch, which limits me to finding free ones online, which often lack the necessary transparency at the edges.
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Achivement discussion
by drdev » 14 Sep 2014, 05:38
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Achivement discussion
by Agetian » 14 Sep 2014, 06:05
Yep, looks really awesome now!drdev wrote:Actually, I think I've found some better ones.AchievementsScreen.png
Is that better?
Do you need a higher resolution trophy case, perhaps? (I can try 3D modeling that, it's not hard I think).
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Achivement discussion
by drdev » 14 Sep 2014, 06:11
Go for it if you like. Keep in mind that I'm currently scaling the two image files for the trophy case by 3x in game (to 798px wide), but if you make them 3 times larger in the file, I can just get rid of the in-game scaling.Agetian wrote:Yep, looks really awesome now!drdev wrote:Actually, I think I've found some better ones.AchievementsScreen.png
Is that better?
Do you need a higher resolution trophy case, perhaps? (I can try 3D modeling that, it's not hard I think).
- Agetian
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Achivement discussion
by Agetian » 14 Sep 2014, 06:12
So basically, you need a 800 pixel wide picture, right? I can render it out as big as you need to, just give me the dimensions and I'll go for itdrdev wrote:Go for it if you like. Keep in mind that I'm currently scaling the two image files for the trophy case by 3x in game (to 798px wide), but if you make them 3 times larger in the file, I can just get rid of the in-game scaling.Agetian wrote:Yep, looks really awesome now!drdev wrote:Actually, I think I've found some better ones.AchievementsScreen.png
Is that better?
Do you need a higher resolution trophy case, perhaps? (I can try 3D modeling that, it's not hard I think).
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Achivement discussion
by drdev » 14 Sep 2014, 06:15
Both pictures should be 798px wide, but keep in mind that the shelf picture is repeated vertically, so the grain of the wood on the sides needs to match top-to-bottom to prevent seams.
Also, make sure the foreground face of the shelf is 39px tall so that the plate height matches up with it.
Also, make sure the foreground face of the shelf is 39px tall so that the plate height matches up with it.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Achivement discussion
by Agetian » 14 Sep 2014, 06:26
Oh, I mistakenly thought it was just one picture scaled up. Ok I'll take a look at the constituent elements of the shelf in the skin files then and see if I can figure out how exactly the elements match up. I'll tell you if I come up with a higher res modeled equivalent.drdev wrote:Both pictures should be 798px wide, but keep in mind that the shelf picture is repeated vertically, so the grain of the wood on the sides needs to match top-to-bottom to prevent seams.
Also, make sure the foreground face of the shelf is 39px tall so that the plate height matches up with it.
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Achivement discussion
by Fizanko » 15 Sep 2014, 00:20
If possible, i would suggest a possibility to see how many times you earned a specific achievement (for those appropriate, as the streak one it wouldn't matter how many time you did a streak, as it's the length of the streak that matter there), maybe by hoovering the mouse over the trophy to avoid adding too much clutter on the interface ?
probably outdated by now so you should avoid : Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
Re: Achivement discussion
by lugaru » 15 Sep 2014, 01:55
Personally I recommend approaching the achievements as though Magic is your game and you want to make sure new players explore the possibilities. You guys are already doing that a bit with Quest Mode since that is your baby, but you kind of need to pretend that all of magic is 'yours' and you want to show it off.
Personally I would add some easy ones that require different deck styles such as:
Pyrexian: Win By Poison
Schemer: Win by Alt Condition
Mind Sculptor: Win by Decking your Opponent
These achievements would make somebody 'new' to magic really explore the game.
Personally I would add some easy ones that require different deck styles such as:
Pyrexian: Win By Poison
Schemer: Win by Alt Condition
Mind Sculptor: Win by Decking your Opponent
These achievements would make somebody 'new' to magic really explore the game.
Re: Achivement discussion
by Xitax » 15 Sep 2014, 02:13
Would you add support for custom trophy graphics? BTW, are all these going to be hard-coded, or can they be scripted?
Who is online
Users browsing this forum: No registered users and 45 guests