magic

You are currently browsing the archive for the magic category.

How many times have you imagined, going anywhere and not having to even look at your phone to answer a call. How many times have we dreamed of speaking and having a machine translate it for you? How many times have we imagined having computers in every (no, smartphones don’t count) part of our life? Well, it is all finally here! So, what should we expect? and what is the general opinion on this device? Lets find out Read the rest of this entry »



Tags: , , , , , ,

A while ago I mentioned WTactics in my article on free art for game developers, a trading card game under active development.

Everything, from the card images to the rules, is open source, and welcoming users contributions. One of my hopes for Wagic is to make our engine flexible enough that we will support WTactics one day.

 

Read the rest of this entry »

Chinese Dark Ascension  

I’m in China for a business trip, and I randomly found a Seven Eleven convenience store that was selling Magic cards. I thought it would be an interesting souvenir :)

I don’t speak Chinese though, below is the rare card I got in that booster, anybody know what it is, or what it does?

Read the rest of this entry »

I was randomly browsing the web yesterday, and found this article that was getting lots of hype on Gizmodo (I usually don’t read these generic gadget websites, but the title caught my attention)… You’ve got to read it to understand, but basically this Gizmodo editor thinks she’s too good to date John Finkel, a professional Poker and Magic:the Gathering player, because, well, he’s a nerd, and who wants to date a nerd? That article is so wrong in so many ways, that Alyssa Bereznak (the blogger who wrote this article) quickly became a meme

Is it a joke to welcome the announcement on Magic’s latest expansion? Is it an attempt from Gizmodo to create some buzz (in which case, well done, it’s working!), or is that person dumb enough to think it’s a good idea to publicly talk about her dates on a major website, and on top of that, complain about nerds on a gadget website (where she works, what tech-oriented company hires a person who doesn’t like Magic :P )?

The author of the blog article complains she didn’t google for John Finkel and should have, in order to find out he’s a nerd before going to a date with him. She should also probably have googled a bit more to find he’s making hundreds of thousands of dollars playing Magic, before bashing him for being a nerd.

A few days ago we released a new version of Wagic. Wagic is a cool strategy card game set in a heroic-fantasy universe, in which you build your army of cards out of several thousands of units, an fight against the AI.

I know that many people like to build lots of different decks to experiment with. I prefer to start with one single deck, and make it evolve with time. It’s a matter of choice of course, but here’s how I create my first deck:

A rule of thumb is that a typical deck in Wagic should have 60 cards. There are 5 colors in the game, and it is usually recommended to start with a deck made of 2 colors, including 24 lands. When you run Wagic for the first time, the game gives you 140 cards randomly, as well as 3000 credits. What I do at that time is go straight in the deck editor, and look for the two colors for which I have the most cards, and simply put all these cards in my deck, as well as the associated lands.

Can you easily beat the game with your first deck?

Imagine the two colors for which I have the most cards are black and green. I’ll put all the green and black cards into my deck, as well as the 10 forests and the 10 swamps available from the “lands” section. Note that this does not make 24 lands, so on top of that I’ll usually add 4 random lands, let’s say 4 mountains. If I’m lucky, this will be enough to build a first (crappy) 60 cards deck. If that’s not enough, I can still add a few artifacts if necessary.

The game intentionally gives you “not enough” stuff at the beginning to virtually increase the difficulty, but remember that you have 3000 credits. I usually use these credits to buy the lands I’m missing (let’s replace those 4 mountains with 2 forests and 2 swamps!) and/or cards of the two colors I just chose. But it is also possible to buy boosters. How you use your first 3000 credits is a good part of the initial strategy, and buying cards of your 2 “main” colors is probably the best move, but I must admit I sometimes can’t resist the will to get surprised by boosters (and sometimes completely change my 2 initial colors). You can buy all these from the shop, that can be accessed directly from the main menu.

I know that some people want to build the deck of their dreams right away (there’s the cheat mode for that ;) ), but what I like about this strategy is that I get to discover cards I didn’t know, combos I didn’t imagine…and overall starting with a crappy deck and improving it as I play is how I enjoy Wagic, and I hope you will too. The AI in Wagic would probably be easy to beat for an experienced player with a well constructed deck, but by putting constraints on your initial decks, we try to make the game more challenging, and I believe we are really successful on that part (at least as far as I’m concerned, I’ve been playing Wagic every day since the first release!)

Many people have been concerned about the lack of news about Wagic these past months, but don’t worry. Although I don’t talk about it much on the blog, we have a growing community, and a bunch of people who keep making this game better every day. Also remember that leungclj shares pieces of news regularly on Twitter and Facebook

We are working on a release for Wagic 0.13, and although I can’t give any date, I can tell you it will ship with a bunch of cool new features and new cards.

Zethfox and Dr. Solomat have been busy adding more and more cards to Wagic, adding this time more than 500 unique cards (I don’t have the exact count yet, are they are still working on this), including a good number of cards from the upcoming set Scars of Mirrodin. People who want to try these cards can already check Dr. Solomat’s thread here

linshier added support for the Chinese language, which was a huge task. Maybe this will lead to more support of non-latin 1 languages in the future. You can see his thread on the forums here

Other nice changes include the support of Mulligan thanks to almosthumane, and some cool additions (such as improvements in the deck selection menus) by MNguyen.

I’m also excited to say that developer DJardin started working on a N900 port of Wagic, which is already functional, and integrated in the SVN. As I don’t have any N900 myself, and I’m way too lazy to install the SDK, I couldn’t test the port myself, but here’s a screenshot courtesy of the dev.
Update: DJardin also posted a video, thanks!

You can follow the news on this port of Wagic to the N900 here

And for those who love nice artwork, please have a look at kaioshin’s Art thread on the forum. His awesome wallpapers will definitely enhance the Wagic experience:

Follow Wagic’s latest updates on Twitter and Facebook:

Drunken MTG  

Seriously, why does Oona’s Gatewarden look like Michael Jackson? Or is it just me?

One of the things I enjoy the most in Wagic is when the AI surprises me with extremely clever moves.

The AI in Wagic is driven by randomness, logic, and a bit of revenge. It basically “learns” which cards in your deck are a threat to it, and tends to target these cards more than others with its spells.

Today I got owned in something like 6 turns by the AI deck Depletion, and the moves were so good I have to talk about them.

On its first turn, the AI cast “Tome scour” on me, making me moving 5 cards from my library to my graveyard.

Unfortunately, the best card of my deck was in there: Ob Nixilis, the Fallen. That card is sooo unbalanced that it’s a great game finisher.

On its second turn, the AI cast Animate Dead on my beloved creature.

3 turns later, I was dead. (On top of the AI’s excellent moves, I had a very crappy starting hand, but even without it, such a powerful creature on turn 2…what can you do?)

Owing to its “revenge” mechanism, the AI in Wagic can be extremely good against combo decks, or, in my case, decks that mostly rely on one card to win :)

If you have good stories about the AI owning you in a way that seemed “clever” don’t hesitate to share them :)

Worldwake in Wagic  

You can already play Avenger of Zendikar in Wagic 0.10

You can already play Avenger of Zendikar in Wagic 0.10

I’m happy to announce that thanks to the terrific work of Dr. Solomat, Wagic already handles 56 cards of the new Worldwake set.

Yes, that means you can already playtest some cards of this new set in Wagic.

Some of the cards will only work with the SVN version of Wagic, but most of them are working with the current 0.10.1 release.

You can get the file on our SVN, here. To install it in your Wagic folder, just save that file as Res/sets/WWK/_cards.dat (of course you have to create the WWK folder) in your Wagic installation, and you’re done.

You can discuss this set in Dr.Solomat’s release thread

The Wagic team is hard at work to provide more playable cards, bug fixes, and cool new features in next Wagic release, so stay tuned :)

Wagic is not published or endorsed by Wizards of the Coast.

