It is currently 19 Apr 2024, 01:18
   
Text Size

Want to create a patch, would it be well-received?

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Want to create a patch, would it be well-received?

Postby kek » 20 Dec 2016, 16:11

Hi guys, as a player I seem to orbit somewhat around Forge - every few months I'll come back to it and play a few games but a few things always seem to put me off so I'm not a regular player. As I'm a programmer I often have a hands-on approach and try to improve on FOSS projects when I can - and the time might have come to do the same with Forge.

I think all of my patches I've written for FOSS games have eventually gotten into the game itself but it is sometimes a hard journey and I've learned to be careful before putting work into something that might not get into the project. Sure, I could make the changes for myself only but I'd might as well just keep playing the game as-is on and off. On other projects I usually come to IRC and talk to a few devs about whether they'd endorse my changes or even immediately commit them for me once ready and well tested. Forge doesn't seem to have an IRC channel so this is what I'm doing here with this post :)

I'm a very casual player and what I'm looking for the most when playing Forge is to get a very well-rounded experience like the old Shandalar game which I played a bunch. I do sealed decks and quest games mostly - I suck at them but I have fun lol. So if I were to write a patch the first thing I'd like to do would be to offer a non-default setting that removes from the game cards that have no image. Currently there are over 2000 cards without LQ images and they really break what is otherwise an excellent experience for me whenever they come up during a game or even while deck building. Call me nit-picky: maybe I am.

Other than that I'd be looking into doing small things like being able to sell your cards directly from the quest deck editor and other small changes to the UI and possibly some quest mode ideas later on. But all of this would be future patches - what I'm really looking for here is to gauge the "disable cards without art" idea.

Of course there are a few issues to be worked with here that are not trivial: what to do with built decks (especially AI decks) that have cards without images? How to handle this option if a player sets it up but has a very low amount of downloaded art available (meaning he'd end up with an unplayable pool of cards)? How to update the game's internals after this option is checked?

So what I want to know from any devs lurking here is what is the likelihood of such a patch, once ready (and done well enough), to be adopted officially into the game itself? What sort of complexity is a competent Java programmer looking at here, considering the game engine's architecture? If you reply, please be kind enough to also tell me what is your role in the project and whether you'd vouch personally for such a feature to be merged into the main codebase. Also tips on how to go around doing it would be great, considering it'd be my first journey into the source code 8)

Sorry about the wall of text but I've learned from near-misses to be careful about putting any effort into contributing to a FOSS project without having a clear idea of what I'm about to go into and if it will discarded work or not. This could turn out to be a very simple task or a very time consuming one so at least I'd like to know if any work put into this would be appreciated and be likely to get merged into the game. Thank you for your time! If everything goes well I might come with new ideas (hopefully less complex and possibly-controversial) to run by you guys in the future too!
kek
 
Posts: 2
Joined: 20 Dec 2016, 15:41
Has thanked: 0 time
Been thanked: 0 time

Re: Want to create a patch, would it be well-received?

Postby kek » 22 Dec 2016, 14:45

Oh well, nevermind then. Good thing I posted ahead to test the grounds...
kek
 
Posts: 2
Joined: 20 Dec 2016, 15:41
Has thanked: 0 time
Been thanked: 0 time

Re: Want to create a patch, would it be well-received?

Postby Agetian » 22 Dec 2016, 16:59

Hi!
Sorry for not responding in a timely manner, I actually needed some time to process and think this through. :) I'll speak for myself (I've been a contributor to Forge since 2011 and I've mostly been working on fixing bugs and making moderate improvements to the code base in general, in various areas). I can't speak for the other devs, but to be honest, I'm not entirely positive the idea of removing cards from Forge purely on the basis of not having LQ pictures for them will be well-received (even as an option). The thing is, there are different ways of getting card pictures, ranging from low(er) quality small-sized ones (e.g. even from MTG Gatherer, there are downloaders for that) to high quality (200dpi) and extra large high quality (300dpi) ones from the CCGHQ team, as well as other sources (there are both file-sharing resources and torrents available). Therefore, getting card pictures for Forge is not that big of a problem if something is not yet available at the server the game grabs LQ pictures from. Moreover, I think someone implemented an on-demand card loader in the past which grabbed card pictures from Gatherer - that, I think, can grab pictures which are not available on the LQ picture server specifically for Forge. For the record, I have 100% coverage of pictures for Forge in XLHQ and HQ qualities (some of the weird non-standard sets that were never released in XLHQ are in HQ), not a single card picture or even token picture is missing.

As you rightfully observed, removing a certain subset of cards from Forge on this basis creates many more problems than it attempts to solve:
* if you remove a card from the card pool (since there is no picture available), what should happen in case this card was a part of quest opponent decks or preconstructed decks implemented in Forge? Should those quest opponents and precons become completely unavailable then? If it's a popular staple, this can mean making a significant amount of quest opponents unavailable;
* how should this change things when card pictures are updated on the server? Something can get added over time or something may be temporarily unavailable;
* how does this account for cards that are reprinted in multiple sets, some of which have pictures and some of them, e.g. a brand new set, have no pictures for them yet (unless you're willing to download from Gatherer)? If it means the card will completely become unavailable because of just one set (even though it exists since Alpha or whatever other early edition), it's not very smart. If you try to make it such that only specific sets will be affected, that creates a whole extra layer of complication and interaction between things (if a deck specifies a card by both name and edition, does it mean the deck should be unplayable even if the said card is available in another edition with a picture?);
* in case the server that Forge downloads LQ pictures from becomes completely unavailable, does it mean the game should just stop working for you altogether since it can't provide a single picture for you? (even though there are different ways for you to procure those pictures otherwise);
* does it also mean that any brand new set is automatically unavailable for the end-user until the LQ pictures are uploaded to the server that Forge uses, if it ever happens? (this sometimes takes a very long time, unfortunately; most people just end up getting pictures elsewhere).

Honestly, I don't see this working in practice (even as an option)... Maybe it's just me, of course. :) Tbh, if the issue you're currently having with Forge is the absence of pictures for particular sets and/or cards, the time is most likely better spent investigating the potential ways of procuring those pictures (it's not really difficult, trust me, you can start here: viewforum.php?f=15 ) rather than inventing ways to pluck those cards from Forge in a way that would be relatively seamless and transparent to everybody. As an extra bonus you'll be able to get card pictures that are a lot more beautiful-looking than the default low quality ones that Forge grabs by default. If you don't want to do that, try enabling the "Automatically Download Card Art" option in Forge preferences and see if that still works correctly and grabs the Gatherer pictures for cards that you don't have a picture for on-demand. If it does, all good, and if it doesn't, maybe it's going to be a good patch to try to get that working correctly?

So, personally I'd vouch for some other, more constructive improvements to the code base - there are lots of things that need doing (including UI improvements, card bug fixes and card interaction fixes, as well as rule updates, porting Planar Conquest UI to desktop Forge, etc.). If you decide to become a contributor (which you are highly welcome to do), I recommend that you start small and start by implementing a possibly little, but useful patch and using that as an opportunity to learn the Forge code base. The code is rather complicated and tangled (smart and clean refactoring is another area that Forge can always use :), it's actually quite difficult even for a seasoned developer to implement things in a way that does not break anything, so it'll probably take some time for you to get accustomed to the code base and learn how it works. Obviously, you'd need a quite good working knowledge of Java, too, but since you mentioned you're a programmer, I think this won't be an issue.

At any rate, I wish you the best of luck and I really hope I didn't discourage you from trying to modify and improve Forge altogether! It will be nice to see you contributing patches and discussing them with us, we may not get back to you immediately due to work or other issues, but we'll try to respond as time permits, especially if there's a creative and constructive idea brewing up. :)

Good luck!

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Want to create a patch, would it be well-received?

Postby Myrd » 27 Dec 2016, 22:51

By the way, it seems that "Automatically Download Card Art" option doesn't work to get HQ pictures by default because magiccards.info is blocking the fetches based on user agent. So an easy work-around locally is to set a different browser user agent when fetching the cards. Of course, that doesn't really scale to multiple users. Maybe worth changing it to download from gatherer instead - but no guarantee that they won't block us either...
Myrd
 
Posts: 87
Joined: 24 Nov 2014, 05:58
Has thanked: 4 times
Been thanked: 32 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 69 guests


Who is online

In total there are 69 users online :: 0 registered, 0 hidden and 69 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 69 guests

Login Form