Alpha 2

I bet I have your attention now? 😉

Auto-updating the application is easy, but I am not satisfied with the way data files are handled (that is: all the games you are going to install). So in the end, there will be no installer, nor auto-update for alpha 2. I will push an “alpha 2 refresh” when I sort out a few details.

PLEASE READ THIS POST COMPLETELY – or don’t complain.

1. Install Alpha 2

Prerequisite: You need .NET 3.5 SP1 to run OCTGN 2. You should be able to get it through Windows Update. If you prefer here’s the download page, from which you can choose your language: http://www.microsoft.com/downloads/details.aspx?displaylang=fr&FamilyID=ab99342f-5d1a-413d-8319-81da479ab0d7

Then grab this file: www.octgn.net/octgn-client/Alpha2.zip (500Ko). Unzip anywhere you want. Congratulation the client is installed!

I still haven’t included any GUI to change your nickname (shame on me). So proceed just like alpha 1: open the file octgn.exe.config with notepad (or any text editor), and look for this line:
<setting name=”NickName” serializeAs=”String”>
   <value>Player</value>
</setting>
Replace Player with your nickname.

2. Uninstall Alpha 2

Currently the application doesn’t write anything to the registry or whatever. So you can just delete the folder where you installed it.

3. Games

Currently no game is distributed with OCTGN 2. I will probably publish the Blue Moon game again later.

If you want to create some games, please get in touch with me: dev.no.spam.thanks@octgn.net

If you have one game you want to share, I suggest you upload it to some place like mediafire.com. Just be sure to include OCTGN2 in the name and put the link somewhere, so that Google can pick it up:
http://www.google.ch/search?q=site%3Amediafire.com+OCTGN2
Of course there’s no game right now, but hopefully you will find some soon. Remember .o8g files are the game definitions, .o8s are sets of cards.

EDIT> Someone brought to my attention filebeam.com. It’s a free file hosting service, with a built-in search engine. So you can easily host and find OCTGN2 files!

Once you have some definitions, you have to add them to your OCTGN installation. After starting the client (it’s better doing this before anything else because of some bugs. Be warned: the game manager part is not advanced at all, but it kinda works for now), click “Manage my games”. Then “Add game” and select your .o8g file. Then click “Add cards” and select any number of .o8s files for your game.

A few shortcuts you may not be aware of:

If you carefully read this blog, you know most of those. Otherwise you may need to know a few things:

Targetting happens by holding SHIFT at the same time as left-clicking (can be a single target or an arrow);
The table can be panned by holding SPACE and dragging, zoomed with the mouse wheel;
You can drag and drop markers, combine with SHIFT to copy and ALT to move/copy all of the same kind;
Using SHIFT you can play cards face down on the table (if the game definition allows you to);
Loading a deck doesn’t shuffle, so don’t forget to!

There’s more but you can always go back and read the previous blog posts 😉

Issues

I tried to make sure that there aren’t bad or blocking issues with this release. Many features are still missing, though (e.g. the deck builder), which makes many cards unplayable. Just remember this is just an alpha, not even a beta. I am now focusing on completing the feature set, so expect more to come.

Regarding the lack of a deck builder, I’m sure you will understand to deck format very easily if you want to create some decks of your own. You will be happy to know that the card ids are not required inside the deck file if you include the exact name.

Enjoy!

Advertisements
Explore posts in the same categories: OCTGN.net

