teachmetorobot
teachmetorobot
Are you building a robot?
122 posts
Journalling my tinkering.
Don't wanna be here? Send us removal request.
teachmetorobot · 7 years ago
Text
Space Nyan: Getting Unstuck Day 5 Jumps and Flying
https://scratch.mit.edu/projects/235902074/ 
Getting Unstuck Day 5 project, jumping and flying 
 Creativity: 
 I wanted to use a gif, as I learned how from another scratcher recently to import a gif to make an animated sprite. I also wanted to make more of a game-type project, with a score and a clear end-point. Often, the sprites I use depend on what I can find through Google Image Search :-/ So, NyanCat flies through space! 
Production: 
Lots of sprites, each with animation. It was fun and easy to make a sprite blink quickly between two or three costumes to give them more interest. Getting the objects flying through space at an appropriate speed and spaced out enough was also difficult. I feel I could still improve that aspect of the game. In addition, I did manage to make NyanCat react every time it got hit, but I wasn't quite sure how to use the "Touching sprite" sensor in such a way as to only react once, rather than continuously as the two sprites passed over each other. I ended up putting "Wait" blocks in my "If touching" blocks, but as always, I wonder if there isn't a more elegant way of doing this. 
Getting Unstuck: 
So I've realized that I always think there is a more elegant way of doing things... but I rarely go look for it or ask for help. I do like to try to figure things out on my own. I have been using the "help" commands more often. Part of it is that I'm not sure how to find the specific information that I'm looking for. Another scratcher recently remixed one of my projects and indicated another way of doing something (waiting for keyboard input), so I've made sure to reuse that new strategy in this project.
3 notes · View notes
teachmetorobot · 7 years ago
Text
Froggo in Wonderland: Getting Unstuck Day 4 Sprites, Costumes, and Keyboard Controls
https://scratch.mit.edu/projects/235825255/
Getting Unstuck Day 4 Costumes
Creativity: 
Changing a Sprite's appearance reminded me of an Alice in Wonderland scenario, where she grows bigger or smaller based on what she eats. My froggo friend is Alice, but I also wanted to play with another character changing costumes, as well as changing the background in response to events in the script. 
 Production: 
Used a lot of "broadcast message" blocks to coordinate the activity between all the different sprites. I also realized that if I wanted to run two parallel sequences (like talking and moving) that I could create two scripts that each start with the same event (green flag, or message) and that they would run at the same time. No more fiddling around with wait blocks. 
 Getting Unstuck: 
I was stuck in one area, where I wanted a script to repeat until a specific message is broadcast. You can start a script with a message but you can't end a loop with a message. So I had to Google for some help and found a workaround where you set a variable to 1 with the message and then set the loop to run until the variable = 1. I'm still unclear about how some events are timed in Scratch, such as what happens when you have a "wait" block versus the "say" block or the "play sound" block, each of which has a certain duration, but what happens to the rest of the script during this time?
0 notes
teachmetorobot · 7 years ago
Text
Fleurs musicales : Getting Unstuck Day 3 Notes
Getting Unstuck Day 3 Notes 
 Quickie remix of my own project, adding a piano note every time a flower is produced. The tone of the note is determined by the same variable as the size of the flower (between about 100 and 25). Had to round the variable, as tones in between whole numbers were not super pretty.
I also had another, more involved project, that involved playing all sorts of different instruments. However, that one disappeared (!) when Flash crashed on my computer. Turns out Scratch doesn't autosave! Oops!
 ¯\_(ツ)_/¯
0 notes
teachmetorobot · 7 years ago
Text
Bloom to Fade: Getting Unstuck Day 2 Flowers
https://scratch.mit.edu/projects/235712536/
Getting Unstuck Day 2 Flowers 
Creativity: 
 I realized right away that if you kept clicking and adding more flowers, the screen would get really full so that there would have to be some way for the flowers to disappear or be removed. I decided that their petals would fall to the ground before they faded away. 
 Production: 
 Fairly straightforward with a bit of testing and iteration. Drawing the flowers with Scratch's drawing tools was not that difficult. I did run into a bug where the flowers wouldn't change colour each time I clicked, because I put the code for that inside the "When a clone is created" block, rather than before the creation of the clone. That means each clone started at the first colour and only changed colour once, so they all ended up at the same colour. Additionally, I had some trouble working out the code to make the size of the flower depend on the y-position of the mouse when clicked. I did have to use my math skills on that one to figure out how to make the size a function of the y-position. 
 Getting Unstuck: 
 I went back to good old paper and pencil to graph the size of the flower as a function of the y-position of the mouse. I used y=mx+b and initially messed up on calculating my b value. The great thing about Scratch is that when I tested it, I saw immediately that the program wasn't doing what I expected it to do, so that I knew I had made an error. Not sure I would have caught that without the immediate feedback. Not so much getting unstuck with my coding as my coding helping me get unstuck with my math! Still not sure how to make the flowers appear when the mouse button comes up, as you can simply hold the mouse down as you move it around on the screen.