I was recently looking for good homebrew games on the PSP (I might start a subject on that in future posts…), which reminded me of games I used to play on the PSP when I started seriously thinking about Wagic.

I didn’t realize it at the time, but it is funny how these games inspired me when I started coding my game.

But before talking of PSP homebrews, I’ll start with the obvious inspirations. Of course, Wagic is inspired from Magic the Gathering, but more specifically, the two following games:

Shandalar

shandalar1

shandalar1-3

Shandalar is an old Microprose game that allowed to play quests in an heroic fantasy world, while fighting against other sorcerers with Magic cards. Although I never played the game, I was always impressed by the idea of “progressing” in a game, fulfill quests, visit shops to buy cards, and stuff like that. This game was much more than a MTG simulation, it was a real game relying on the rules of MTG with goals to achieve, which is why I think it was (and still is) succesful. The whole idea of  the shop in Wagic (buying cards/unlocking sets) comes from this. Actually, the initial goal for Wagic was that you’d travel on a map and fight ennemies with your cards… I haven’t given up on this idea yet, but it clearly means creating a whole RPG, which is a huge task.

Shandalar was made to run on screens that didn’t have the cool resolutions we have nowadays. Keeping this in mind helped me work on the initial designs of Wagic. With the size of the PSP screen, we always have to have an interface that allows to show lots of information on a very limited space.

For those who don’t know, Shandalar is maintained by a group of fans, under the name Manalink. Manalink handles Momir Basic, which is where I got the idea of implementing it in Wagic as well :)

Forge

screenshot-3In 2007 when I started working on Wagic, Forge (it was called MTG Forge at the time) was the only “mainstream” open source game that allowed people to play MTG against an AI. Other solutions existed, such as MagMa – Magic Machine – but weren’t easy to access – at least the source. Forge is written in Java while other freeware programs were either closed source or not portable. My initial goal was to see if I could port an existing freeware game to the PSP. Forge doesn’t have the best interface or the cleanest code in the world of open source, but it was the proof that creating an AI to play MTG was doable. I quickly gave up on porting it though, as I needed to rewrite it in C, and I disagreed with most of the design choices mades in the code. In the last months, Forge has been getting lots of improvements. I must admit I haven’t played it in a while. The screenshot above is neither recent nor old. The version I played two years ago couldn’t show the card pictures on the board. Forge lacks eye candy, but it’s getting better, and it’s probably the most active open source MTG project currently.

Defense Station PSP

ss_1DSP was a PSP homebrew made by coder Danzel. Not only was it quite fun to play, it didn’t use any fancy 3d and was a full game with lots of customization. By “full game”, I mean it was more than a proof of concept. A problem with most homebrews on the PSP is that they only have one level. Or no end. Or no goal at all… which makes you play them for 10 minutes then throw them away. DSP wasn’t one of those. You could play it, play it again, download packs with different levels. It was extremely fun, and if you like tower defense I recommend it. (I also recommend Comet Crash on the PS3 if you’re into tower defense, by the way). When I saw lots of people contributing to DSP with maps and new graphics, I new I wanted Wagic to allow the same kind of customization

Spider solitaire

9563_spider_solitaireI’ve spent countless hours on this game. It made me realize that it was possible to do a fun game without any incredible graphic skills (which is my main issue). While playing this game I realized creating a card game on the PSP wouldn’t require me to draw anything but rectangles. Yet I wanted more strategy in my game, which is why I went with the concept of TCCG. The very simple gray tone was clearly the inspiration for the main menu in the first versions of Wagic (I can’t show them to you because they used copyrighted graphics, but people who played the early releases back in 2008 probably remember a gray gradient with mana icons. It was very sober and I loved it).

AI Deck contest!  

If you enjoy Wagic, but think you could teach us how to build better decks, or if you happen to have created a deck in Wagic that you want to measure against others, then this is for you! The first “AI Deck competition” was just announced on the forums.

There’s nothing to win, but the pride of showing your MTG deck construction skills. This is a very casual tournament, just for the fun of it.

You have 11 days to build a cool deck and submit it. The decks will then be automatically tested against each other through Wagic’s AI in several thousand matches. We will include the best performing decks in Wagic’s next release :)

Rules and subscriptions here, many thanks to Psyringe for organizing all this!

Yeah. That’s right, grizzly bears are my favorite. Why you ask? Well because it’s a vanilla creature. They have a power and a toughness, that’s it. Not stupid abilities that will be a nightmare to code, no fancy casting cost involving sacrifices or X or hybrid mana or saying “Beetlejuice” 3 times. No token generation, or triggered effect, or “choose one”, or “when it’s the first Friday of the month and if your opponent is older than you, then you deal Y damage to Z creatures where X is the sum of your age plus the color of the eyes of your opponent divided by 2″. Nope. Just a plain good vanilla creature that will never make Wagic crash :) I love you, grizzly bears!

Seriously though, what’s your favorite card in Magic?

Parsing Cards rules  

When creating a Magic the Gathering simulation (or any other collectible card game), one of the first decisions one has to make is how to store the Data for the cards. It is a decision that needs to be taken in early stages of the development, yet it has such a huge impact on the future of the game that it shouldn’t be taken lightly.
This information will of course tell the game what the card does, when it can be played, what it’s effects are, etc…, so it is obviously very important.

There are several MTG computer simulations out there, and we all went with different choices.

Firemox

Firemox’s cards are coded in XML. Firemox was designed to be extremely flexible and allow several kinds of games, but as far as I know it never supported anything else than Magic the gathering. Their XML files looks overly complex to me, especially since the “flexibility” is still limited by the possibilities of the engine behind.

<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<card xmlns=”http://sourceforge.net/projects/firemox”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://sourceforge.net/projects/firemox ../../validator.xsd”
name=”Angel of Light”>
<rules-author-comment>riclas</rules-author-comment>
<init>
<registers>
<register index=”white” value=”1″/>
<register index=”colorless” value=”4″/>
<register index=”power” value=”3″/>
<register index=”toughness” value=”3″/>
</registers>
<colors>white</colors>
<idcards>creature</idcards>
<properties>vigilance flying angel</properties>
</init>
<abilities>
<ability ref=”cast-spell”/>
</abilities>
</card>

Incantus

Incantus is coded in Python, and the cards as well. Using a scripting language for the data is a pretty clever way of doing things, especially when it’s the exact same language you’re using for the engine. It’s not tood difficult to read (although not as easy as I would expect), and extremely flexible since it gives you control on the rest of the code.

name = ‘Mogg Fanatic’
cardnum = 219
expansion = ’10E’
type = characteristic(‘Creature’)
supertype = no_characteristic()
subtypes = characteristic(['Goblin'])
cost = ‘R’
color = characteristic(['R'])
text = ['Sacrifice Mogg Fanatic: Mogg Fanatic deals 1 damage to target creature or player.']

play_permanent(card, cost)

in_play_role = Permanent(card, Creature(1, 1))

@activated(card, txt=text[0])
def effects(source):
payment = yield SacrificeCost()
target = yield Target(target_types=isCreatureOrPlayer)
source.dealDamage(target, 1)
yield

MAGic MAchine

Magic Machine apparently uses an encoded string to represent the cards, but my attempts at retrieving any useful information on Magic Machine’s card format didn’t give anything. The game itself only works on windows and requires admin rights to be installed, the databases I could find where password protected, and the help forums are in italian and don’t give much info on their format. It seems quite flexible though, and MagMa is the freeware with the biggest card database around here (but Incantus will soon have more, and Wagic is getting closer). The fact that it requires an editor seems a bit problematic to me, but if it gives enough motivation for players to create cards, it might be good.

Duels of the Planeswalkers (XBOX360)

The recent XBOX360 game “duels of the Planeswalkers” also uses XML to represent their cards. Unlike the xml in firemox, it is very readable:

Of course, this is a commercial game, so it’s not like you could create your own cards, which sort of ruins the point of even talking about their representation…

MTGForge

MTGForge has a mix of hardcoded cards and cards using a small set of keywords (http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=701). Recently the set of keywords recognized by MTGForge has been growing rapidly. Here is what Birds of Paradise look like in MTGForge:

Birds of Paradise
G
Creature Bird
0/1
tap: add W
tap: add B
tap: add U
tap: add R
tap: add G
Flying

Wagic

MTGForge was the initial inspiration for Wagic, so I initially went with hardcoded cards, and it was clear to me that at least the “data” part had to be stored outside of the code, as external data files, one for each expansion. They key in allowing people to add their own cards was that the format has to be easy to read and understand, so I went with simple text files. I think the first release only allowed some basic abilities (such as “vigilance, flying..) and maybe mana sources (“auto={T}:Add …”).
The possibility to add your own cards in Wagic is probably the feature that had the most success so far. Wagic was initially planned to handle around 300 cards and focus on the AI. But in the last months, more work has been made on adding new cards (and allowing people to add more) than on the rest of the game.
Here are the cards previously mentioned for other games, the way we represent them in Wagic:
Birds of Paradise

[card]
text=Flying (This creature can’t be blocked except by creatures with flying or reach.)  {T}: Add one mana of any color to your mana pool.
abilities=flying
auto={T}:Add{G}
auto={T}:Add{R}
auto={T}:Add{U}
auto={T}:Add{B}
auto={T}:Add{W}
id=129906
name=Birds of Paradise
rarity=R
color=Green
type=Creature
mana={G}
power=0
subtype=Bird
toughness=1
[/card]

Angel of Mercy

[card]
text=Flying (This creature can’t be blocked except by creatures with flying or reach.)  When Angel of Mercy comes into play, you gain 3 life.
abilities=flying
auto=life:3
id=129465
name=Angel of Mercy
rarity=U
color=White
type=Creature
mana={4}{W}
power=3
subtype=Angel
toughness=3
[/card]

Mogg Fanatic

[card]
text=Sacrifice Mogg Fanatic: Mogg Fanatic deals 1 damage to target creature or player.
auto={s}:Damage:1 target(creature,player)
id=134748
name=Mogg Fanatic
rarity=U
type=Creature
mana={R}
power=1
subtype=Goblin
toughness=1
[/card]

Angel of light

[card]
text=Vigilance,flying
name=Angel of Light
rarity=R
type=Creature
mana={4}{W}
power=3
subtype=Angel
toughness=3
[/card]

And here is a more complex card, that will work with the upcoming engine:

[card]
id=189909
name=Mold Adder
mana={G}
type=Creature
subtype=Fungus Snake
power=1
toughness=1
text=Whenever an opponent casts a blue or black spell, you may put a +1/+1 counter on Mold Adder.
auto=@movedTo(*[black;blue]|opponentStack):may counter(1/1)
rarity=U
[/card]

Overall I think it looks pretty simple, even for very complex effects.

All these methods have advantages and drawbacks. XML (firemox, duels of the planeswalkers) offers some structure and flexibility, but I think it fails in human readability, and flexibility could be achieved more easily with scripting languages such as python or lua. Magic Machine’s proprietary system looks flexible, but is clearly unreadable if you don’t have access to the card Editor, which to me would represent extra work that I am not ready to do. Plus it is always possible to have an editor yet a readable output. A scripting language (for example Python for Incantus) is probably the most flexible solution, and readability feels quite good to me.
The hybrid solution chosen by MTGForge and Wagic (some hardcoded cards, and a few keywords) is quite easy to code and easy to read in early stages. Newcomers can create basic cards in a few minutes with a text editor, while “experienced” coders can add cards in the code and recompile the game. Overall it works quite well, but after a while it shows its limits when you try to add new cards with more complex mechanisms. What were initially simple keywords become confusing strings that don’t always do what you want…

I’m happy with Wagic’s current system but I am not sure it can be extended infinitely. If I were to start again, I would highly consider a hybrid between a scripting language such as lua and parsed keywords.

sources

http://mtgrares.blogspot.com/2009/04/plaintext-creatures-and-cardstxt.html

http://mtgrares.blogspot.com/2008/01/magma.html

http://www.wizards.com/Magic/Magazine/Article.aspx?x=mtg/daily/feature/43c

http://www.firemox.org/mtg.html

http://www.slightlymagic.net/forum/viewtopic.php?f=27&t=557

This is a screenshoot I took yesterday while working on the code.

I think it’s very interesting because you can see several new and/or cool features at a glance:


(click on the picture to see the real size)

So now you can either try to guess what’s new or read on :)

The most obvious I think is the cool theme. As you may or may not know, it does not require any single line of programming to tweak Wagic’s graphics, and I’m actually surprised we had to wait 3 months before someone came up with such a cool mod. I myself suck at design, so I’m always impressed when people create cool graphics. Many thanks to u0127907 for this mod, I hope this will give motivation for other people to create and share their own mods. You can download it on the forum

The second thing, less obvious, is the picture quality of the big card. Of course, this is the windows version, and there’s no way to achieve that on the PSP version, but what this technically means is that I’m working on removing the size limitations on cards pictures. This will allow people using the PC versions (Windows, Linux or Mac) to play fullscreen without having blurry cards. It will also allow people on the PSP to reduce the size of the pictures if they think it takes too much space on their memory stick. Currently, I think the size of the cards is 285*something, and reducing it to 255*… should divide the textures size (in RAM) by 2 without losing much picture quality.

The last thing is probably the one that will interest you as Magic/Wagic players: The actual name of the big card you see on the screen. Yes, it’s a wasp token, which means I more or less got tokens working in Wagic’s current SVN revision (the Hive is hidden behind the big Wasp card, tapped. For the purpose of the test, I set the mana cost of the hive to 0 and the tokens cost to 1). Icing on the cake, tokens are partially scriptable in _cards.dat, this is the code for the Hive :

auto={5},{T}:token(Wasp,creature artifact insect, 1/1,flying artifact)

Internally, Token objects inherit from the MTGCardInstance class, and a few specific dirty tricks are performed by the code when the token changes zone, or when creating the image name. I think using tokens in the current svn version creates a memory leak, but this will be fixed eventually.

Typical. Coding while I should be packing for my holiday, yay me !

Tags:

Other Programs  

lord of the pit

bwahahaha

When I started working on Wagic a year ago, I thought there was absolutely no program that did what I wanted to do : a MTG game with rules enforcement.

After digging a little bit, I discovered that there are actually quite a lot of attempts at doing that.

MTG Forge Has quite a lot of cards (around 700 I think), is an open source Java application. Its author is working hard, so the application has in dynamism what it lacks in professional-looking-ism. When I tried it several months ago, I didn’t enjoy it because I thought the AI was crappy. I think differently now that I have to code my own :p . The creator’s blog is very interesting, updated regularly, and the main reason I started my own blog for this project !

Deckbot is not open source, but has quite a lot of cards from recent editions. It is text based, but uses a form of Minimax algorithm for the AI. Haven’t tried it yet but I read the AI is pretty damn good !

Incantus is the new hot Magic project these days. All is written in Python, and the GUI is brilliant, even better than the official “MTG Online” sold by Wizards of the Coast. I have difficulties to understand the “open source or not” status of this game… Adding cards seems to be easy as pie, it manages lots of complex rules, but it doesn’t have any AI (network play).

There are lots of other games, the site slightlymagic.net tries to give a complete list of them.

So why would we need yet another Magic game ? Well, none of these could run on the PSP, due to the size of the screen and the memory they use. So a new one is definitely needed for portable devices owners !

Note: There is also a PSP port of Magic WorkStation, but I found the installation process to be complex, especially since the game didn’t do much at that time (2 players hotseat, no rule enforcement…). MWS without network support is not that interesting…so I didn’t try that hard to install it.