cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Mathcad Community Challenge Summer 2024: Game Gallery

DJNewman
17-Peridot

Mathcad Community Challenge Summer 2024: Game Gallery

This season’s Mathcad Community Challenge is an open-ended creative challenge: design and implement a game within PTC Mathcad Prime! I’ll be hosting this challenge.

 

Mathcad Community Challenge Summer 2024: Game GalleryMathcad Community Challenge Summer 2024: Game Gallery

 

For our purpose, a game is defined as an interactive, structured experience with an achievable goal that has a beginning state, then allows for user input that can advance the state as the user tackles a challenge or solvable problem, followed by an advanced (intermediate or ending) state.
As a good example, see my first reply to this challenge below.

This challenge will be quite lenient on what a game is and the production values you put into it, though you should test it and make sure it works as intended before submitting it.

 

Games take a long time to concept and execute, and for that reason, this challenge’s submission period will last until the end of September (September 30, 2024)! Expect the blog write-up on Mathcad.com to come out sometime in October. Your regularly scheduled engineering problem challenges will resume with the November challenge.

 

You don’t need to use PTC Mathcad Prime 10’s Advanced Controls to do this challenge, but they would greatly help. (It is possible to creatively make non-control workarounds depending on what you’re trying to do.) PTC hosted a training webcast on August 20 to help you learn how to use the controls; replay is available now. You should also take the initiative for yourself and try to learn them independently if you want to incorporate them.

 

Unique for this challenge, in addition to the blog write-up, I will record my “playthroughs” of each submission and publish them on the PTC Mathcad YouTube channel.


In addition to the existing Mathcad Community Challenge Guidelines, I’d like to stress not to submit anything that would violate others’ copyrights, trademarks, or intellectual property rights per the PTC Community’s Terms of Service. If you don’t want to try to make your own game concept from scratch, it’s considered fair use to take inspiration from games that have existed throughout human history and/or the market (or submitted in this challenge), but not using commercial brands. You're also free (and encouraged) to directly collaborate with one another on a project.

 

Have fun!

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
ACCEPTED SOLUTION

Accepted Solutions
DJNewman
17-Peridot
(To:DJNewman)

And now I can finally unfloat this post because the write-up blog is done: https://www.mathcad.com/en/blogs/community-challenge-game-gallery

 

...You can hopefully understand why it took so long. I go in-depth on all three games and the design decisions behind each, as well as life lessons...!

 

Spoiler
PTC also laid off my editor, which didn't help my turnaround time at all. And that probably is also why this is not only the longest article on mathcad.com by far, but probably the... uh... least hinged.
I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.

View solution in original post

22 REPLIES 22
DJNewman
17-Peridot
(To:DJNewman)

MOO, also known as Bulls and Cows, is a code-breaking game where you use deductive reasoning to decipher a code based on the feedback you get from your guesses. It’s now available and recreated on PTC Mathcad Prime.

 

The goal is to guess the correct four-digit hidden number, and its Mathcad Prime depiction does that by comparing your guesses with the hidden number and delivering feedback. Using a variety of scripted Advanced Controls, Mathcad Prime both takes in your guess inputs and delivers the feedback outputs.

 

Have fun by downloading the attached PTC Mathcad Prime 10 file.

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
Werner_E
25-Diamond I
(To:DJNewman)

Nice!

In your sheet you write that opening the protected area is considered cheating. You should also add that evaluating variables First is cheating too 😉

The advanced controls sure need an option to get protected from viewing their inputs and editing.

At the time being the only solution I could think of is the usage of an evaluating function placed in the protected area. But unfortunately it would have to be called in a separate region (maybe a second collapsed area) after the user input was done as it could not be called from within a scripted  control.

EDIT: But it may be possible to use the function call as input of a scripted control. That way we would not have to use an extra region. Haven't tried but I guess this should work.

 

I guess someone will get inspired and come up with a Mastermind or a Wordle variant. I am not sure but I think that quite some time back someone even posted a Wordle implementation here in the forum - can't remember if it was Mathcad or Prime. Given that at that time Prime had no scripted controls I suspect it was written in Mathcad.

EDIT: Found the thread. Was already Prime, but not the implementation of the game itself -> Wordle - PTC Community

 

DJNewman
17-Peridot
(To:Werner_E)

So you won't know the variables used unless you click on the controls and then look at their input variables, and by that point you should intuitively know you're a cheater.

Because Prime doesn't have area labels (hopefully it will one day), I thought that I'd put a note on what this protected area was so people don't think it's part of the game that they need to look into it.

 

I actually plan to develop another game before the submission deadline, and that will use very extensive use of protected areas, including putting controls in (sometimes expanded) protected areas. You can't globally define advanced controls, which would have been a big help for this use case and also Bulls and Cows and would help with the some of the cheating problems, which is why I came up with the workaround with pressing the confirmation buttons.

It's not a community challenge if you didn't have to come up with some fun workarounds. 😛

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
Werner_E
25-Diamond I
(To:DJNewman)

Ah yes! Putting the output text component in a not-collapsed protected area should solve the problem much easier!

Which we could put a button there, too, which could still be operated.

Whats really needed are true global variables and not global constants as we have now.

I tried to create a simple TicTacToe made out of 9 buttons, but I would need a method to make sure that the upper left button also gets the information when the lower left is pressed.

Only workaround I can think of is to let the buttons read from and write to a local file. But thats pretty inefficient and it not nice to create files (possibly without the user knowing ut), you my run into troubles when the sheet is on a write protected device and its not possible to clean up delete the file from within Prime.

The option to make the input in one place and show the game below it is not really convincing and satisfactory.

I fear that Prime is not (yet?) at a level where it could be used to create reasonably good and user-friendly games.

Some features missing for that sure would also be very handy at more serious worksheets.

DJNewman
17-Peridot
(To:Werner_E)

Here's another workaround that would work for tic-tac-toe specifically, but wouldn't work for something like Three Men's Morris.

 

Tic-tac-toe specifically can be laid out linearly and without iterating on the same board because you know there is a maximum of nine turns it can take. What you can do is have a definition for each of the nine spots on the board, and have the user input which spot they want their letter on. You have an output after each turn that visually represents the state of the board, for a total of nine outputs. That way it's also a satisfactory game experience because you're offering the player(s) a "game state history". So turn 1 the board has one letter, turn 2 is below that and will have two letters because you define each turn's choice individually and just have the player select which they want. Have some kind of check in place so players can't place their letter on an already-picked spot. I think radio buttons would be the best advanced control for this because you can have "add button" only add buttons for not-already-selected spots on the board.

I figured out from MOO that Mathcad is not good at iterating off stored knowledge, because Mathcad will overwrite what happened before every time you iterate. One of the things I wanted to do was have Mathcad spit out a table of your guess history and the bull/cow/nil feedback, but I couldn't get it to work. I think there IS a way for it to work, but it probably requires external files and/or using the API, and I wasn't prepared to put in the effort to learn how to do that. Instead I made it a "tip" for people to track that manually with a text region, which I don't think is a bad solution and it might even enrich the game experience by helping players better internalise their results and actually take proper notes of their deductions.

The point is that in game design, there are three ways to get through a hurdle. One is to figure it out; another is to do a workaround; and a third is to change the design of what you're doing to make the hurdle more of a moot point.

Mathcad Prime should be relatively good at games that you can represent linearly as opposed to iteratively because of its top-to-bottom nature. That still leaves plenty of reasonably good games that can be designed. If I didn't think so, I wouldn't open up this challenge... and for three months at that.

Edit: I'm not gonna make that tic-tac-toe game myself but I totally could. If someone else wants to then please feel free and I'd be happy to accept it in the gallery.

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
Werner_E
25-Diamond I
(To:DJNewman)

Thanks for the detailed answer.

What I had in mind when I was talking about TicTacToe was to arrange nine buttons scaled to squares which form the game board. The user could press a button and its initially empty display changes to the users symbol (X or O). Then the opponent (either human or a Prime algorithm) would make its draw. But all using the very same game board.

Doing the input in one place and seeing the result in another I consider not acceptable for a game of this type. Also having to press an extra button to go on with the next move is not user-friendly (that a drawback of the bulls and cows).