0 notes
teachmetorobot · 7 years ago
Text
Competition for Resources: Getting Unstuck Day 1 Collision
Click here to go to Scratch
https://scratch.mit.edu/projects/235705525/
Part of the Getting Unstuck project. 
Creativity: 
I started thinking about a story where one character might say "Excuse me!" to another, which got me thinking about how Canadians are stereotyped as excessively polite. There's the beaver. American Independence Day was only two days ago, so there's the eagle. Those sprites I had to find online, as these animals did not exist in Scratch's library. A bit of fiddling to get them the right size, with transparent backgrounds. Where would a beaver and an eagle interact? At a lake. The lake background comes from Scratch's library, and the heron that's already there provided the "conflict" necessary for any good story. 
Production: 
A bit fiddly, as I mentioned, to get outside images into Scratch. As for the code, I am not convinced that there isn't a more elegant way to take care of the timing between the "thought bubbles" of each character, rather than just hard-coding all the glide, wait, and thought blocks. Likewise with the collision at the end. I used an "if" block, but I have a feeling that there are more elegant ways of accomplishing that little bit of interaction.
Getting Unstuck:
There was a lot of testing and iterating to get the timing right for the thought bubbles. Initially, I had "forever" blocks around the "if" blocks to sense when the two characters were touching, but I realized I didn't need them as the two characters would only touch once, and in a defined sequence. It's not like in a game where two sprites might touch at any time, so you would need the "forever" block to account for that.
0 notes
teachmetorobot · 8 years ago
Photo
Tumblr media
Early this morning, the Cassini spacecraft dove into Saturn’s atmosphere completing its 20 years in space 😭😭 On its final mission, it collected data on Saturn’s gravity and magnetic fields, which will help us understand the planet’s core. This spacecraft beamed back vast amounts of images of Saturn, its rings and its moons, helping more than 3,000 scientific studies.
4K notes · View notes
teachmetorobot · 8 years ago
Photo
Tumblr media
Great! I want one!
0 notes
teachmetorobot · 8 years ago
Photo
Tumblr media
Fun, but I got frustrated when the camera wouldn't correctly recognize colours
0 notes
teachmetorobot · 8 years ago
Photo
Tumblr media
Conductive paint not so conductive. Pen was good.
0 notes
teachmetorobot · 8 years ago
Photo
Tumblr media
Circuitscribe pen, regular graphite pencil, and electric paint
0 notes
teachmetorobot · 8 years ago
Photo
Tumblr media
http://www.relativelyinteresting.com/win-argument-according-science/
0 notes
teachmetorobot · 8 years ago
Photo
Tumblr media
Plant spa. [Via @awkwardyeti]
536 notes · View notes
teachmetorobot · 8 years ago
Photo
I can confirm the technician vs postdoc vs PhD one.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
20K notes · View notes
teachmetorobot · 8 years ago
Text
Conservatives have so much fucking nerve talking about how “ENVIRONMENTAL REGULATIONS ARE OUT OF CONTROL” when absolutely no-one feels inconvenienced by them or has ever even encountered them in their personal lives unless they’re the CEO’s of a megaconglomerate bitter that they couldn’t rip up a national park and buy like their fifth house boat
105K notes · View notes
teachmetorobot · 8 years ago
Photo
Tumblr media
Oooooo spooky! 👻
1K notes · View notes
teachmetorobot · 8 years ago
Photo
Atmospheric phenomena
Tumblr media
Amazing photo!
[Image via @nasa Images]
377 notes · View notes
teachmetorobot · 9 years ago
Photo
Tumblr media
10K notes · View notes