Important Note! Please keep in mind that MtGnet source code is still in development and so no warranties on the use of this code can be implied! The MtGnet server is now generally available for testing using the mtgnet.jar client code, so if you're feeling adventurous then give it a try!
Card rulings implemented on the server and Decks window.
Users window implemented - displays list of all registered users and associated profile data.
Library implemented - this is where users can publish decks they've constructed so that others, especially newbies, can download and use right away. Also made a change to the client.ini file created by the client app. Any decks you've constructed will are not compatible with this new format, so you will have to remove your client.ini file before running next time (if you'd rather not email me and I'll tell you how you can modify client.ini to the new format). This should be the last change to the deck structure stored in client.ini. Look for new screen shots soon as well as the beginning of a user manual.
Well it's been a long 8 month MtGnet sabatical for me as I have adjusted to my iMac and doing some work on my web site. But now I've restarted work on MtGnet! I've done some cleanup in the code from November and made some improvements. The biggest change I've added is card drag and drop. In this latest version you can now see cards as they are dragged. The Game screen is still not operational although there is a great deal of code finished for it. Lobby chat is working as is Private Chat and the Deck builder.
The Decks screen has been finalized and seems to function correctly. The Game screen has been designed and coding is now underway. Game screen completion will probably take about a month as it is the most complex subsystem within MtGnet. Concurrently with the Game Screen coding the Library screen will be done but should be reasonably simple. Following these screens will be the automated league feature of MtGnet in which league play, scoring, and game records will be completely handled by the MtGnet server with no operator intervention required.
Another week or so of progress to report with MtGnet now nearly 8,000 lines of source! The basic framework is shaping up with two mostly working systems in place: Lobby (with public and private chat) and Decks (for database queries and deck building). Lobby development was much slower due to the discovery of a bug in the JVM (seems to be on all platforms) - so take my advice and never add a PopupMenu to a List component! The development of the Decks systems included the server side database query engine for both generic searches as well as individual card requests. On the client side the Decks system includes a card caching mechanism so that cards only need to be fetched once from the server. The server card database has been constructing including all cards from Alpha/Beta/Unlimited through Urza's Saga (but excluding Portal, Vangard, and other special sets). Handling all of MtGnet's communications is the package twinfeats.io, which was originally developed for TwinFeats Conference in January of this year. This handy package uses object serialization to provide an event driven message delivery architecture to any client/server system like MtGnet.
One of the really cool things about the new GUI system in MtGnet
that was lacking in PortalNet is the completely user configurable
card screens like Decks and the upcoming Game. Providing much
of the core support of this is twinfeats.mtgnet.awt.SizablePanel,
which provides in java a kind of MDI (Multiple Document Interface).
SizablePanel functions much like a window - you can resize it,
move it, hide it, and show it. But since it isn't a window I can
support drag and drop type operations and allow for the configurable
interface.
twinfeats.mtgnet.awt was also reorganized with the addition of
a new package twinfeats.mtgnet.data to better isolate data from
the physical view of data. Several bugs in the custom AWT controls
were also found and corrected.
As always full source has been updated and is now available in
addition to the client jar file containing the client code in
its current state.
I've started MtGnet development with the package twinfeats.mtgnet.awt as well as the single source package twinfeats.mtgnet.card. The latter contains the class ACard which represents the serializable card data present in the MtGnet card database. The awt package contains three JavaBeans so far:
| PanelMgr | Index card control to manage multiple panels in a given visible region. |
| SizablePanel | This way cool control looks and functions like a simple window, except it's a panel! You can resize it anyway you like and even move it around it's owning container. SizablePanel will be used as the parent container for all CardGroupView controls. |
| CardGroupView | One of the key classes in MtGnet, this serves as the visible representation of a CardGroup. A CardGroupView is completely self configuring for either vertical or horizontal scrolling. |
Each of the above awt JavaBeans is ready to import into your favorite java IDE like Symantec's VisualCafe for Java PDE 2.5a (what I use). Just pop the mtgawt.jar file into the IDE and you can play around with these controls if you like.
The source code also includes a couple of test frames, Frame1.java
and Frame2.java to illustrate some of the use of these JavaBeans.
Frame1.java contains a simple main() method to start this simple
demo.
One of the really cool things about the Card handling classes
(Card, CardView, CardGroup, CardGroupView) is that a simple drag
and drop has been included for use by MtGnet. This is how most
card plays will be done in MtGnet, just drag the card from the
source group to the target group!
For easiest access, be sure to store the mtgnet.jar and db.mtg files in the same directory.
Windows/Unix:
If you're a Windows or Unix user and you need to get a JRE v1.1.x (Java Runtime Environment) so you can run MtGnet, visit:
http://java.sun.com/products/jdk/1.1/jre/index.html
One you have installed the JRE you will want to run the client app to connect to the MtGnet server and register:
(Windows) jre -classpath %CLASSPATH%;mtgnet.jar LogonWin
(Unix) jre -classpath $CLASSPATH:mtgnet.jar LogonWin
Just be sure to click the "New user" checkbox and enter your desired User name and Email address (not desired password, MtGnet will assign you a password you can change later).
You can also run MtGnet in offline deckbuilder mode (required db.mtg to be downloaded):
(Windows) jre -classpath %CLASSPATH%;mtgnet.jar MtGnet yourusername
(Unix) jre -classpath $CLASSPATH:mtgnet.jar MtGnet yourusername
"yourusername" is your MtGnet registered user name. This is required in offline mode because the MtGnet client tracks decks based on user name, so multiple users can share the client.
Macintosh:
If you are a Macintosh user you need to download MRJ (Macintosh Runtime for Java) and the MRJ SDK:
http://developer.apple.com/java/
Once installing the MRJ you can use the MRJ SDK application JBindery to make an executable for the MtGnet client. In JBindery add a classpath (be sure to check off the Expand zips/jars option) to mtgnet.jar and then put for Main Class either MtGnet (offline deck builder) with an Optional Parameter of your username, or LogonWin (for online client).
OS/2
I don't know, probably very similar to Windows/Unix above.