The Phase Ring (and why it matters to you)

It sometimes takes a while to get the correct implementation of a specific part for a piece of software. I’ve spent months thinking about Wagic without coding one single line in the hope that my design would be perfect from the start. That was, obviously, very pretentious. After a few months of thinking, I realized that if I didn’t start coding soon, the project would be dead before even being born. So I gave up on my “perfect design” idea and started coding dirty things.

Well the result is not so bad, but there are lots of awful flaws in the initial design of Wagic that need to be solved.

Take the phases of a game, for example. Until now, they were completely hardcoded and managed by the “GameObserver” an object that basically controls all the events of the game.

The main problem is that cards have no control on the GameObserver, and therefore have no control on the way phases work. And this matters because, due to this flaw, cards such as Stasis or Time Stop couldn’t be implemented in Wagic so far.

But I’ve recently had the idea to replace these hardcoded horrors with a nice object called the Phase Ring (Most of my ideas come at very impractical times, when I’m not in front of my computer. And I fight hard to remember them, sometimes writing them down on a conbini receipt because that’s the only thing close to a piece of paper available around me :D)

So basically the phases are now managed with an object that can be manipulated by the “abilities” in the game. It does not mean it’s become easy as pie to add these cards, but at least now it’s possible.

For the programmers out here… yeah, I know, I just replaced an array with a list… it doesn’t make it less cool :D

PS: I’ve spent an awful lot of time on the forums the past few weeks (reading and answering), but unfortunately this has had a bad result on my free time and on the time I actually spend coding. I’ll try to be less active over there, just for my own good, so don’t be offended if I don’t reply to all requests on the forum. I’m sure other members have the answers to most questions, after all that’s what communities are for :)

  1. mtgrares’s avatar

    “So I gave up on my “perfect design” idea and started coding dirty things.”

    Welcome to my world, lol. I do this ALOT with MTG Forge and even when I started working on version 2, I had a hard time starting because I wanted to make everything perfect.


  2. MageKing17’s avatar

    The Incantus project runs into a lot of problems resulting from the original design. ;)

    When Incantus started the project, he hadn’t played Magic since Legends, so a whole bunch of stuff was completely new to him… and a number of advanced rules concepts (LKI and layers, among others) weren’t known to him at all. Getting LKI (and that whole “cards become a new object every time they change zones” thing) working required substantial changes to a lot of the code, and we were still running into problems with it as recently as two weeks ago… and that’s no guarantee there’s no code leftover in some out-of-the-way file that doesn’t reference the right stuff to make LKI work.



Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>