It is currently 18 Apr 2024, 21:30
   
Text Size

Incantus is now open source (under the MIT/X11 license)

by Incantus

Moderator: CCGHQ Admins

Incantus is now open source (under the MIT/X11 license)

Postby Incantus » 17 Jan 2010, 00:44

I'm getting less and less time to work on Incantus, so I've decided it's finally time to let other people play around with the source. I've uploaded my repository to http://www.bitbucket.org/incantus/incantus (a mercurial host). Feel free to clone it and play around with it. Also, check out the wiki http://bitbucket.org/incantus/incantus/wiki/ page. Due to various changes to the card format, only 5 cards are currently supported:

* Betatester Toolbox (testing card with over 10 abilities)
* Plains
* Firebreathing
* Raging Kavu
* Shock
* Essence Warden
Incantus
DEVELOPER
 
Posts: 267
Joined: 29 May 2008, 15:53
Has thanked: 0 time
Been thanked: 3 times

Re: Incantus is now open source (under the MIT/X11 license)

Postby Huggybaby » 17 Jan 2010, 04:35

Wow, you had to scrap the thousands of cards that were already done? That must have taken some serious consideration and been quite stressful to the team! Can you describe the changes you made and why? (Damn, that sounds like a test question but I don't know a better way to word it.)

Are you going to continue the card list page you had?

I really hope someone picks this up, I think we all do.
User avatar
Huggybaby
Administrator
 
Posts: 3205
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 696 times
Been thanked: 594 times

Re: Incantus is now open source (under the MIT/X11 license)

Postby Incantus » 17 Jan 2010, 16:05

Well, currently the team is just me. I haven't seen anybody around in the last few months.

About the changes, I'm trying to move to a minimalist card description, where almost everything is in the rules engine and the cards are mostly declarative. Currently the changes are mostly in the characteristic defining section, although I'm slowly redoing the abilities section. For example, here is the new definition of Raging Kavu:
Code: Select all
name = 'Raging Kavu'
cost = '1RG'
types = Creature
subtypes = Kavu
color = Red, Green
power = 3
toughness = 1
text = ['Flash', 'Haste']

#################################

abilities.add(flash())
abilities.add(haste())
And here is the old version
Code: Select all
name = 'Raging Kavu'
types = characteristic('Creature')
supertypes = characteristic()
subtypes = characteristic('Kavu')
cost = ManaCost('1RG')
color = characteristic('R', 'G')
power = 3
toughness = 1
text = ['Flash', 'Haste']

play_spell = play_permanent()

#################################

abilities.add(flash())
abilities.add(haste())
Most cards can be easily converted - the section above "###############" can be easily replaced mechanically. I'm hoping to convert a lot of them mechanically - but I don't want to do that until I'm convinced that I'm done tinkering with way cards are defined. I'm moving slowly this way in order to attempt text-changing effects, which would have been impossible if I kept using strings to describe characteristics. Some of the other changes are needed to allow changing how cards are cast; ie additional/alternative costs, changes from zone they can be played in, etc. Also, I'm not completely happy with the way abilities are currently defined - there's an incongruence as to which parts are defined by the decorator before the ability function, and which parts are defined inside. For example, for triggered abilities, the EnterTrigger is defined outside the function, while the condition for the trigger is defined inside (see Essence Warden:

Code: Select all
name = 'Essence Warden'
cost = 'G'
types = Creature
subtypes = Shaman, Elf
color = Green
power = 1
toughness = 1
text = ['Whenever another creature comes onto the battlefield, you gain 1 life.']

#################################

@triggered(EnterTrigger("battlefield", player="any"), txt=text[0])
def ability():
    # match condition
    def condition(source, card):
        return isCreature(card) and not source_match(source, card)
    # effects
    def effects(controller, source):
        yield NoTarget()
        controller.life += 1
        yield
    return condition, effects
abilities.add(ability)
The condition should be part of the trigger. This doesn't matter for simple cards like this, but some cards can have multiple triggers as part of the same triggered ability, so this format isn't conducive to implementing those cards. Of course, if I fix it to support those cards, then all triggered abilities will have to fixed (although not rewritten - the main portion of the ability won't change). Also, because of things like NoTarget, it has been very difficult to implement target changing effects, so I'm still trying to think of a new way of doing general activated abilities effects.

Anyway, if you go back to revision http://bitbucket.org/incantus/incantus/changeset/b0b4fbd2d478/, you should be able to use almost all cards currently supported in the old version.
Incantus
DEVELOPER
 
Posts: 267
Joined: 29 May 2008, 15:53
Has thanked: 0 time
Been thanked: 3 times

Re: Incantus is now open source (under the MIT/X11 license)

Postby frwololo » 21 Jan 2010, 00:47

Open sourcing Incantus is great news.
Hearing that it has close to no developer anymore is a bit sad though... my (short) experience shows that open sourcing a project (unfortunately) doesn't magically revive it.

I hope the project keeps going :D
frwololo
DEVELOPER
 
Posts: 265
Joined: 21 Jun 2008, 04:33
Has thanked: 0 time
Been thanked: 3 times

Re: Incantus is now open source (under the MIT/X11 license)

Postby ItalianRockerNM » 21 Jan 2010, 02:22

yeah i joined the forum specifically to reply to this thread. Lol. I'm in to help in whatever way I can. heck, I could see if a couple of the guys I know who play magic and are good at computers would be interested in helping write out the code for some of the cards, requiring you can give us some direction on how to do that. Show me what you need to do, show me how to do it, and i'm in =).
ItalianRockerNM
 
Posts: 8
Joined: 21 Jan 2010, 02:17
Has thanked: 0 time
Been thanked: 0 time

Re: Incantus is now open source (under the MIT/X11 license)

Postby juzamjedi » 22 Jan 2010, 19:26

If you or your friends are familiar with Python then there are a lot of cards that are easy to code. With 6000+ cards already implemented there are a lot of similar cards that you can copy / edit to create cards.

Edit: even if you aren't familiar with Python but have some basic programming knowledge then the code is easy to grok. See an example here.
juzamjedi
Tester
 
Posts: 575
Joined: 13 Nov 2008, 08:35
Has thanked: 6 times
Been thanked: 8 times

Re: Incantus is now open source (under the MIT/X11 license)

Postby Marek14 » 23 Jan 2010, 07:54

juzamjedi wrote:If you or your friends are familiar with Python then there are a lot of cards that are easy to code. With 6000+ cards already implemented there are a lot of similar cards that you can copy / edit to create cards.

Edit: even if you aren't familiar with Python but have some basic programming knowledge then the code is easy to grok. See an example here.
Actually, I wonder - with this many implemented cards, it starts getting hard to find new you could implement :) (speaking from experience)
Marek14
Tester
 
