Hello!
We recently completed our latest Scimatics project. This one was all about the Kinetic Molecular Theory and chemicals! It was fun, but boy, was it hard (for me, anyways)!
Our task was to code a game or interactive simulator representing the kinetic molecular theory and states of matter using Scratch. I usually really enjoy Scratch, but I really struggled with this project.
Let’s take a look at our driving question:
How is the motion of atoms and molecules related to temperature?
Pretty self-explanatory.
We were evaluated on 3 Curricular Competencies:
- Questioning and Predicting
- Scientific Communication
- Reasoning and Analyzing
I will get to those later.
First, I will talk about my game and describe the many bugs that I created for myself while coding it.
The point of my game is that the player is an atom who is trying to escape his container. He (or she) begins by choosing whether he wants to be a Hydrogen atom, a Nitrogen atom, or an Oxygen atom, and his costume changes accordingly.
Next, he goes to the actual game, where he tries to avoid the Unfriendly Water Molecule (the UWM) by moving around with the arrow keys as the UWM bounces around. The longer he plays, the higher te temperature rises, and the faster the UWM bounces. If the player manages to avoid contact with the UWM for 50 seconds (until the temperature gets to 50 degrees Celsius) then the pressure gets to be too much for the container. It explodes, and the player is free.
So, not too complicated. At least, that’s what I thought.
Before I get into the description of my coding incompetence, here is the game! I named it Particle Accelerator.
Use the arrow keys to move. Good luck, young atom!
Anyways.
The first problem I ran into was the element options. I had no idea how to make them change the costume of the atom. I tried a couple of different things, including variables, complicated scripts involving a lot of background changes, and banging my head against the table, and eventually settled for having the sprites broadcast a message when they were clicked. It works pretty well, and I can’t believe I didn’t think of it before.
Unfortunately, that was the least of my problems.
My next bug was after the element selection. In my original plan for the game, I had the atom describe the issue and teach the player how to play the game. I was dismayed to find that the dialogue kept repeating over and over throughout the game. I fiddled with it for a few days, and eventually gave up and scrapped it.
Finally, my most irritating and time-consuming issue was the the Unfriendly Water Molecule. He gave my many problems! First, he bounced around so fast that I could barely see him, which caused a laugh attack with one of my classmates.
When I finally sorted out that bug, the sprite still refused to function properly. When the temperature reached a certain heat, he would randomly clone a million tiny molecules which would also clone a million tiny atoms, which would rampage around the screen in trails, triggering another laugh attack.
I eventually fixed that, too, but it caused no end of irritation and madness. I must confess that sometimes I just felt like handing in an unfinished game and being done with it, because by this point it was already overdue. I continued to create problems for myself with my faulty coding, and towards the end sought out the help of my dad, to whom I am forever grateful for helping me de-bug and code a colour-changing background!
Now that I’m done criticizing myself, I should get on with the important part: the Curricular Competencies.
Questioning and Predicting: Demonstrate intellectual curiosity about a scientific topic or problem of personal interest.
I definitely tried to be focused during class, and didn’t give into temptation and play the abundance of games that people had made on Scratch. I read the textbook sections thoroughly and finished my workbook pages relatively accurately. I admit that sometimes, when I felt like I was going to explode from frustration, I did take small breaks and read for a bit. After that I would get right back to coding, though.
Scientific Communication: Communicate ideas, findings, and solutions to problems using scientific language, representations, and digital technologies.
I included several atoms and a molecule in my game, as well as particle motion, with the UWM bouncing around the container. I tried to represent the different states of matter as well, though its not that obvious: when the temperature is at 0 degrees, the molecule doesn’t move at all (in a solid state), and speeds up as the temperature rises, moving through liquid and finally gas. I know it isn’t super realistic, but I did try to include them. I chose to use the Bohr model for the atom and molecules, because it was pretty easy to draw, but still relatively modern.
Reasoning and Analyzing: Use logic and patterns (including coding) to solve puzzles and play games.
I coded a functional Scratch game (after much struggle), which works well and rarely ever glitches. It is pretty easy to use, with just the arrow keys as controls, so the player can easily work the game. (Whether the game is easy or not: well, that depends on the player. I certainly am not good at it.) The game is relatively logical, too; the molecule bounces around the container, just like a normal molecule would.
This project turned out ok in the end. I certainly learned a lot, about the kinetic molecular theory, atoms, Scratch, and frustration management! Thanks for reading!
Cheers,
Evelyn 👩🏽
Leave a Reply