Our “guess the image” jukebox today is using several ScratchX plugins. It uses Clarifai to classify an image and produce some keywords, and then Spotify plays ten seconds of a track matching the keywords. Here are the addresses of the ScratchX plugins:
Today, Ninjas are getting a chance to mess around with a physics engine called Box2D in a side-scrolling ScratchX game that sees them pushing over haybales and avoiding swinging ramps with a monster truck! What will happen if we give our truck really bouncy tyres or give one less grip or even change gravity itself!
Today our advanced group started to look at ScratchX. With ScratchX you can add extra modules to the Scratch environment, and today we looked at the Scratch3D extension.
Firstly, we looked at 3D coordinates. With Scratch we normally have x and y, but now we have z. In the picture you can see x going left to right and y going up and down, but now we also have z coming torwards and away from us. In this image the sun is at the centre of the solar system, x=y=z=0.
Because you can move around the 3D space, you can’t easily show coordinates in the corner like you can with the fixed 2D space of normal Scratch. Well, you could show where the viewer (or “camera”) is located, but since you can be facing in any direction, and maybe even upside-down, your location is only part of the story. The code here shows how you can set the x, y, and z coordinates to be displayed as big numbers in 3D space as in the image above. It’s much easier to see where you are with big numbers floating all around you!
Finally, here’s the code to create the sun and planets, and place them around in space. The Scratch3D extension makes it really easy to create a planet, place it where you want, scale it to the size you want, complete with full-colour texture map, and all in one line. We also have a Lego Darth Vader and a Car (a Tesla?) hidden somewhere in space. Next the forever loop keeps the planets and sun rotating gradually. You can see in the corner the first few blocks for moving around. You can download the Scratch script here.
We’ll be back for another year on Saturday October 6th, 10:00–12:00, in Athy College. Looking forward to seeing you all! A full list of dates is on the right (if you’re on a desktop browser), or at the bottom of the page (on a mobile browser).
Today we started building a robot from Makeblock. A small group carefully dismantled it (it had already been assembled) and started putting it into a different configuration, a mobile arm with grabber. Next time we hope to finish the construction and start programming it!
Darkness into Light will take place at 4.15am on Saturday morning. Since most (all?) of the people that organise Coderdojo Athy will also be that event (and some in an organising capacity from much, much earlier in the night), as well as thousands from Athy itself, we’re going to take this week off and try to catch up on sleep.