44 Comments on “Alpha 2”

  1. roblethal Says:

    first post. you can keep up with updates on octgn.blogspot.com, cheers!

  2. Gaspare Says:

    I get an error if i try to start a new game. I paste the error code:

    System.NullReferenceException: Riferimento a un oggetto non impostato su un’istanza di oggetto.
    in Octgn.Launcher.Serve.Start(Object sender, RoutedEventArgs e)
    in System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    [jods has snipped most of the stack trace]
    in Octgn.OctgnApp.Main()

    Is that happening because i haven’t installed any game?

  3. jods Says:

    Yes, surely. It’s impossible to start a “game” without having some installed.

    I thought I took care of that, but apparently not.

  4. Gaspare Says:

    Ok, I have loaded tenth ed. and cards. Then i loaded a deck.

    At first look it looks AWESOME, really.

    I found something that looks a bug though: I’ve put 2 cards in play, target one (green arrow). Then i untarget the card. I’ve then put a counter on one of the 2 cards (used blue counter and named it +1+1). Then i tried to drag the card on top of library and the game window just crashed.

    Actually i think its really a bug, it just happened again with another card. I hope to be somewhat helpful with these reports…

  5. jods Says:

    Thanks Gaspare!
    I updated the Alpha2.zip file with a release, which fixes those 2 bugs. You may want to install it (just replace the file you have currently). Indeed moving a card with markers to a pile was crashing. I also fixed the “Start without selecting a game” bug. (Now it does nothing. I will add a message, but for now it’s better than the error you got.)

    As a bonus this is an optimized build (the previous wasn’t), Also I forgot a few shortcuts related to markers:
    if you hit + or – on the numeric keypad while the mouse is over a counter on a card, one counter of the same kind is added (resp. removed).

  6. Xenocyde Says:

    The Alpha 2 link isn’t working anymore 😦

  7. Xenocyde Says:

    Hmm, I think the server was refreshing or something. It’s on now 😀

  8. Joesnuffy Says:

    Great Alpha Release. This is looking great. Just had one question is there a place you want us to put a running report on bugs found? I have had a few crashes (nothing major)

    Keep up the great work! 🙂

  9. BurntChomsky Says:

    Wow, GREAT work on this program, jods. Such an improvement on the old OCTGN! I noticed a bug myself: if i click mulligan and then click no when it asks if I “really want to mulligan”, the program crashes. Great work on this, here’s to hoping you finish it soon!

  10. Superman Says:

    I get an error whenever I try to start the game.

    I have Windows Vista Home Premium Edition. I installed the .net 3.5 SP1 update but no other updates.

    Does anyone else know what the following error code means or does anyone get the below error?

    Description:
    Stopped working

    Problem signature:
    Problem Event Name: CLR20r3
    Problem Signature 01: octgn.exe
    Problem Signature 02: 0.2.0.1
    Problem Signature 03: 48dfde57
    Problem Signature 04: PresentationFramework
    Problem Signature 05: 3.0.0.0
    Problem Signature 06: 453054bb
    Problem Signature 07: 6496
    Problem Signature 08: be
    Problem Signature 09: System.Windows.Markup.XamlParse
    OS Version: 6.0.6000.2.0.0.768.3
    Locale ID: 1033

  11. Kempeth Says:

    Awesome! Going to try this out first thing this evening…

  12. Gaspare Says:

    @Superman: have you installed properly magic game and cards? If you dont, it wont work.

  13. Talking Shotgun Says:

    How do I create a game file, or more importantly edit the magic .o8g file?? I want to learn hoe to make these game definitions and I want to dissect ones that exist already to learn how.

  14. Jorbes Says:

    Jods,

    I just installed 3.5 framework and got all the updates.

    The program crashes from the start… see screenshot for details.

    Help?

  15. Talking Shotgun Says:

    @Jorbes
    It looks like you are missing .NET 3.5 Service Pack 1.

  16. Gaspare Says:

    Other thing, before trying to connect or create a server, you must load game definition and card sets. You can find them both on filebeam.com (search for octgn2).

  17. Jorbes Says:

    Ah, so the .net framework 3.5 installer and the 3.5 sp1 installer both have the same filename… thats microsoft for ya…

    Trying again,t hanks

  18. Jorbes Says:

    New bug

    System.Windows.Markup.XamlParseException: Cannot create instance of ‘GameSelector’ defined in assembly ‘OCTGN, Version=0.2.0.1, Culture=neutral, PublicKeyToken=null’. Exception has been thrown by the target of an invocation. Error at object ‘System.Windows.Controls.Grid’ in markup file ‘OCTGN;component/launcher/join.xaml’. —> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> Db4objects.Db4o.DatabaseFileLockedException: D:\octgn\Games\[OCTGN2]Magic-v0[1].0.1\[OCTGN2]Magic-v0[1].0.1.yap —> System.IO.IOException: The process cannot access the file ‘D:\octgn\Games\[OCTGN2]Magic-v0[1].0.1\[OCTGN2]Magic-v0[1].0.1.yap’ because it is being used by another process.
    [stack trace snipped by jods]
    at Octgn.OctgnApp.Main()

  19. jods Says:

    For those getting the “Stopped working” dialog box with an error inside XamlParse: it seems you get this when you have .NET 3.5 missing the service pack. Take care there are lots of versions and service packs. You need .NET 3.5 SP1. I should look into this to find if there’s a way to report a nicer error. Because this error report is just NOT nice.

    @Gaspare: You don’t need to precise that a game has to be installed anymore. The updated files don’t raise an error anymore if you try to start without selecting a game. (They just do nothing).

    @Jorbes: This bug means the database file is locked and can’t be opened. There are a few problems with the Game Manager component. Maybe you ran into one of those. Restarting the app (or at worse restarting Windows) should solve your problem.

    Thanks for the other bugs (e.g. Say no to mulligan) I will investigate asap. We definitively need a bug tracker, unfortunately we have none at the moment, so just report the important issues here and please wait for the other ones.

    @Talking Shotgun: I already have given many hints to several people regarding game and sets creation. Hopefully this will be published on the web soon to reach a broader audience. As I wrote, in the meantime people interested in creating games should contact me by mail, saying which game they plan to create. Just write to dev[REMOVE THIS]@octgn.net

  20. Amnesiasoft Says:

    As a note, if you try drawing cards before the deck finishes shuffling, you’ll cause a crash.

  21. Talking Shotgun Says:

    A few things that I have noticed causing crashes… I’m not sure if you want them posted in here, but I don’t know what else to do with them, sorry if something has been said about them before. This was all tried with Magic 10th Edition.

    1. Dragging a counter onto a card in the hand, deck, seemingly anywhere that isn’t on the table.
    2. Mulligans
    3. Double clicking in the All Markers box.
    4. Double clicking in the Recently Used Markers box.

    There are things that are off when playing with the Magic 10th Edition, but they don’t cause crashes, so I assume that’s left for beta. I also don’t know if they would be problems in OCTGN or the Magic definition.

  22. Jorbes Says:

    Can i run two+ instances of OCTGN?

    I only get that error of mine when I try to do some testing by connecting to my own games with multiple clients.

    It needs to be possible if you like to have some proper testing done.

    And the database should not be locked anyway, just open, read and close, keep the data in RAM (people have more than 3kb of ram nowaday, so should be fine)
    Any writes can be done the same way. This way another client wont CRASH when trying to read the database.

    Good luck!

  23. Kempeth Says:

    I’ve made another game module and installed it successfully. When I click on start game though the program crashes:
    System.Windows.Markup.XamlParseException: Cannot create instance of ‘GameSelector’ defined in assembly ‘OCTGN, Version=0.2.0.1, Culture=neutral, PublicKeyToken=null’. Ein Aufrufziel hat einen Ausnahmefehler verursacht. Error at object ‘System.Windows.Controls.Grid’ in markup file ‘OCTGN;component/launcher/serve.xaml’. —> System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. —> System.Net.WebException: Requested PackagePart not found in target resource.
    bei System.IO.Packaging.PackWebResponse.GetResponseStream()
    bei System.IO.Packaging.PackWebResponse.get_ContentType()
    bei System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle)
    [stack trace snipped by jods]
    bei Octgn.OctgnApp.Main()

    I cannot see any reason why my second module would not work when my first one is. the second is module is much simpler…

  24. Indy Says:

    I was able to make a new game & set file. Aside from not quite having the right card actions defined, it works great. Once there is a wiki or somewhere that we can begin public documentation I’ll post a thorough walkthrough. But for now I’ll just share some of the areas where I got “stuck”.

    Initially I didn’t understand what constituted a valid card ID, so I just used easy names that I would remember. Turns out that card IDs must be GUIDs, and to generate these I used an online GUID generator (Google for “GUID Generator” and you’ll find many options).

    In the sets file (.o2s), in the .rels file that contains all the cards in the set (i.e. Tenth_Edition.xml.rels) you have to do some special formatting to the GUIDs. For example, a standard GUID looks like this:

    2b140d82-4b1a-41ed-bad9-97dcbabcdf54

    This is the format for the card ID that you use in the XML file where you assign attributes to each card (i.e. Tenth_Edition.xml). In the .rels file however, you have to tweak this format to remove all the hyphens and add an upper-case “C” to the beginning of the ID:

    C2b140d824b1a41edbad997dcbabcdf54

    And in the deck files (.o8d) you need to use the first format for the GUIDs to identify which cards are in the deck.

    This was pretty time consuming to do without an editor to help generate GUIDs and put all the pieces together. But, once I figured out where all the problems were it worked quite well. I’m not a C# developer (VB.NET), but I’ve considered creating a simple little app outside O2 to help build these game, set, and deck files. It wouldn’t need to be super slick like O2, but it would be much easier to create these with an editor.

    I can’t wait to learn more about the protocol and syntax that is available in the game file. I need to do a few simple things (like add menu options to control 0, 90, 180 and 270 degree orientation), but I can’t figure it out from the examples in the MtG file. Hopefully some more info about this will get leaked soon.

  25. jods Says:

    @Jorbes:
    You can run two instances side by side, provided you install OCTGN twice. Use 127.0.0.1 for your IP.
    Having to install twice is a big limitation (bug?) in the database currently used by OCTGN, which locks the db file even when in read-only.
    Being able to run twice from the same install is definitively on my wish-list. The current DB has several limitations I don’t like, so I am going to change quite soon anyway.

    Keeping the whole DB in memory doesn’t feel quite right. On a system with 512Mo, 25Mo is roughly 5%, I think we can put that to better use… Moreover the load time will take a hit. And I don’t see what the advantage would be (once I sort out the lock problems).

    @Kempeth: one of your relationship inside your game definition is wrong (the file isn’t found inside the archive. Given by the point at which the error happens, I would make a wild guess and say it’s your game card back image, which isn’t found.

    @Indy: Thanks! That’s the spirit and it will help the community a lot. I unfortunately haven’t had time to write complete documentation yet, so you are welcome filling the blanks. We definitively should try to set up a wiki as soon as possible. A few comments on your comments:

    Indeed the card images use modified relationship ids. I’m sorry about that because it’s clumsy but OPC forbids dashes inside ids, and they can’t start with a digit (so I’ve added a constant C, like ‘Card’).

    Regarding the deck files, I said it previously but again: If you spell the card name correctly you don’t have to provide the ID. This may make it easier for you.

    Anyone providing some tools (even rough ones) is welcome since it will help the community. I would like to create tools, but I have so much work to do on the client and can’t possibly do so at the moment. This is something where anyone with programming knowledge may want to help.

  26. Indy Says:

    FYI, I figured out how to control the orientation of a card. Here is the code I use to create menu items to turn a card to a specific side.

    There may be a more elegant way of doing this, but as far as I can tell the O2 engine only allows you to tap/untap, and flip/unflip. Using combinations of these allow you to predictably control the 360 degree orientation of a card. If it’s not already in there, it would be nice to be able to absolutely control the orientation (like ). Much less confusing than having to use the flip & tap to do it.

  27. jods Says:

    @Indy:
    <setrot90 orientation=”0″ /> and <setrot90 orientation=”90″ /> allow you to set the rotation to a specific angle, without changing the 180° component. I have a new build, which allows you to use
    <setrot180 orientation=”0|180″ /> (same but change the 180° component while preserving the 90 component)
    <setrot orientation=”0|90|180|270″ /> (same but sets both without preserving anything)
    You will be able to use those next time I publish an update.

    You can also switch each component with:
    <togglerot90 /> and <tooglerot180 />

  28. Jorbes Says:

    Jods…

    Press Ctrl+Alt+Del…

    Go to windows task manager and check out the processes with either IE or FFox running..

    See that? Now you can savely dump the database in memory and sleep well at night.

    Heck, even the normal “explorer.exe” uses more than 30MB ram…

    It’s really O… K…

  29. jods Says:

    You know what? I hate FireFox’ big memory usage.

    Anyway, I’m not really worried about memory usage. But if I have the choice, all other things equal, I prefer less. What worries me a bit more is the impact on load times.

    But do not worry: if this is useful anyhow I will load the entire DB in memory.

  30. Chris Says:

    same problem as Superman, happened when I tried to install cards

    System.NullReferenceException: Object reference not set to an instance of an object.
    at Octgn.Launcher.GameManager.InstallCards(Object sender, RoutedEventArgs e)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    [Stack trace snipped by jods]

  31. Chris Says:

    Got this when I was trying to view Options, Preferences, and About inside a game:

    System.Windows.Markup.XamlParseException: Cannot find resource named ‘{PanelHyperlink}’. Resource names are case sensitive. Error at object ‘System.Windows.Documents.Hyperlink’ in markup file ‘OCTGN;component/aboutwindow.xaml’.
    [Stack trace snipped by jods]

  32. Chris Says:

    OK,

    Sorry to crowd the comments with those. Where can I go with those in the future?

    FYI, I’ve been following this project for awhile and I gotta say thanks man, you are awesome. It looks and feels beautiful.

    Chris

  33. jods Says:

    Chris:
    We are trying to set up a good bug tracking system to report all those. In the meantime, please just post the blocking issues.

    Your 1st issue is the different than superman’s. As I said, the game manager is still rough… Here’s a wild guess: did you install the game definition before trying to install a set of cards? Is the set you wanted to install known working by other users, or is it something you put together?

    Not sure about the second bug, I should check that… Last time I tried the about box was working but it seems I have removed one visual style or something…

    Thanks for the feedback.

  34. Chris Says:

    I did install the game definition before the cards. I got the game definition and cards from file beam. FYI, the cards installed correctly on the second try. I’ll test it out more later on.

    Chris

  35. Wilhelm Says:

    I have .NET 3.5 SP1 (even says SP1 in the Programs list), and I’m getting fatal error when I try to start the program.

  36. jods Says:

    Do you have any additional details about the error?
    Or anything that might be special about your computer?
    If you have edited the octgn.exe.config file, are you sure you didn’t introduce any mistake?

    That’s really random thoughts, since I can’t help much without any detail on the error.

  37. Wilhelm Says:

    Using Windows Vista Ultimate (also had the issue a week or so ago when before I upgraded from Vista Home Premium). Didn’t edit the config file.

    I run the .exe, and the error reporter for Vista reports that it crashed and it was looking for a fix, which it can’t find.

    Do I need a game set for it to work, maybe?

  38. jods Says:

    No Wilhelm, you have to start the client to install any game set…

    Can you provide the details inside the error reporter? It may help me…

    Other idea (and maybe other Vista users can chime in here): is it a security problem? Have you tried running the application in administrator mode?

  39. Wilhelm Says:

    That’s the technical description of the error. And running as an Admin causes the same error.

  40. jods Says:

    @Wilhelm:
    There aren’t much technical details in that window… I think there should be more somewhere else… It’s extremely strange that you can’t start the client at all. The only known reason so far (and which reports the same “XamlParse” error) is when you don’t have .NET 3.5 SP1 installed (are you 100% sure you have it, you aren’t confusing with having .NET 3.0 SP1 and .NET 3.5 together? I have to say recent .NET release have been a little confusing with the version numbers.)

    Are you running with a culture different than English?

    I see you have Visual Studio 2008 on your computer. If you put this file:
    http://www.octgn.net/octgn-client/OCTGN.pdb
    inside your installation folder and click “Yes” to debug with VS 2008 you should be able to have more details on the error.

    If nothing works you can still download the project from sourceforge and try to run and debug it locally… But I hope we can find a solution without coming to such ends.

    BTW, can you send me a screenshot of your “About…” dialog in Visual Studio? Send it to dev[REMOVE THIS]@octgn.net

  41. Wilhelm Says:

    XamlParseException was unhanded.

    Cannot convert the value in attribute ‘Property’ to object of type ‘System.Windows.DependencyProperty’. Error at object ‘System.Windows.Setter’ in markup file ‘Resources/Themes/BlueGlass/Panel.xaml’.

    I am using English, and here’s a screen capture from the list of programs showing NET 3.5 SP1 being installed.

  42. roblethal Says:

    Hey jods, I recommend future blog entries be locked for comments, and those comments be directed on the forum, or even better, blog updates on the forum? IDK, blog publishing may be easier, but going through comments & topics would be easier via the forum.

  43. herbig Says:

    I’m not sure if it’s possible with the .NET requirement, but has anyone gotten this to work in Linux (WINE)? And are there any plans for a Linux version?

  44. jods Says:

    @herbig:
    Although there are cross-platform implementations of .NET, none that I know of is supporting WPF yet (not even planning to). While this may change in the (distant) future, it means that currently O2 can only run natively on a Windows machine.

    BUT I know that Fork has been able to run O2 in some kind of emulator on Linux. It is not as smooth and fast as the native one, but it was very playable, from what I understood. This is NOT supported at all, but if it works, all the best. Maybe Fork can provide more details about the software (and configuration?) used.

    I suggest that if you have success running O2 on Linux, you shall post some directions about it in the main forums on octgn.net, I’m sure it will interest other people.

    I can also say that a colleague of mine has successfully been running WPF apps on a Mac using Parallells. The result was very decent, too. I haven’t tried O2, though, but I suppose there’s a good chance it works as well.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: