Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: Loulou 54 on July 02, 2012, 05:03:10 pm

Title: [Contest] Siam
Post by: Loulou 54 on July 02, 2012, 05:03:10 pm
Hello !

I will finally enter the contest if I have time enough to finish my game. :)

Siam is a board game, in the spirit of chess or checkers. (but very different, actually ! ^^)

(http://www.espritjeu.com/components/com_virtuemart/shop_image/product/Siam_plateau.jpg)

It is a 2 player game : elephant VS rhino. You play on a board of 5*5 squares and each player have 5 pieces.
At the beginning there are only 3 rocs in the middle of the board. The goal is to push one of the rocs out of the board.
There are specific power relations between the pieces :
(indeed, an animal (elephant or rhino) can push only in its direction. So the direction of pieces is very important.)
* an animal can push only one roc.
* two animals in the same direction add their force. (they can push 2 rocs for example)
* two animals face to face can't move. It cancels.
For more informations, see the rules :
http://regle.jeuxsoc.fr/siam__rg.pdf

This topic was the first lap of the TI-Concours 2012 in the TI 68k categorize.
I hadn't time enough to programm an AI, though, but the game works pretty well and is very nice to play with a friend ! :)
Here's a screen :
(http://tiplanet.org/modules/archives/captures/1334240879Siam%20~%20capture.gif)

So, this contest is a good pretext to think about such an AI ! ;) I have already made several tests and had some results.. But it won't be feasible on TI 68k as I do, because it would take too much time in calculations..
On Nspire, it is different obviously !

I already have to adapt the TI 68k version to a Nspire one, and it's not easy.. :/
I tried first with Lua, but there are some complications, if I want to use the Basic code..
So I want to make it entirely in Basic !
- A Basic game ? On Nspire ? Even today with C/ASM and Lua possibilities ? U mad ?? :P

Yes ! I will use the geometry application for some graphics...
Moreover, I can thereby enter the Nspire Basic categorize ! ;)

EDIT : (http://www.omnimaga.org/index.php?action=dlattach;topic=13915.0;attach=13138;image)
Title: Re: [Contest] Siam
Post by: jwalker on July 02, 2012, 07:17:00 pm
Very cool, I havnt seen any Nspire basic games released for a long time, that have graphics anyway.
Title: Re: [Contest] Siam
Post by: cyanophycean314 on July 02, 2012, 07:18:17 pm
Does sound crazy, but hopefully you can make it a great game.  :)
Title: Re: [Contest] Siam
Post by: blue_bear_94 on July 02, 2012, 09:25:33 pm
The Nspire's TI-Basic is too limited. Come on... it doesn't even have Input. Also there is no 68k section in the contest. Good luck!
Title: Re: [Contest] Siam
Post by: TIfanx1999 on July 03, 2012, 01:40:45 am
I too am under the impression that nSpire BASIC is to slow and limited for such applications. However, my information only comes from what others have said, as I have never used it myself. Personally I think this would be a great Lua project. If you are able to pull it off in nSpire BASIC though, you have my respect. 8) Good luck whatever route you decide to take!
Title: Re: [Contest] Siam
Post by: Adriweb on July 03, 2012, 05:12:08 am
The Nspire's TI-Basic is too limited. Come on... it doesn't even have Input. Also there is no 68k section in the contest. Good luck!
Did you forget Request ? (and RequestStr ?)
But yes, it's limited anyway and that's why Lua's there :)
Title: Re: [Contest] Siam
Post by: Loulou 54 on July 03, 2012, 06:36:03 am
Thanks :)

Yes, fortunately there are Request/Text functions..
But no "Pause" function and the worse : no GetKey() function ! :/ (And don't talk about graphic functions..)

But I have found a way to make the game play not too bad.. ^^

Am I allowed to share some screens before the end of the contest ?
Title: Re: [Contest] Siam
Post by: aeTIos on July 03, 2012, 07:02:23 am
yes just no executables and/or source code.
Title: Re: [Contest] Siam
Post by: Loulou 54 on July 04, 2012, 06:23:02 pm
I have finished the adaptation of the game so it is already playable. :)

Now let's think about the AI !  :thumbsup:
Actually I've already done a big part today ! But this is pretty hard, and it's not finished yet..  :-X

Here is a screen of what I have managed to do with the geometry application !  :thumbsup:
Title: Re: [Contest] Siam
Post by: TIfanx1999 on July 04, 2012, 09:01:59 pm
Wow, that looks pretty impressive Loulou! Nice work! :D
Title: Re: [Contest] Siam
Post by: Loulou 54 on July 08, 2012, 09:18:47 am
I've managed to finish in time ! :)

AI works well even if some improvements remain, as always.. ;)
Title: Re: [Contest] Siam
Post by: Jim Bauwens on July 08, 2012, 01:31:24 pm
That looks great for a basic game !
Title: Re: [Contest] Siam
Post by: shmibs on July 08, 2012, 09:12:34 pm
this does look rather impressive =D
i've never seen such a graphically-intensive game in nSpire basic. did they update what you could do in basic since the original?