Code, Click, and Spin: The Digital Spinner
Bridging Computer Science, Design, Physics, and Math with Interactive Classroom Experiences
Welcome to the home of innovation, where the classic game spinner is reimagined for the digital age. Here, I combine the time-honored joy of anticipation with the precision of modern technology. This spinner isn’t just a tool; it’s a harmonious blend of design, mathematics, and computer science, all brought to life through the power of conversational coding with ChatGPT.
Check it out:
My original Scratch project and code:
https://scratch.mit.edu/projects/970791967
Features:
Programmatic Creation: Spinners are generated through Python code, leveraging ChatGPT’s conversational AI to refine the design and functionality. This ensures a seamless and efficient process from concept to creation.
Dynamic Spinner Size: The tool automatically adjusts the spinner’s size based on the participant list length. By parsing a comma or space-delimited string of names, it dynamically generates a spinner with the corresponding number of sectors, making it adaptable to various group sizes.
Mathematical Precision: Incorporates mathematical formulas to accurately determine the spinner’s winning sector based on degrees rotated. This not only enhances the fairness of the selection process but also introduces students to practical applications of geometry and arithmetic.
Engaging Sound Effects: The inclusion of sound effects and the potential for an AI-hosted voice add an auditory dimension to the experience, making the spinner more interactive and enjoyable.
Interdisciplinary Educational Tool: This project exemplifies interdisciplinary learning, combining elements of Language Arts (communicating ideas to AI), Computer Science (coding the spinner in Python and Scratch), MYP Design (creating a user-friendly interface), and Mathematics (applying geometric and arithmetic principles).
Accessibility and Integration: Designed to run in Google Colab, the spinner tool is accessible and easy to share, thanks to its integration with Google Drive. It requires no setup, making it readily available for educators and students.
Active Learning: Encourages active learning by allowing students to directly engage with coding concepts and see the immediate impact of their work. This hands-on experience is invaluable in reinforcing learning objectives and fostering a deeper understanding of the subject matter.
Conclusion:
The spinner is a bridge between the physical and digital. This project is a testament to the power of interdisciplinary collaboration, demonstrating that with creativity, technical skill, and a bit of AI assistance, the possibilities for enhancing education are limitless.
Read the full article on LinkedIn:
https://www.linkedin.com/pulse/code-click-spin-avi-megiddo-k97mc/
My original Scratch project and code:
https://scratch.mit.edu/projects/970791967
Make random orders, partners, and groups
I used this project many times in class, to create random seating arrangements and partners/groups for projects:
Play on Scratch, remix, or find the original code here:
https://scratch.mit.edu/projects/820003262
Strong Password Generator
Inspired by a CodeSpeaks.org blog post, Hour of Code Activity to Program a Strong Password Generator, I decided to try to create it in Scratch:
Play on Scratch, remix, or find the original code here:
https://scratch.mit.edu/projects/615663661
AI “Tongue-Twisters” Audiobook
This project was made shortly after ChatGPT and DALL-E came out. I prompted ChatGPT to create the “tongue-twister” sentences, or rather, sentences that maximize repetition of the first letter of each word.
I then fed these sentences into DALL-E to create the art. I used the Scratch text-to-speech function to make it an audiobook. I tried to match the voices to the character/creatures:
Play on Scratch, remix, or find the original code here:
https://scratch.mit.edu/projects/811644124/
Shapes Jump
Shapes Jump is an example of an educational game made in Scratch. It teaches geometric shapes names and their spelling:
Play on Scratch, remix, or find the original code here:
https://scratch.mit.edu/projects/801043789
“Purrfect Pop” and “Poppin’ Times”
These mini-games were made as examples for a student.
PurrfectPop is for practicing addition and subtraction with order of operations:
Play on Scratch, remix, or find the original code here:
https://scratch.mit.edu/projects/844520594
Poppin’ Times is a game for practicing multiplication:
Play on Scratch, remix, or find the original code here:
https://scratch.mit.edu/projects/845524934
“Stop the Logger”: Using the ADDIE Model for Scratch Game Development
OVERVIEW
This game was created using the ADDIE model for instructional design, which stands for Analysis, Design, Development, Implementation, and Evaluation. These phases encompassed analyzing the game concept, designing game elements, developing the game mechanics, implementing the features, and evaluating the game through testing and feedback.
The game involves catching a tree logger or “arresting” the logger using a “catchable” button in Scratch. The game was inspired by a button script from years ago and the birds outside my window. The trees in the game are from PNGTree.com and PNGWing.com, and the code randomly chooses one, “plants” it in a random location on the screen, and grows every second with a bit of accounting for upward and outward growth, but not downward.
Play on Scratch, remix, or find the original code here:
https://scratch.mit.edu/projects/829653804
Analysis:
I was inspired initially by the button script from years ago, where it moved away from the mouse pointer as you tried to click it. This inspired me to create a “catchable” button in Scratch, which I used in the development of the game. After thinking about what makes sense to “catch” and still be educational, I came up with catching a tree logger, or “arresting” the logger.
I found an animated gif of a logger/lumberjack on Dribbble.com, by searching for synonyms of logger/lumberjack/tree logger and ‘gif’, and used a web-based tool to make all the gif images have a transparent background. Importing them as a new sprite took one click, and that was the basis for the game.
I was also inspired by the birds outside my window while creating the functions and used birdcall sounds from ZapSplat.com to reward the player after 10 trees were alive. Additionally, a student’s project inspired me to use the number 20 for a “winning amount” of loggers to catch.
Design:
In terms of design, I made the “caught” version of the logger by taking an image from the logger gif, and copy+paste+flip horizontally to make the arms look like they were handcuffed. I also created handcuffs in Google Drawings and finalized the design of the handcuffed tree logger using the Scratch costume editor. When the user successfully clicks on the logger, I decided to show a funny utterance instead of educational content to reward the user. I used my resizing concept to make the logger shrink as he rose to the top of the screen to join his other caught logger friends.
The trees were also made using the ‘clone’ feature in Scratch, and some of the hard challenges included managing the clones, creating actions upon starting as a clone, deleting at the right time, and stopping other scripts in a sprite upon certain actions/states of the game, such as trees equalling zero and 20 loggers being caught.
Development:
To develop the game, iteration was key. I revisited the code for 30-minute to 2-hour sessions, adding features, debugging, iterating over the project, upgrading, and saving stable backup versions periodically.
A random tree is chosen every second, with a random location on the screen, size adjusted based on position, and growing every second with a bit of accounting for upward and outward growth, but not downward. I used the size of the tree to make trees smaller or larger, depending on how high their randomly chosen y-values are, using the formula (180 – y-position) times some coefficient.
A recent iteration/upgrade was to how the trees fall when they die. Initially, I just rotated a tree 90 degrees when the logger touches it, but the upgrade involves repeating 10 rotations of 9, and a random choice of clockwise/counterclockwise rotation. Further, the tree moves down as it rotates, to simulate rotation from the root, not the middle.
Implementation:
During implementation, I continued to test the game and made adjustments as needed. I added scoring functionality, where the player earns one point for each logger caught and loses one point for each tree lost. I also used the stamp tool as a way to delete each caught logger clone. I made the game more challenging by having the trees grow faster and adding more loggers to catch over time.
Evaluation:
In terms of evaluation, I tested the game with several individuals to get feedback on the gameplay and design. Based on the feedback, I made further adjustments to the game to improve the user experience. Overall, the game has been well-received and has provided an engaging way to learn about deforestation.
MILESTONES
- Getting the button to move away from the cursor at a custom speed, based on a custom distance.
- Finding and importing the logger .gif
- Dynamic sizing based on height.
- Creating the “caught” logger.
- Tree growth and death upgrades.
- Changing frequency and speed of logger based on # of catches.
- Adding educational messages upon loss/win.
- Adding a trophy/badge and music upon winning.
NY Times Spelling Bee in Scratch
Inspired by the NY Times Spelling Bee, I challenged myself to create a Scratch version of this game.
Rules: Words must be at least 4 letters long, and must contain the yellow center letter. Letters do not have to be adjacent to each other, and duplicating letters is allowed. I created the background hexagons with Google Drawings and Inkscape. In Scratch, I created a “dictionary” based on an English word list from: http://www.mediafire.com/file/5cy3vcsag29ic43/Word_List.txt/file
I also created letter frequencies based the following sources:
https://www3.nd.edu/~busiforc/handouts/cryptography/letterfrequencies.html
https://en.wikipedia.org/wiki/Scrabble_letter_distributions
https://en.wikipedia.org/wiki/Letter_frequency
I got a great suggestion from Nirmala Sankaran, Co-Founder, HeyMath, to include the total possible words for a given board. This required iterating over the dictionary and checking if each word is valid for each board, given the game rules.
Play on Scratch, remix, or find the original code here: https://scratch.mit.edu/projects/603333011
I Guess Your Number
In an effort to explain Binary Search, I created a simple “I guess your number” game:
Play on Scratch, remix, or find the original code here:
https://scratch.mit.edu/projects/589186770/
Scratch + Makey Makey Timing Gate (x 2) Controller
I wrote a Scratch controller that works with Makey Makey to automatically time a Pinewood Derby race. After successfully connecting the circuits with Makey Makey, this software can time a 2-car race.
To simulate closing the timing gates, hold down the space bar, left arrow key, and right arrow keys.
To simulate starting, let go of the space bar.
To simulate the blue car finishing the race, let go of the left arrow key.
To simulate the red car finishing the race, let go of the right arrow key.
Based on https://www.rapidonline.com/makeymakey
Inspired by https://www.youtube.com/watch?v=hKzZKgLKiks
Note: This only works if the keyboard you are using has N-Key rollover, allowing multiple keys pressed to be recognized simultaneously.
Play on Scratch, remix, or find the original code here:
https://scratch.mit.edu/projects/531014489/