Posts: 2759
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 296 times

Re: Incantus is now open source (under the MIT/X11 license)

Postby juzamjedi » 27 Jan 2010, 20:40

Hello Marek!

You forget... there are new cards to implement every 3 months or so :wink:

Putting those aside there are a lot of cards that could be done. Once upon a time Urza block was around 40-50% implemented and now those sets are around 90 percent. Most of the older blocks are currently around 50% done and could be moved a bit higher with some diligence.

Some examples: Bee Sting, Char, and Razorfin Hunter are all pretty easy, but not currently implemented.
juzamjedi
Tester
 
Posts: 575
Joined: 13 Nov 2008, 08:35
Has thanked: 6 times
Been thanked: 8 times

Re: Incantus is now open source (under the MIT/X11 license)

Postby Incantus » 28 Jan 2010, 04:10

I've created simple links on the online card editor so you can see which sets of cards are unimplemented/implemented/tested/error for each expansion.

Go to http://cards.incant.us/expansions/, and click on any of the numbers underneath the statuses of the cards.
Incantus
DEVELOPER
 
Posts: 267
Joined: 29 May 2008, 15:53
Has thanked: 0 time
Been thanked: 3 times

Re: Incantus is now open source (under the MIT/X11 license)

Postby Marek14 » 28 Jan 2010, 07:06

Hmm, if there is an easy link to a current windows exe version of Incantus and editor, I might code some cards again... my brother also wanted one.
Marek14
Tester
 
Posts: 2759
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 296 times

Re: Incantus is now open source (under the MIT/X11 license)

Postby ItalianRockerNM » 31 Jan 2010, 18:53

Yes, a link to the current windows editor would certainly be helpful. I'm going to do my best to learn how to do some of this haha. Cause I would really love to see this work out.
ItalianRockerNM
 
Posts: 8
Joined: 21 Jan 2010, 02:17
Has thanked: 0 time
Been thanked: 0 time

Re: Incantus is now open source (under the MIT/X11 license)

Postby Incantus » 01 Feb 2010, 01:51

Unfortunately, I can no longer make Windows versions as MageKing17 was my windows release packager. If anyone is willing to help me build the windows that would be great!

However, the windows editor is no longer needed, since I've changed the code to use text based cards located in the data/cards/ directory.
Incantus
DEVELOPER
 
Posts: 267
Joined: 29 May 2008, 15:53
Has thanked: 0 time
Been thanked: 3 times

Re: Incantus is now open source (under the MIT/X11 license)

Postby Marek14 » 01 Feb 2010, 06:43

Incantus wrote:Unfortunately, I can no longer make Windows versions as MageKing17 was my windows release packager. If anyone is willing to help me build the windows that would be great!

However, the windows editor is no longer needed, since I've changed the code to use text based cards located in the data/cards/ directory.
Do you also use normal card images now like, say, Forge? I know there were sometimes problems with card_images.db, like impossibility to manually edit it.
Marek14
Tester
 
Posts: 2759
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 296 times

Re: Incantus is now open source (under the MIT/X11 license)

Postby MageKing17 » 10 Feb 2010, 04:35

Marek14 wrote:
Incantus wrote:Unfortunately, I can no longer make Windows versions as MageKing17 was my windows release packager. If anyone is willing to help me build the windows that would be great!

However, the windows editor is no longer needed, since I've changed the code to use text based cards located in the data/cards/ directory.
Do you also use normal card images now like, say, Forge? I know there were sometimes problems with card_images.db, like impossibility to manually edit it.
Since the forum ate my original post, allow me to respond again.

Incantus has loaded card images from the data/cardimg folder for well over a year. Betatester Toolbox has had its image in that folder in every release since the change was made. card_images.db is still used as the download target by the image-downloading code, but it won't download an image if it's in the data/cardimg folder (it may use the .db if it had already downloaded the image... you can force it to use your custom image (or re-download the latest) by deleting card_images.db).

The new feature is that you similarly no longer need cards.db (and, since the program doesn't automatically download cards from anywhere, it won't automatically be created), since you can now store cards as regular text files (but not regular .txt files, remove the file extension) in the data/cards folder. This is a feature I had at one time added to my version of Incantus (but I made it load .txt files, and never committed it to the SVN), now it's a part of the default code.



Speaking of the new code, I have successfully gotten the new code to build into a working executable. Incantus and I are fixing a few bugs (and I'm adding one fix which is almost like a new feature) so that the first major release in a while (what version number should this be? 0.7.0? Surely the new UI by itself is worth a major increase...) will be stable enough that it's actually usable (even if it does need cards badly).

Since that was pretty vague, allow me to give some specifics for our loyal fanbase (or, rather, those of you who haven't already pored over the source code... so, all of you :P): Retrace, Flash, and Cascade are all in and working (and, from what I can tell, Suspend should be possible, if someone fixes the UI to display counters on cards outside of play, and I'm going to see if I can fix up Hideaway for this release for good measure). Using the same technique as Flash (but applied on a larger scale), Vedalken Orrery is now implemented and working (yes, working!). So is Allosaurus Rider (with working alternate cost) and Haakon, Stromgald Scourge (which isn't 100% tested) is so far is working (can't be played from hand, can be played from graveyard). Worldheart Phoenix has been coded but not tested, I'm going to be doing that soon. Oh, and our old favourite Fist of Suns is also in.

For our regular card-makers, I'd recommend against heavy card creation at this point (or, more specifically, at the point I finally put up the new build). Having less than 100 cards makes it easier for us to change the card format if we need to (and odds are, we'll need to fairly soon, if for no other reason than to switch zones to symbols like colors and characteristics are).

EDIT: Oh, I almost forgot. Not only do we have alternate costs working, but we also have additional costs working, so Bone Splinters et al. are now possible (again).
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Incantus is now open source (under the MIT/X11 license)

Postby MageKing17 » 15 Feb 2010, 06:30

Wow, total lack of response, I guess people have stopped caring about this. :P

Well, let's see if I can get you to care:
suspend_working.png
Arc Blade triggers, once again.


Yes, that's Arc Blade. Yes, that card has Suspend. Yes, it's in-game and working. Yes, it is tested, that screenshot is taken after it's already been cast more than once (and re-suspended itself). No, I haven't altered the UI to make it display counters on exiled cards, I wouldn't know where to look to make that change... although I would know where to start looking. I just have other stuff to do. :P

Like, for instance, getting a release out. It's been far too long, and you guys have got to try out this stuff. Since I haven't found any horrible crashing bugs with the stuff I'm currently messing with (although that doesn't guarantee there aren't any), I'm going to build an executable and put it out there for y'all to play with. I'd just really like some people out there to provide bug reports and other feedback.
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Next

Return to Incantus

Who is online

Users browsing this forum: No registered users and 5 guests


Who is online

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

Login Form