It may be possible to do the TicTacToe as outlined before using an external file (we can delete the file from within a JScript script at the end), but the buttons in Prime ever so often "blow up" when pressed (showing the + sign for their inputs or showing the left hand output side when clicked somewhere at their border) hard to make it small again so its a quite ugly experience and the game board is destroyed when this happens..

The aim must be for the program to be user-friendly and intuitive to use and not somehow cumbersome, because that's no fun.

The tedious operation of a program is perhaps accepted when it comes to a calculation sheet in the engineering field (you have no choice), but not in a game. And the improvements that would be necessary in Prime to make games work properly would be so desirable for serious applications as well.

DJNewman
17-Peridot
(To:DJNewman)


@DJNewman wrote:


Edit: I'm not gonna make that tic-tac-toe game myself but I totally could. If someone else wants to then please feel free and I'd be happy to accept it in the gallery.


Now I feel like I will make it myself since I keep thinking about it.

Still not stopping someone else from doing so.

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
DJNewman
17-Peridot
(To:DJNewman)

Soooo what happened to "I actually plan to develop another game before the submission deadline"?

Well, I would like to release it by tomorrow because the Advanced Controls Crash Course (airing tomorrow) will bring some people to this thread.
But I don't think I'll be able to do that because while I'm done developing the game (as of last night), I need to... take some time beta-testing it (and finding willing PTC employees willing to test it too). That's particularly important because the game I've made is an escape room, so while I know the logic behind all of the puzzles because I made them, if no one else could possibly figure it out, then all is lost.

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
DJNewman
17-Peridot
(To:DJNewman)

Two months left for the Game Gallery!

 

I made a gameplay video for MOO aka Bulls and Cows for the Mathcad YouTube channel. It's a long video because I play it twice (one for non-duplicate mode and one for duplicate mode).

 

Unlike my game, it should take less than a month to make gameplay videos for future non-mine entrants.

 

I'm excited to transform the Mathcad YouTube channel into a gaming channel.

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
DJNewman
17-Peridot
(To:DJNewman)

We're now two months into the challenge with one month left!

_______________________________________________________________

Let me reveal what I've been doing during those two months: an escape room made in PTC Mathcad Prime 10: Escape the Gem Tunnels.

A mysterious organisation has trapped you in a cave system with three tunnels; at the end of each tunnel (which are their own themed Mathcad worksheets; Ruby, Sapphire, and Emerald... I cannot stress this enough, you need to unzip the .zip to your computer and have all of the files in the same directory, since they link to one another with relative filepaths) is a password. You need to collect all three passwords to escape the cave system. Can you do it?
Escape the Gem Tunnels takes advantage of several intricacies of Mathcad Prime's document-centered approach and makes heavy use of Areas, especially password-protected areas, in conjunction with Advanced Controls.
The game will probably take you over half an hour to complete. Could take you far longer than that depending on how well your intuition or observational skills are working. There's an in-game timer.

Thanks to @pakhomova  for helping beta-test it with me from the important perspective of someone who is less-versed in Mathcad. There are several bits of help text throughout, and an optional Hints checkbox to activate further assistance.
Edit: Ah, something really important to note. Unlike, say, Bulls & Cows where the answer is random and different every time you play, Escape the Gem Tunnels has a predetermined set of answers / passwords, so please don't spoil it for others.

PTC Community does let you insert a spoiler tag; it's the triangle with an exclamation point. You need to "Expand toolbar" to access it.

Spoiler
I've never used it before, but here's a good chance to! 

Edit September 9: Attached a new .zip because I found out while recording the videos for the YouTube channel for this that I made some inconsistent typos. This fixes those.

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
DJNewman
17-Peridot
(To:DJNewman)

Escape the Gem Tunnels in three parts, played by Brandon of the PTC Education team. He's never used Mathcad before. Hopefully this'll inspire that team to do more with Mathcad in the future!
Note that each of these videos begins with a spoiler warning because they go through all of the puzzles and how to solve them, and once that's known, it's much less exciting to play the game for yourself afterward:


Sapphire Tunnel (and the game's beginning):

https://www.youtube.com/watch?v=peqykLxdXv8

 

Ruby Tunnel:
https://www.youtube.com/watch?v=FiSOqFtm5q8

 

Emerald Tunnel (and the game's ending):
https://www.youtube.com/watch?v=DodPbGAgjG4

(Emerald Tunnel is currently Unlisted on the channel but will be published on October 24.)

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
Download the attachment on this post to get the .zip file to play Escape the Gem Tunnels: https://community.ptc.com/t5/Mathcad/Mathcad-Community-Challenge-Summer-2024-Game-Gallery/m-p/969409/highlight/true#M213397 Watch Part 1, the introduction and the Sapphire Tunnel, for a lot more context to ...
Download the attachment on this post to get the .zip file to play Escape the Gem Tunnels: https://community.ptc.com/t5/Mathcad/Mathcad-Community-Challenge-Summer-2024-Game-Gallery/m-p/969409/highlight/true#M213397 If you want to play it, download and play the game before watching the video ...
Download the attachment on this post to get the .zip file to play Escape the Gem Tunnels: https://community.ptc.com/t5/Mathcad/Mathcad-Community-Challenge-Summer-2024-Game-Gallery/m-p/969409/highlight/true#M213397 Intro & Sapphire Tunnel (Part 1): https://www.youtube.com/watch?v=peqykLxdXv8 Ruby ...
StuartBruff
23-Emerald III
(To:DJNewman)

Oddly enough, I have an example of such a game, called Toads and Frogs.  Unfortunately, it was written for Mathcad 11..15  and uses the Picture Component, which Mathcad Prime 10 (still) hasn't got.   However, ISTR, it used other scripted components as well, which I am pleased to see have made it into Prime 10.   

 

It might be possible to convert it to MP10 using a text representation of the toads and frogs.  However, it was much more satisfying to use pictures of obscure anurids.  Again unfortunately, I'd have to write it from scratch as I no longer have a version of M11..M15 and the MP10 xmcd converter fails when I try to convert the .mcd/.xmcd worksheets to MP10 format.

 

If somebody could convert the attached .mcd file to pdf and post it, I'd be most grateful.

 

OTOH, the method I vaguely recall using might not work. I suspect that I used the Picture Component as the body of a function and passed the updated image to it, also returning the position of the mouse to show which toad/frog to move.  I used scripted components as the body of a function quite regularly, but it seems as if this is not possible with MP10?  Or is it?

 

2024 09 10 C.png

 

 

Stuart

 

PS.  The game was referenced in this thread re choosing an image to show in the Picture Operator:

 

https://community.ptc.com/t5/Mathcad/Showing-a-different-jpg-image-depending-on-a-result-MathCAD-15-0/m-p/790749

 

The F&T thread itself has been archived.

 

https://community.ptc.com/t5/PTC-Mathcad/Toads-and-Frogs/m-p/193572#M75890

Oh, sorry, I probably should've converted this earlier for you.

I don't have workarounds for the picture operator though.

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
DJNewman
17-Peridot
(To:DJNewman)

As I've foreshadowed, I've developed Noughts & Crosses, just to prove that one can do that in Mathcad Prime 10 and still have it be fun (as fun as the base game can be). I think "tic-tac-toe" is really bad game design because it's very unbalanced.
It's two-player. (I think you could probably make a Versus CPU mode, but I didn't want to.)

 

In no way is my method of implementing it (95 advanced controls in a worksheet) supposed to be seen as a Mathcad best practice.

Mathcad's status circle may be "yellow" for several seconds after making a move, but fortunately, it processes the first turns at the top before the stuff at the bottom, and that's the part that matters.

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
DJNewman
17-Peridot
(To:DJNewman)

https://www.youtube.com/watch?v=bZ1M-vh_F9o

Noughts & Crosses video. Features myself and Preeya Dave of PTC playing three games together, one for each outcome.

(Currently unlisted, will be public to the Mathcad channel in early November.)

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
The third and final game your channel manager created for the Mathcad Community Challenge Summer 2024: Game Gallery is Noughts & Crosses, known in other parts of the world as Tic-Tac-Toe, reproduced in PTC Mathcad Prime 10 with the power of Advanced Controls. Joining him in this two-player game is
DJNewman
17-Peridot
(To:DJNewman)

The calendar has told me that summer is over and autumn has started, but the challenge is still open for canon submissions for another week (and a day).

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
DJNewman
17-Peridot
(To:DJNewman)

I'm writing the blog for the three games, and I've also installed the just-released Mathcad Prime 10.0.1.0. Of course, I'm replaying my own games so I can write about them in fascinating detail.
However, none of the games were made in Prime 10.0.1.0 in mind. They couldn't; I just got access to it today. No in-dev builds for marketing this time.


I also don't know specifically what bugs were fixed yet because Update Advisor hasn't been updated yet because of problems across all PTC web properties that inconveniently happened today and will continue to tomorrow.

Noughts & Crosses works fine and maybe even faster. Alternatively, that's a placebo effect.

MOO is... different. Everything seems to be the same in terms of gameplay, except for the rules that restrict the SubmitYourAnswer Text Box. In 10.0.0.0, it would literally prevent any additional characters past the fourth character from appearing. In 10.0.1.0, you can put infinite characters, but when you click away, it'll only keep the first four. Same with putting, say, a letter in there. In 10.0.0.0 it would automatically revert the whole answer to 0000. In 10.0.1.0, you have to click away first. 10.0.0.0 will always put in four 0s to make sure that your answer is at least four characters if you try to delete one. 10.0.1.0, again, will insert them after clicking away.
The net gameplay outcome should still be the same.

Escape the Gem Tunnels is... a much bigger project to see how much it's impacted by the maintenance release, and for that I'll wait for Update Advisor's patch notes.

 

 

Update on October 9: Update Advisor is updated. One of the things fixed was "Unexpected immediate text box execution event in Mathcad Prime 10", which perfectly describes why the Text Box is different in MOO compared to the previous version. Apparently the behaviour that I thought was desirable and cool was an unexpected bug.

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
Werner_E
25-Diamond I
(To:DJNewman)

Is this 'Update Advisor' publicly accessible or only PTC internal?

EDIT: Forget it, I just found

https://support.ptc.com/appserver/cs/update_advisor/update_advisor.jsp

which seems to be what you were talking about. Not really user friendly and the information sure is not clearly arranged, but at least some information is there

 

And a second question: VladimirN from time to times posted partial screenshots showing Primes roadmap and the features which are planned for the next and other future versions.

Is this information publicly available? I mean, not a movie, a webinar where we are supposed to jump through the loops registering and having to provide all sort of information even though we come logged in to PTC anyway.

DJNewman
17-Peridot
(To:Werner_E)

Yeah, that's the Update Advisor.

 

 


We're veering a bit off-topic with your other question, but...

*cough*
Not a movie? ...Nah, it's only in webinar format until an attendee takes screenshots from it and posts those screenshots.

*cough*

Speaking of which, I haven't started telling the public this exists yet since I want 10.0.1.0 to breathe on its own a bit, but on Monday we did open up registration for "Mathcad Prime 11 Sneak Peek & Mathcad Roadmap" airing November 13. It'll have updated roadmap slides.

...And yeah, you need to register for it with all sorts of information, but it is an upcoming event with Live Q&A, so it makes sense to ask for your contact info so we can make sure you don't miss the event and we know who attends these things and who is asking. Very important for customer care.

(I'm told by our web team that if you don't delete PTC's cookies and you give us your info on one of these once, it'll remember you the next time you fill out a form on mathcad.com and it's a much smoother experience. I've never experienced this before because I have Firefox block tracking as a general principle.)

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
Werner_E
25-Diamond I
(To:DJNewman)

Sorry, I sure would prefer printed/written information over a live or recorded oral one.

DJNewman
17-Peridot
(To:Werner_E)

I'll bring it up with product management, but we're not gonna get the new roadmap before November 13, at least.

(...Or just come to the event.)

 

Maybe I'll do a recap blog in January 2025 covering what happened in 2024 like I did last year, and maybe I can sneak in a roadmap screenshot in there.

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
DJNewman
17-Peridot
(To:DJNewman)

And now I can finally unfloat this post because the write-up blog is done: https://www.mathcad.com/en/blogs/community-challenge-game-gallery

 

...You can hopefully understand why it took so long. I go in-depth on all three games and the design decisions behind each, as well as life lessons...!

 

Spoiler
PTC also laid off my editor, which didn't help my turnaround time at all. And that probably is also why this is not only the longest article on mathcad.com by far, but probably the... uh... least hinged.
I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
Announcements

Top Tags