🎮 WDC #17 Tic Tac Toe: The Next Generation

We have this game at home and love it. It’ll be interesting to think of a way to implement it digitally.

4 Likes

To make a game like this well, we really need some Canvas improvements. For one, the ability to detect a mouse up event on a sprite would allow the user to drag and drop a game piece and then we could code snap-to-grid to set the piece where it needs to go.

3 Likes

Couldn’t you use this?

2 Likes

I thought I’d tried that a while ago but you’re right, that does detect a mouse up. Thanks!

I don’t think I can use the Canvas even with that block available.

Sprite positions are inconsistent:

1 Like

I think the sprites use the mid point rather than the top left corner, right?

I think I’d use (lots of) buttons for this, simply because the last Tic Tac Toe game I built used 9 buttons.

I guess I’d ask you that! :laughing:

The documentation I’ve read says that it’s the top-left corner. @jane said she would put in a request to change it to the center of the sprite.

But my findings here are really strange. Regardless of whether the x,y position is top-left or center, I’m seeing inconsistencies that prevent me from using the Canvas.

That’s the way I’m heading, too… I just think a drag-and-drop game using the Canvas would be so much more satisfying.

3 Likes

@domhnallohanlon, could you give me the link too?

4 Likes

@human it seems like the rules might be a little more nuanced then the original animation I shared, but feel free to start simple and add additional complexity as you go:

5 Likes

Oh, interesting!

2 Likes

Here is my (pre - entry )

https://thunkable.site/w/aimEH84iX

1 Like

This is what I get.

Fixed…
Still working…dont understand now why it runs away

https://x.thunkable.com/copy/39fce0567e18e40ef66c7540d3ba9a0d

This is what I see when I preview it in a browser:

image

The game seems to work… I can add Os and Xs. Is it just tic-tac-toe or did you code it like Gobblet?

This challenge was a little too complex for me to complete over a weekend but I may revisit it another time. Keep these WDCs coming… so much fun to see everyone’s projects! :slight_smile:

1 Like

It is just tic tac toe but a little advanced with chat and all

1 Like

Hi All,

Tried making the very basic version of Goblet Tic tac toe-

https://x.thunkable.com/copy/c4e66dbbbae86d2d961ce6ab20a2919e

This is a very basic version, so some bugs may stay, but the main version works… (i suppose). (This is the first time i heard of this version of tic tac toe…not sure if i understood all the rules correctly :sweat_smile:)

So this game has 2 players - 1 Green, the other Red
The bigger pieces can ‘eat up’ the smaller pieces and Red ones can capture Green and vice versa (if they are bigger).
One exception in the game rule is that - The player cannot move the piece what he has already played on the board to somewhere else on the board.
Once a piece is selected, the user has to play it, else he will not be able to use that piece again.

Could you guys give this a try?
Please forgive me if this app takes a bit of time to load… i guess there are ways to shorten up the code.

4 Likes

Looks pretty good! I’m not quite clear on your version… Gobblet usually has 3 piece sizes: small, medium and large. For each player, you have pieces numbered 1 to 6. How do these relate to the piece sizes? I was able to play a 6 on top of a 5… I assumed that wasn’t a legal move.

(Novice here)
Thanku for trying it out!!

Umm…so i followed the game shown in this video-

So basically, each player has 6 pieces from smallest piece to biggest.
G1 is smallest and g6 is the largest ( as I tried to visually show with the size of buttons :sweat_smile:)

The larger pieces can eat up the smaller pieces.
One exception in the game rule is that - The player cannot move the piece what he has already played on the board to somewhere else on the board.
Once a piece is selected, the user has to play it, else he will not be able to use that piece again.

Hope this helps…!

Yes but the pieces each player has are:

small, small, medium, medium, large, large

So I would expect something like:

1 1 2 2 3 3

instead of

1 2 3 4 5 6

I actually have this game at home. :grinning_face_with_smiling_eyes:

image

1 Like