Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Ludi Game in the making C# .net2.0

  1. #1
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default Ludi Game in the making C# .net2.0

    If you run the app, you will see a ludi board with 4 A.I. players

    This code controls them
    Code:
                    //move what was rolled
                    if ((dicevals[0] == 6) || (dicevals[1] == 6))
                    {
                        //If unborn piecses, born them
    
                        if (players[turn].HasUnborn())
                        {
                            //born piece(s)
                            players[turn].BornFirstUnbornPiece();
                        }
                        else
                        {
                             //else just move
                            players[turn].BeginMovePieceAtBack(dicevals[0]);
                        }
    
                        //Roll again
                        turn--;
                    }
                    else
                    {
                        //move last piece
                        if (players[turn].HasBorn())
                            players[turn].BeginMovePieceAtBack(dicevals[0]);//(diceval, 0);
                    }
    
                    turn++;
                    if (turn == nPlayers)
                        turn = 0;
    The first dice is used alone, as the code above suggests. Dices are displayed as numbers in top left.

    Bugs.
    -first two dispays are ignored
    -Program crashes when a peice reaches the end.

    If someone wants to suggest an AI pattern then they are welcome
    Just use straight psedo code
    You can even make up new player functions eg Player.CanMove(int space), bool Player.KillsOtherPlayer(int space), and so on

    Here is the app
    http://www.megaupload.com/?d=FBGB3NPZ

    Thanks
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

  2. #2
    Join Date
    Nov 2004
    Posts
    5,192
    Rep Power
    25

    Default

    This looks like it will be interesting. I'll ask some friends I know who do programming to jump on.
    Knowing the solution doesn't mean knowing the method. Yet answering correctly and regurgitation are considered "learning" and "knowledge".

  3. #3
    Join Date
    Oct 2005
    Posts
    751
    Rep Power
    19

    Default

    yo the game sell off although mi neva see nuh dice a through still, but its kool to kno that u guys develop a game and it a do a ting yuh kno, i dont kno nothing bout programming ao this lil thing is kool

  4. #4
    Join Date
    Jan 2009
    Posts
    2,404
    Rep Power
    0

    Default

    Game's looking good so far. But where's the full source code? Wouldn't mind tinkering with it myself... maybe I could even find those bugs. The AIs could have different personalities, like offensive play (attempts to destroy any pieces in front), defensive play (tries to born all pieces and move them close together), speed play (tries to finish with it's leading piece before focusing on the next), etc. Then to program so 1 to 4 persons can actually play. Even some of the official rules can be changed/added to/removed...

    EDIT: I think the dice values should be checked separately (and even sorted) - instead of ORing - so different choices can be made based on what was tossed. The values (along with all players' piece positions) could be passed to a selected AI routine for processing...
    Last edited by Skele Drew; Aug 15, 2009 at 09:18 PM.
    Rooted OnePlus 2 64GB Ed, Android 5.1.1 OxygenOS ; on teifin' AT&T's network; Rooted ASUS Transformer TF101 w/ dock, Android 5.1 KatKiss; Laptop: ASUS X550C, 2.0GHzx2, 8GB, 512GB SSD, Kubuntu 15.10;
    Facebook page: Skeleville Technology Solutions

  5. #5
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default

    Quote Originally Posted by khat17 View Post
    This looks like it will be interesting. I'll ask some friends I know who do programming to jump on.
    Thanks.

    Quote Originally Posted by mykel View Post
    yo the game sell off although mi neva see nuh dice a through still, but its kool to kno that u guys develop a game and it a do a ting yuh kno, i dont kno nothing bout programming ao this lil thing is kool
    Thanks. Dices use a randon int generating function and is fair and random. Animation can be added later.

    Quote Originally Posted by Skele Drew View Post
    Game's looking good so far. But where's the full source code? Wouldn't mind tinkering with it myself... maybe I could even find those bugs. The AIs could have different personalities, like offensive play (attempts to destroy any pieces in front), defensive play (tries to born all pieces and move them close together), speed play (tries to finish with it's leading piece before focusing on the next), etc. Then to program so 1 to 4 persons can actually play. Even some of the official rules can be changed/added to/removed...

    EDIT: I think the dice values should be checked separately (and even sorted) - instead of ORing - so different choices can be made based on what was tossed. The values (along with all players' piece positions) could be passed to a selected AI routine for processing...
    No full source will be available *publicly* due to me wanting to convert the code to web flash and for java phones if the game works out. I just want a small dedicated team of progammers that could prtticipate in the developement of the game.

    I will use those ideas about the AI that were detailed above. Would you assist. I think I could convert the graphics to a dll or something so the AI coded app would run with the dll in order to test AIs.

    I will also allow mods on the rules of play including "lock and stop" (some old gameplay where two peices had to be born first before you can cross the goal, this I was told. I will get the details) I was thinking about "locks with 2 pieces that can be broken by nother player"
    PS the baord can actually morph with a triangle in the center or pentagon, or any polygon, but I limit it 8 players and the program runs just the same.

    About the dice sorting, that is a good idea. Dices are curently placed in a List<int> and I have list.Sort() and list.Reverse() but the later are commented for 2 reasons
    1) simplicity - my demo uses only dice 1 only
    2)I do not want to steer anyone coding of the AI
    but I think you should try a thing, you seem to know well what you are doing
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

  6. #6
    Join Date
    Jan 2009
    Posts
    2,404
    Rep Power
    0

    Default

    Quote Originally Posted by crosswire View Post
    No full source will be available *publicly* due to me wanting to convert the code to web flash and for java phones if the game works out. I just want a small dedicated team of progammers that could prtticipate in the developement of the game.

    I will use those ideas about the AI that were detailed above. Would you assist. I think I could convert the graphics to a dll or something so the AI coded app would run with the dll in order to test AIs.

    I will also allow mods on the rules of play including "lock and stop" (some old gameplay where two peices had to be born first before you can cross the goal, this I was told. I will get the details) I was thinking about "locks with 2 pieces that can be broken by nother player"
    PS the baord can actually morph with a triangle in the center or pentagon, or any polygon, but I limit it 8 players and the program runs just the same.

    About the dice sorting, that is a good idea. Dices are curently placed in a List<int> and I have list.Sort() and list.Reverse() but the later are commented for 2 reasons
    1) simplicity - my demo uses only dice 1 only
    2)I do not want to steer anyone coding of the AI
    but I think you should try a thing, you seem to know well what you are doing
    I wouldn't mind being a part of the team. I'm primarily a functionality programmer, not much for the graphics stuff. I've got quite a few ideas floating around, though I think some would make the game too bloated (I tend to get easily infected by the feature creature)...

    I think these are the official rules.
    Last edited by Skele Drew; Aug 17, 2009 at 06:39 PM.
    Rooted OnePlus 2 64GB Ed, Android 5.1.1 OxygenOS ; on teifin' AT&T's network; Rooted ASUS Transformer TF101 w/ dock, Android 5.1 KatKiss; Laptop: ASUS X550C, 2.0GHzx2, 8GB, 512GB SSD, Kubuntu 15.10;
    Facebook page: Skeleville Technology Solutions

  7. #7
    Join Date
    Mar 2005
    Posts
    74
    Rep Power
    0

    Default

    It would be nice to have a Nice animated Gui, 3d
    Pinch, Leave an inch, Roll

    3602609
    http://www.anyweh.com

  8. #8
    Join Date
    Oct 2005
    Posts
    745
    Rep Power
    0

    Default

    You could even look into making the game playable over a network where the game is updated periodically to sync with the state in a database
    3.14159265358979323846264338327950288
    4197169399375105820974944592307816406
    28620899862803482534211706798 pi 101

  9. #9
    Join Date
    Apr 2003
    Posts
    13,270
    Rep Power
    35

    Default

    Unno hurry up wid di game nuh. Mi whaa play ludi. And I especially like di over network feature. Always wanted to play a game on my local network wid my family.
    "The best software is the one that fits your needs." - A_A

    Virus free since: date unknown
    Anti-virus free since: August 2008

  10. #10
    Join Date
    Jun 2008
    Posts
    1,959
    Rep Power
    0

    Default

    Who's developing this?
    LAPTOP:- Alienware M11x C2D @1.7GHz, SATA 300GB HDD, nVidia GT 335M 1GB (dis.), Intel GMA HD-64MB (int.), 2GB DDR3 RAM @1066MHz, 1.3MP webcam Running Windows7 64bit
    MOBILE DEVICE:- SGS3 T999 dual core Qualcom Snapdragon @1.5GHz, 2GB RAM, 16GB (int. SD), Adreno 225 GPU, 8MP pri. cam, 1.9MP ff running Stock:4.0.4 UVLH2 modem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •