May 23, 2021
Simple Sudoku – Captivate Game and Puzzle Series
Comments
(14)
May 23, 2021
Simple Sudoku – Captivate Game and Puzzle Series
I am currently a provider of technical training and support in the electronic manufacturing industry. My prior training and work experience as a teacher, network administrator, web design, and instructional design make me well prepared to design it, develop it, and deliver it. I am a father of five, a US Army veteran, and I enjoy playing the guitar as well as performing in local community theater. 
Legend 99 posts
Followers: 155 people
(14)

In this post, I offer up a simple sudoku puzzle. Simple just means that there is only one puzzle at this time and there are no special controls that may be found in other sudoku puzzle games.

Not sure how to play? All you have to do is make sure that every 3×3 block, 9-square row, and 9-square column contain the numbers 1 through 9 once and only once. Select the number on the right and then select the box you would like the number to appear in. Your active number will appear in the box you clicked on. Some numbers have been filled in for you but only the empty boxes at the beginning of the round will accept entries.
Check the status of the puzzle by clicking the check button and reset all the tiles to repeat the puzzle.

Enjoy – and please let me know if you discover any bugs.

Preview Project

<—— Game and Puzzle Series

14 Comments
2021-08-17 08:31:51
2021-08-17 08:31:51

Hi Greg,

Neat game! I’m trying to create something similar but got stuck at the logic part. Would you kindly show me the ropes? Thanks a bunch!

Like
(4)
>
Sky5EAE
's comment
2021-08-18 12:08:51
2021-08-18 12:08:51
>
Sky5EAE
's comment

Thank you.

As with any project like this – there are often multiple ways to arrive at the same result.
Since the question is somewhat broad, I am afraid my answer will also be somewhat broad.
Perhaps it will be enough to get you started.

I chose to compare two arrays.

The first array holds the initial game board and the second array holds the solution.

Each of the 81 boxes of the game board is a multi-state object. Selecting the number on the side sets a variable which is used to change the state of the chosen box to match the selected number. Each box on the game board, when clicked, will also set the selected value to the corresponding position in the first array.

When the check button is pressed – the modified game board array is compared to the solution array. For every index match in the two arrays, a point is awarded to a variable tracking the number of matches. If that value equals 81 – you win.

Hopefully that makes some sense.

Like
(1)
>
Greg Stager
's comment
2021-08-25 02:30:31
2021-08-25 02:30:31
>
Greg Stager
's comment

Thank you for the reply. I appreciate it I’m still an amateur when it comes to Captivate.

I currently have the skeleton up. I’m actually thinking of doing a drag and drop interactive, however, I can’t seem to have the buttons on the side (drag source) to be infinite for unlimited dragging.

You mentioned the comparing of two arrays. I assume this is Javascript related? If so, I’m wondering if there are other ways to do this?

Like
>
Sky5EAE
's comment
2021-08-26 13:02:26
2021-08-26 13:02:26
>
Sky5EAE
's comment

Yes – this project makes extensive use of JavaScript to do the heavy lifting.

For a drag and drop style version, you would likely need at least as many draggables of each number as there are spaces left to fill in the puzzle for each number but no more than 9 – of course. Also be careful of the spacing between boxes so that there isn’t any overlap. That could cause problems.

I suppose you might accomplish a similar end using advanced actions but I think it would be a bit tedious creating all of the action statements. You may also need way more variables for tracking without an array.

One example to that point…
I use a for loop to check all 81 boxes for the correct number entry and to perform some other conditional tasks.
(Check entry vs answer, if correct display the green highlight and increment variable, if incorrect display the red highlight, when complete, if the variable is equal to 81 – you win, else you lose so display that accordingly, finally after three seconds, remove the highlighting from all boxes.)

This is 26 lines of code whereas building that in an advanced action might be hard to keep track of. You do have the WHILE option in your advanced action dropdown so maybe that could be taken advantage of but I honestly cannot speak to the reliability of that for a case like this.

Like
>
Greg Stager
's comment
2021-08-27 01:27:12
2021-08-27 01:27:12
>
Greg Stager
's comment

Thank you for the prompt response!

That was the same conclusion I had in mind initially. Hence I had to seek advice from others.
For now, I would probably be creating 9 boxes for each number ranging from 1-9 and see how it goes.

If I do have more time, I would probably go read up more on Javascript for Captivate seeing as it helps open up more possibility.

Once again, thank you for your reply. It was an interesting read!

Like
2021-05-24 07:32:17
2021-05-24 07:32:17
Like
(1)
>
Greg Stager
's comment
2021-05-24 08:22:58
2021-05-24 08:22:58
>
Greg Stager
's comment

It appears to be working now.

Thanks everyone!

Like
2021-05-24 07:19:43
2021-05-24 07:19:43

The game worked just fine while it was in pending mode but it appears broken for me as well now that it has been approved.

Like
2021-05-24 07:09:31
2021-05-24 07:09:31

Hi Greg,

I wanted to check out your game, but on clicking the triangle button I just get a new browser window with this error message: “This XML file does not appear to have any style information associated with it.”, and some error code. Seems to be the same issue that I run into myself when trying to include a demo into a blog post here recently (described here: https://elearning.adobe.com/2021/05/inserting-captivate-projects-as-a-working-demo-to-posts-on-this-community/).

Did you check yourself, and does your game open for you ok? Maybe it’s just my receiving end, though I can launch other launch other projects posted here just fine.

Like
(5)
>
Gaanf
's comment
2021-05-24 07:24:39
2021-05-24 07:24:39
>
Gaanf
's comment

My error message appears different.

NoSuchKeyThe specified key does not exist./index.htmlGKKSETG11S2BNWYPaategTtQWOWON1vrSmMgzx5lExt56DX38tEzpFbB3+R/RGRSfOfjZeun7wfdIR6o057vt3OhpLY=

Like
>
Greg Stager
's comment
2021-05-24 07:29:55
2021-05-24 07:29:55
>
Greg Stager
's comment

Odd! This whole Community platform seems to be kind of falling apart with all those issues popping up lately…

With my own project I got the error I described in Pending status already by the way.

Like
>
Gaanf
's comment
2021-05-24 08:24:31
2021-05-24 08:24:31
>
Gaanf
's comment

We’ve got the blue triangle working. At least it does for me – can you test on your end as well?

Like
>
Gaanf
's comment
2021-05-24 08:24:40
2021-05-24 08:24:40
>
Gaanf
's comment

The preview link seems to be working fine for me. Can you try again now?

Like
>
Ishan Mukherjee
's comment
2021-05-24 08:26:28
2021-05-24 08:26:28
>
Ishan Mukherjee
's comment

Yep, works for me as well now.

Like
Add Comment