Page 1 of 2

Onitama

Posted: Tue Jul 26, 2022 8:00 pm
by richmond62
Onitama is an abstract game:
-
ONT.jpg
-
It retails for anywhere between 25 - 35 Euros.

Of course people who do not want to spend that sort of money and have
a bit of imagination can make their own version:
-
V.jpg
-
The rules are fairly straightforward:
-
onitama_rule_EN_0920.jpg

Re: Onitama

Posted: Tue Jul 26, 2022 8:04 pm
by richmond62
So . . . to LiveCode:

So . . . to my Summer classes . . .

So . . . today I introduced this game to the boys and girls in the class and we played it and did
some sort of functional analysis of the game . . .

Those of the children who have Android phones and/or tablets installed the FREE

Onitama.apk package so they could play it and think about things on the bus on the way home.

https://m.apkpure.com/onitama-the-strat ... al.onitama

I gave them a stack like this:
-
SShot 2022-07-26 at 22.05.20.png
-
Where the board has started being constructed and the playing pieces are present.

Re: Onitama

Posted: Tue Jul 26, 2022 8:08 pm
by richmond62
Then I rambled on about custom properties a bit . . .

Pointed out that the computer would need to 'see' on which square of the board
a piece was placed . . .

Then sent them home . . .

Re: Onitama

Posted: Tue Jul 26, 2022 8:14 pm
by richmond62
Now, not wanting to look unduly stupid in front of the children tomorrow
I sat down to do my homework:
-
SShot 2022-07-26 at 22.11.17.png
-
SShot 2022-07-26 at 22.11.59.png
-
Obviously this is NOT the complete game.

What is present is the ability to move pieces any where one wants (no restrictions of moves
imposed by cards yet), the inability to put 2 of one's pieces on the same square, the ability
to capture an opponent's piece, and a RESET button.

Re: Onitama

Posted: Wed Jul 27, 2022 8:19 am
by richmond62
So, here's a wee stack to pump out position cards:
-
Screen Shot 2022-07-27 at 10.16.49 AM.png
-
Stack deleted as improved version uploaded below.

Re: Onitama

Posted: Wed Jul 27, 2022 10:13 am
by richmond62
Um . . .

Trying to mess around with custom properties
and wonder what is wrong with this:

Code: Select all

on mouseUp
   set the angle of img "K1" to 180
   if the P1 of img "K1" contains "L" then
      replace "L" with "R" in the P1 of img "K1"
      end if
end mouseUp

Re: Onitama

Posted: Wed Jul 27, 2022 10:25 am
by Klaus
Unfortunatly we cannot modify custom properties directly! :(
We need to store the value in a variable, modify that and set the modified CP back:

Code: Select all

on mouseUp
   set the angle of img "K1" to 180

   ## Also quotes for the name of a custom prop!
   put the "P1" of img "K1" into tP1
   if tP1 contains "L" then
      replace "L" with "R" in tP1
      set the "P1" of img "K1" to tP1
   end if
end mouseUp

Re: Onitama

Posted: Wed Jul 27, 2022 10:51 am
by richmond62
Screen Shot 2022-07-27 at 12.50.43 PM.png
Screen Shot 2022-07-27 at 12.50.43 PM.png (9.64 KiB) Viewed 5042 times
-
This is a better card generator as it places a small, black dot at the top of each card.

Each of the squares surrounding the central green one can be clicked to set it as red or white.

Then a card can be generated: they will be named, sequentially: Kq, K2, K3 and so on.
-
oCards.jpg

Re: Onitama

Posted: Wed Jul 27, 2022 11:19 am
by richmond62
Hmm . . .
-
cPropsR.jpg
-
We got 'off' on a long, complex and sweaty conversation about custom properties,
Onitama position cards, and, slightly oddly, Quadomino pieces today.
-
Screen Shot 2022-07-27 at 1.23.00 PM.png
-
All, good, clean fun. 8)
-
Quads.jpg
Quads.jpg (7.85 KiB) Viewed 5030 times

Re: Onitama

Posted: Wed Jul 27, 2022 2:07 pm
by richmond62
SShot 2022-07-27 at 16.09.10.png
-
After some discussion we concluded that each card will have to have between 2 and 4 custom properties,
and HOW those custom properties are interpreted will depend on the angle of the card:
-
SShot 2022-07-27 at 16.16.48.png
SShot 2022-07-27 at 16.16.48.png (10.27 KiB) Viewed 4999 times

Re: Onitama

Posted: Wed Jul 27, 2022 2:24 pm
by richmond62
SShot 2022-07-27 at 16.22.56.png

Re: Onitama

Posted: Wed Jul 27, 2022 2:35 pm
by richmond62
SShot 2022-07-27 at 16.34.09.png
-
Here's a far, far more useful card maker.

Re: Onitama

Posted: Wed Jul 27, 2022 3:54 pm
by richmond62
While I am aware that the vast majority of readers of these LiveCode Forums
make their bread and cheese in the "abstrusities" of 'serious' programming,
I have a continuing belief in:

1. The educational use of LiveCode to teach:

1.1. Programming concepts.

1.2. Abstract thinking.

1.3. Thinking laterally.

2. Taking something (a computer game, a computer program that does something other than
talk to other programs, a physical, abstract game) and getting an up-and-running, functional
model of that something as:

2.1. A way to learn computer programming.

2.2. Learn how to transfer skills.

2.3. Work out that 'fun' is not (and should not) something that consists of totally
mindless activity.

BUT, it should be emphasised, I am NOT first and foremost a programmer, I am first and foremost an educator
who believes:

3. Most people (children or adults) are NOT stimulated to think nearly as much as they should be.

Re: Onitama

Posted: Wed Jul 27, 2022 5:36 pm
by richmond62
Unfortunatly we cannot modify custom properties directly!
No, we cannot.

So, we will use the angle of a movement card to ascertain possible moves.

Re: Onitama

Posted: Wed Jul 27, 2022 5:38 pm
by richmond62
-
SShot 2022-07-27 at 19.43.31.jpg
-
SShot 2022-07-27 at 19.33.25.png
-
Having used my card maker stack to generate the standard
Onitama set of 16 cards along with custom properties
I have now got them tucked away on the stack so that 5 can be chosen at pseudo-random
and positioned for play.

The dot on each card serves as an indicator to us as to the card's angle.