It is currently 16 Apr 2024, 21:49
   
Text Size

Developer Plans

Post MTG Forge Related Programming Questions Here

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

Developer Plans

Postby RumbleBBU » 29 Oct 2012, 08:25

Thoughts and rambling...

Currently, it seems that we - meaning all of us who are committing changes to the Forge SVN repository, collectively - could use a bit more coordination and communications. Sometimes somebody, it could be me, it could be someone else, commits something without informing the others except via the SVN comments. That's fine a lot of time. But sometimes things break, maybe something I was trying to code doesn't work in the SVN even though it worked for me. Or maybe something that used to work no longer does, and I don't have the foggiest notion why that is or when it happened.

So, I thought, it might be a good thing to have a place where we can regularly inform each other when we are about to try something that might (or might not) have consequences on the fundamental game behavior. Or, in general, just keep the others informed what you are planning to do, in order to avoid redundant or conflicting work. If more than one coders are interested in doing the same thing, there could be synergy in collaborating towards that end.
And it's always good to have feedback and comments before you start coding something major.

To practice what I preach, I'll get the ball rolling right away. Here are the two major nearish-future projects I'm currently interested in attempting:

1) Support for multiple different quest decks/challenges directories (or quest "worlds"). I've outlined the idea in this post: viewtopic.php?f=26&t=8428&p=101607#p101607

2) There are still significant portions of Forge code that are completely alien to me. This includes most of what happens during a match (I get lost when I try to decipher that) and most of card/script functionality (haven't really even started exploring that area).
However, it seems that sooner or later I will have to take the plunge and start trying to understand them. One of my biggest disppointments in the current Forge versions (aside from the occasional showstopper bugs and crashes) is the lack of certain key cards from classic deck archetypes or even completely missing keywords/mechanics.
Just trying to convert the Shandalar decks into Forge decks, I encountered the following:
-No Banding in Forge. Ok, so it was a rules monster (and probably would be a b*tch to code), and it wasn't missed much when WotC abolished it, but it was key an important mechanic in many White Weenie decks. Without any Banding at all, early White decks can be a bit weak. And this single mechanic, if implemented, would unlock a lot of (older) cards that are currently not in Forge. ("Bands with Other", OTOH...nobody missed it at all!)
-Early White takes an even bigger hit because of the lack of Circles of Protection! No Banding, no CoP...it would be pretty hard to build a competitive early White deck with what you have.
-Cards that 'rewrite' other cards, such as Sleight of Mind and Magical Hack. While these cards are of marginal use (for very specialized decks only), I think I have an idea how they could be coded. Have to explore the current cards/script code first, of course.
-One single card that I miss more than any and all of the above: Drain Life. Without looking at the code yet, I'm guessing that the problem is related to "X" which can be paid for only with Black mana. Meaning that a little or lot would have to be rewritten just for this one card...but IMO the card would be worth it. Not easy to build a solid (then-legal) Necro deck without Drain Life, let alone a ProsBloom. (Yeah, I know Mike Long won a PT without a Drain Life, but you can't bluff your way to victory in Forge!)

As I said, I'm still largely unfamiliar with the cards/scripting related code, so the whole #2 is rather something I dream of doing ATM...maybe in distant future.
User avatar
RumbleBBU
 
Posts: 394
Joined: 18 Aug 2012, 04:24
Has thanked: 29 times
Been thanked: 66 times

Re: Developer Plans

Postby Doublestrike » 29 Oct 2012, 08:38

Just FYI I'll be out of circulation for a bit until schedule calms down...hopefully within two weeks. Sorry if I left anything hanging, but I'll be back when I can.

At that time my UI plans are:
- Finish updating home screen submenu views
- Refurbish win/lose views
- Move into match or editor UI improvements

Not set in stone. If people make UI, please just separate view from control so someone (probably me) doesn't have to untangle (and probably accidentally break) the functionality :)
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

Re: Developer Plans

Postby Max mtg » 29 Oct 2012, 09:44

Plans:

- refactor ability factories (eliminate dozens of inline classes) (done) and then probably ability core classes to untie AI methods from resolve() <- well, this is hardly possible. The what remains is wait until everything is converted to scripts.
- In input classes have actions performed upon a choice separated from the event handler method
- GameLog: make it listen to game events
- replace all GuiUtils.chooseXXX with something supporting remote players.
- Player: find a set of methods that would become an over-network API to direct a player.

* Inactive during december
Last edited by Max mtg on 03 Dec 2012, 10:21, edited 3 times in total.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Developer Plans

Postby friarsol » 29 Oct 2012, 15:08

Rumble,

I recently rewrote a lot of the damage portion of Combat to have it adhere to the most recent combat rules, as well as to allow cards like Wall of Glare and Two-Headed Giant of Foriys. Banding is a lot closer than it's ever been now, but the main problem is really AI handling. At first that could just be attacking and blocking into (potential) bands. And later attacking and blocking with bands. Definitely something that is feasible, but would require a lot of combat testing, which is already the most complex portion of the AI.

---

As far as Circle of Protections, the main issue here is the source of your choice which has the possibility of being "A source of damage is a permanent, a spell on the stack (including one that creates a permanent), or any object referred to by an object on the stack. A source doesn't need to be capable of dealing damage to be a legal choice."

This is how I would generally imagine it being implemented:
1. Choose a Source (Probably different enough from AF_ChooseCard to be it's own AF, but maybe not) and Remember it
2. Create an Effect implanting the Remembered card to prevent the next damage.
3. Make sure the Effect only prevents damage once

So a mock script might look like this:
COP Red | Open
AB$ ChooseSource | Cost$ 1 | Choices$ Card.Red | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Chosen
SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | ValidTarget$ You | ReplaceWith$ ExileEffect | PreventionEffect$ True | Description$ The next time the chosen source deals damage to you, prevent that damage.
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Developer Plans

Postby Sloth » 29 Oct 2012, 20:42

I will be on vacation for the rest of the week until sunday. Guess i will be busy fixing all the bugs that will have piled up then, so i better not make any plans other than squashing. :D
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Developer Plans

Postby Agetian » 30 Oct 2012, 04:20

My developer goals (since 2011 till now):

- Adding realistic white/black card borders to the match UI - ACHIEVED!
- Adding Coldsnap draft mode - ACHIEVED!
- Adding a Setup Game State developer mode for card testing - ACHIEVED!
- Randomized basic land set codes in quest shop - ACHIEVED!
- Randomized card set codes in random decks - ACHIEVED!
- Fixing and re-enabling the targeting overlay - ACHIEVED!
- AF ChooseSource and Circles/Runes of Protection - ACHIEVED!
- Adding additional set configurations to Draft Mode - ACHIEVED!
- Implementing sound in Forge - ACHIEVED!
- Improving the appearance of the targeting overlay - ACHIEVED!
- Fixing the "mouseover-only" mode of the targeting overlay - ACHIEVED!
- Implementing an option to randomize card art within one set - ACHIEVED!
- Helping out with implementing Sideboarding in Forge - ACHIEVED!
- Providing the code support for other card types in Forge (Nafs Asp, spend only specific mana on spells, split cards) - ACHIEVED!
- Implementing basic AI for Planechase mode - ACHIEVED!
- Implementing support for multiple card art - ACHIEVED!
- Expanding support for foil cards - IN PROGRESS
- Working on AI personalities and related AI improvements - IN PROGRESS
- Expanding the Planechase AI - PENDING
- Expanding the AI in general - PENDING

Best regards,
Agetian
Last edited by Agetian on 16 Jan 2014, 05:22, edited 20 times in total.
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Developer Plans

Postby RumbleBBU » 30 Oct 2012, 11:59

Welcome aboard, Agetian - I'll be more than happy to collaborate with you on the missing cards! :D

And yeah, I could echo your sentiments almost word-for-word. The whole card scripting/factory stuff looks pretty daunting, and what makes it worse that if you are not intimately familiar with every single rule and every single card ever printed and every single DCI ruling (I know I'm not!), you never know which cards and/or rules you inadvertently end up breaking when you start implementing new cards (especially ones that require code changes).
User avatar
RumbleBBU
 
Posts: 394
Joined: 18 Aug 2012, 04:24
Has thanked: 29 times
Been thanked: 66 times

Re: Developer Plans

Postby Chris H. » 30 Oct 2012, 14:58

Agetian wrote:I'm getting very close to actually being able to do things in Java freely and comfortably enough, so I'd like to apply for commit permissions soon if possible - I've sent a request to join the Forge Developers group. I think I'd better start learning about how to commit things etc. using the new SVN system (I used to commit things to Forge a looong time ago :\ ).
 
You have been approved for commit privs. It may take up to a day or two to see that this has taken effect.

Welcome to the team. :)
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Developer Plans

Postby Agetian » 30 Oct 2012, 17:32

Chris H. wrote:You have been approved for commit privs. It may take up to a day or two to see that this has taken effect.
Welcome to the team. :)
Thanks a lot for the welcome, hope I'll be able to contribute substantially enough! :)

RumbleBBU wrote:Welcome aboard, Agetian - I'll be more than happy to collaborate with you on the missing cards! :D
And yeah, I could echo your sentiments almost word-for-word. The whole card scripting/factory stuff looks pretty daunting, and what makes it worse that if you are not intimately familiar with every single rule and every single card ever printed and every single DCI ruling (I know I'm not!), you never know which cards and/or rules you inadvertently end up breaking when you start implementing new cards (especially ones that require code changes).
Thanks a lot for the welcome, and yeah, eventually I'll see whether I can be helpful with the new cards - I'll start looking through the code and see what I can dig up. :) Feel free to PM me if you need any specific help and/or tell me what you've got so far, I'd be happy to collaborate to the best of my ability!

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

Re: Developer Plans

Postby RumbleBBU » 31 Oct 2012, 13:19

I've decided to move the quest set unlocking functionality from a duel reward into a button on the quest home screens (when applicable). It will available earlier but will also be more expensive and nonrandom.

So, in the meantime (before I commit this), if anyone needs to do anything to the forge.gui.home.quest package or the QuestUtil class, please let me know (so we don't commit conflicting changes).

(Also will probably need to modify some classes in the forge.quest and/or forge.quest.data package.)
User avatar
RumbleBBU
 
Posts: 394
Joined: 18 Aug 2012, 04:24
Has thanked: 29 times
Been thanked: 66 times

Re: Developer Plans

Postby RumbleBBU » 01 Nov 2012, 09:56

The unlocking stuff above is now committed. Wonder if I should have jacked up the prices a bit more...
User avatar
RumbleBBU
 
Posts: 394
Joined: 18 Aug 2012, 04:24
Has thanked: 29 times
Been thanked: 66 times

Re: Developer Plans

Postby friarsol » 04 Nov 2012, 01:26

Andddd looks like my powers back on. Max was there anything specific in the migration you needed me to look at? I'll try to get to it as I sift through everything I missed on the internet in the last week.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Developer Plans

Postby Max mtg » 04 Nov 2012, 06:04

friarsol wrote:Andddd looks like my powers back on. Max was there anything specific in the migration you needed me to look at? I'll try to get to it as I sift through everything I missed on the internet in the last week.
Actually I've got some 80 files with spelleffects, and another 80 with respective AIs.
Some special AFs still remain to convert, bacause Mana requires specific ability class, ChangeZone and Attach behave differently and need more attention.

There are bug reports in snapshot builds thread, I don't know whether these bugs are mine.


UPD: Dealing with mana abilities lead me to need for change of the class hierarchy. I think AbilityMana should not be a special ability class, I am going move its significant methods into a separate class, add its instance to SpellAbility so if a SpellAbilitiy has such member then it is a spellability

Done so, got 150 compile errors... well, that's just what I like most about forge %)

UPD2: see 17834 for what it took me to make mana abilities fit into the new schema.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Developer Plans

Postby Max mtg » 07 Nov 2012, 16:55

I suggest cleaning this thread from discussion of Sandy consequences and let each developer mantain a single post with his actual plans
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Developer Plans

Postby Hellfish » 17 Nov 2012, 20:19

I've made a little headway into adding the Command zone properly, in my local build. Emblems/Effects now use the command zone and their triggers and abilities(static and not) work properly from there and I've got a decent UI representation (basically VField without the player panel). I'll probably keep trucking with this and at least attempt to implement Vanguard, as that seems the simplest variant to begin with.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Next

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 65 guests


Who is online

In total there are 65 users online :: 0 registered, 0 hidden and 65 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 65 guests

Login Form