TicTacToe plugin - release 2 (1 Viewer)

dman_lfc

Retired Team Member
  • Premium Supporter
  • July 28, 2004
    1,772
    30
    UK
    Home Country
    New Zealand New Zealand
    Boris,

    The MyTetris source code should help you.

    It's best to implement this using the Strings.xml translations.
    There is a thread where updated to these xml's are being sent to me.

    BTW - Looks great!!!

    DMAN
     

    Boris

    Portal Pro
    June 5, 2005
    69
    0
    France
    dman_lfc said:
    Boris,

    The MyTetris source code should help you.

    It's best to implement this using the Strings.xml translations.
    There is a thread where updated to these xml's are being sent to me.

    BTW - Looks great!!!

    DMAN

    Thanks.

    I know about the “GUILocalizeStrings.Get(#number)” and “GUIControl.SetControlLabel(#wid,#cid, text)”. I also know that if in the skin file, I put a number of a string; MediaPortal will automatically replace it with the good text. It is the way I put the button “New game” and the label “Score” (which came from the Tetris text). I’m also agreeing that it is the best way to do…
    The problem I see is that when I’ll do a release of a plugin, the strings.xml will not be ok for users. It will only be ok at the next release of MediaPortal after the integration of the patch I will submit via Sourceforge.
    One thing I could do is to check at starting if the strings I need are in the English/strings.xml, and if not, I put them automatically (I apply the patch by default if not already done). Is it a good idea to implement this?
    Last thing: how do I choose my number? Is there somewhere a process of reserving a range? I’m not really sure that it’s need a dedicated process… If it is not a problem, I’m taking the range 26xxx.
     

    dman_lfc

    Retired Team Member
  • Premium Supporter
  • July 28, 2004
    1,772
    30
    UK
    Home Country
    New Zealand New Zealand
    Yep 26xx looks good to me.
    Grab CVS and update the Strings.xml files accordingly and I'll re-commit them to CVS when done.

    Email them to me dman_lfc@hotmail.com and I'll update CVS.

    So those who use TicTacToe with CVS will have the files automatically.
    I would then have a language.zip file (containing updated strings.xml's) for non CVS users to use with your latest code.

    DMAN
     

    Boris

    Portal Pro
    June 5, 2005
    69
    0
    France
    dman_lfc said:
    Yep 26xx looks good to me.
    Grab CVS and update the Strings.xml files accordingly and I'll re-commit them to CVS when done.

    Email them to me dman_lfc@hotmail.com and I'll update CVS.

    So those who use TicTacToe with CVS will have the files automatically.
    I would then have a language.zip file (containing updated strings.xml's) for non CVS users to use with your latest code.

    DMAN
    Ok, seems good for me. I will do it later perhaps this week-end (not sure for the delay). Thanks a lot.
     

    Marcusb

    Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,995
    29
    Melbourne
    Hey Boris, thanks for a good and simple way to pass some time.

    I ahve a question about the intelligence of the game algorhythm though. Even on the advanced settings it is quite easy to beat if you go first and don't go in the middle square unil the second move.

    Using the number pad mappping it's:
    My move: 3
    MP: doesn't really matter
    My move: 5
    MP: has to choose 7
    My move: 6
    MP: can't win.

    I know this is a well known trick to win TTT so I guess the only way around it is if the game always selects the centre square for it's first move if the other player doesn't.

    Does this make sense? hope so :)
     

    Boris

    Portal Pro
    June 5, 2005
    69
    0
    France
    Marcusb said:
    Hey Boris, thanks for a good and simple way to pass some time.

    I ahve a question about the intelligence of the game algorhythm though. Even on the advanced settings it is quite easy to beat if you go first and don't go in the middle square unil the second move.

    Using the number pad mappping it's:
    My move: 3
    MP: doesn't really matter
    My move: 5
    MP: has to choose 7
    My move: 6
    MP: can't win.

    I know this is a well known trick to win TTT so I guess the only way around it is if the game always selects the centre square for it's first move if the other player doesn't.

    Does this make sense? hope so :)
    Nice you like it. Yes I know that it's easy to win that way. I'm programming a 4th lever named unbreakable :) (or something like this)
     

    Marcusb

    Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,995
    29
    Melbourne
    Cool, I'll look forward to the new level. Keep up the good work, there can never be too many plug ins :)

    (I promise I'll proof read my posts from now on too. That last one was embarrassing)
     

    pshdo

    Portal Pro
    February 5, 2005
    132
    0
    54
    Holbaek, Denmark
    Marcusb said:
    I have a question about the intelligence of the game algorhythm though. Even on the advanced settings it is quite easy to beat if you go first and don't go in the middle square unil the second move.

    Hi there....
    I have also played a little with the game and it works fine, (btw. nice touch with the sound from wargames.... :D ), and i found an other way to beat the advanced setting.....
    If i start, and take first eg. left top corner and then left bottom corner, then i can win at all time...... (Not nesseserry with these two corners but see what the machine do and then decide ware to have the 2´nd corner placed.....)

    (perhaps i can´t explain it right, but i hope you understand....)

    - Take 2 corners on the same site of the square, and you win...... :wink:
     

    user_99

    Portal Pro
    August 13, 2005
    78
    1
    Austria, Graz
    I've a new setup of MP and with this plugin I get an error:

    Black screen (file not found or missing) if I start the plugin in the main menu and that error log entry:

    Code:
    27.08.2005 21:09:47 Error initializing window:TicTacToe.PlugIn Method not found: Void MediaPortal.Profile.Xml..ctor(System.String, Boolean). TicTacToe    at TicTacToe.Work.Main.Init(Int32 PluginID, String SkinPath)
       at TicTacToe.PlugIn.Init()
       at MediaPortal.GUI.Library.PluginManager.LoadWindowPlugin(String strFile)

    Anything what I can do to get it running again?

    UPDATE: Read that I need 0.1.3.0 + CSV (05.08 >) to run the program
     

    Users who are viewing this thread

    Top Bottom