August 2008

You are currently browsing the monthly archive for August 2008.

Although Wagic is still in the alpha stage, there are lots of ways to customize it, mainly because the resource files are not encrypted or even compressed. On top of my mind, here is a list of hints for things you can change without touching the source code:

  • Avatars: Your avatar picture is in Res/player/. The AI’s avatar is in Res/ai/baka
  • AI’s Decks: Although you can create your decks with the deck editor, you cannot edit the AI’s decks…or can you ? They are located in Res/ai/baka/deck*.txt… Please be aware that currently the AI is unable to use most cards, especially those that have targets, and it might end up with weird crashes.
  • Background picture: Res/graphics/background.png
  • Background music: check the download section, there is music provided with Wagic, unfortunately the mp3 player is very unstable, so it crashes the PSP quite often… but you can give it a try to see what kind of musics I have in mind for Wagic. Currently, I personally use the music plugin to listen to music while I play, I find it more enjoyable.
  • More credits ? Check Res/player/data.dat
  • More cards in your collection ? You bought thousands of boosters and still don’t have that Shivan Dragon you dream of ? Edit Res/player/collection.dat to add it.
  • Add other magic sets ? It is currently possible to add around 30% of the cards in 10th edition to the game without changing the code… but the way to do that is still a secret known only to wizards hidden in a holy mountain, somewhere far away…


There are lots of things to improve in WTH, and all of them are important.

A few people tried this game already, and hopefully some of them will be coming back to this site to get news… So I’m asking the question : What would you like to see in priority in the next release ?

  • New features ?
  • Bug fixes ?
  • Improved AI ?
  • Improved user interface ?
  • More Cards ?

Let me know what you want :)

I’ve just uploaded the first public alpha to the server. I’ve already found lots of bugs, but that was to be expected, and I made a promise not to program for the next 4 weeks !

I will run a last set of tests on my PSP tomorrow to make sure nothing prevents the game from actually running, then make an announcement on QJ’s forums. This means that if you’re reading this blog for some reason, you might be able to try the game before it is officially announced. How lucky are you ?

Please give a try to WTH?!, and send me comments, feedback, bug reports in this post

Enjoy!

http://wololo.net/wagic/download

Tags:



These two images show the Deck Editor in its current state.

It has a nice interface for navigating the cards but is actually not user friendly. I always get confused between the Deck and the collection, and it is difficult to see how much cards of each type (e.g., how many fireballs ?) you have in your deck…

I’ll improve that with time

That next image is a bug that occurs from time to time in the blitting system. I have no clue where it comes from, I’m not even sure it’s still there… if it happens to you, just restart the game again and again and again… at some point it tends to go away (unititialized variable, anyone ?)

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.

FPU  

I’ve spent two awful weeks debugging stupid stuff. Although it made me learn a lot about debugging techniques in Visual Studio, it was overall an incredible waste of time.

I still didn’t figure out what was going on on the PSP that made it randomly crash, but because it was a FPU (Floating Point Unit) Exception, I temporarily disabled FPU Exceptions. This works, but… it still means that somewhere in my code there’s a nasty division by 0 or something… oh well, doesn’t seem to have any impact on the game so…

Debugging  

Coding C++ is painful. coding for the PSP is painful. Even with tools such as PSPLINK, compiling and testing takes time, especially since the PSP tends to crash a lot (previous versions of PSPLinks prevented that, but I must have done something bad with my SDK at some point…). And then you have to reboot the PSP, restart the game, and so on…

Despite my hate for Microsoft’s products, developing with VC++ eases the process a lot. I do most of my testing on windows. But it has its drawbacks. I currently struggle with memory leaks and memory corruption problems. But because Windows forgives a lot (and I have far more Ram available), these problems don’t appear on windows, only on the PSP.

So I’m back to my starting point, having to do lots of painful tests on the PSP through PSPLink…

To prevent that, I’m currently trying to use the debug libraries provided with VC++. It’s easier than I thought, and there’s lot of information on how to do it on msdn. Of course the solutions provided on the various forums I checked didn’t work for me (I guess I didn’t put the necessary includes at the correct place), but defining a macro NEW to replace new did the trick, so I now have useful memory leaks report that will help.

My problem is that I do not have only memory leaks, but memory corruption problems as well, and these ones are going to be difficult to solve :(

Developing for the PSP is tough, especially since I have close to no experience in video game creation. I am aware of the performance issues that I could run into on such a device, but a card game should not be as much a problem as an eye-candy 3D Game…

However the cards textures are big enough to fill the PSP’s ram (something like 20MB is available for homebrews) within a few seconds’ play, so I have to take that into account, although I’m doing most of the development on Windows… My computer has like 2GB Ram, so it is difficult to know easily if I’m not messing with the memory.

Currently Wagic cannot be released for this single reason: I handle my PSP’s memory like a pig, and it just crashes for some reason. Once this problem is solved, I’ll release an alpha, but for what I know, this could take weeks or months :(

Wagic uses the JGE++ library which does most of the painful job (blitting, Hardware acceleration…) for me. It allows to code for both windows and the PSP, which speeds up the development process a lot (I spend 95% of my coding time on VC++). It has bugs and limitations however, so I slightly modified the version I’m using.

When I compile the code for the PSP, I’m doing it on KUbuntu. A SDK is needed… if you’re a complete beginner in the PSP development world but are interested in creating some software for this device, ps2dev.org is the place to start. Setting up a PSP Dev environment is not an easy task, but their forums provide precious help.

Linux is highly recommended (although there are some Windows solutions to compile your PSP code). It is much more easier on Linux though, and there are lots of cools tools provided by the pspdev community on linux. I couldn’t imagine developing without PSPLink now.

(Note that if you’re a complete newbie in computer programming, you shouldn’t even think of starting coding on a PSP…you’d rather try on more standard machines first.)

Tags: ,

This is a blog I set up to share my progress on a homebrew game for the PSP.

The name is “Wagic, the Homebrew ?!”, a.k.a WTH?!… yeah , well, a weird name doesn’t necessary mean a bad piece of sofware, does it ?

This game enables you to play a famous card game against the computer. It hasn’t been released yet, but hopefully a beta should be ready in the weeks or months to come.

Meanwhile, enjoy the demo videos !

Tags: