Advancers – Week 16 – Magnify Part 1

This week we did the first week of the Magnify Project, there will definitely be Part 2 and maybe Part 3.

The Magnify project is designed to allow you to create your own detailed Map of something, by magnifying part of the screen to view more information and then Magnify part of that screen to dig even deeper in to your Map.

For example, you might start with an image of the Solar System, showing all the Planets, then you can click on a Planet to see more details. If you clicked on the Earth for example you would be able to see all the countries, and maybe click on a Country to see even more information.

Part 1.

For Part 1 all we did was build a framework with 2 coloured squares that you could click on to Zoom in/Zoom out of.

The code in both squares is identical apart from the Values given to 5 (or 6!) Variables that were defined for that Sprite only.

The Variables are:

MyName – Who am I
MyParent – Who is my Parent
MyLevel – What level do I belong to
MyX – Where am I on the screen
MyY – Where am I on the screen
MyText – What should I say when the Mouse is on me.

Once all these variables are set correctly for each Sprite everything will simply work. For example these are the values that we used for the 2 example Sprites:

SpriteMyNameMyParentMyLevelMyXMyYMyText
Sprite1Sprite11100100Click Me
Sprite2Sprite2Sprite1200Click Me Too.

You can see that the second Sprite has Sprite1 as the Parent and is a level 2 which is one below Sprite1, these variables basically tell each Sprite whether it should be on show and what size it should be.

To see how it works have a look at the example project on the Scratch Web Site:

https://scratch.mit.edu/projects/1004906611

If you have any questions either here, or make a comment on the project on the Scratch Web Site.

Process

Once the Framework is in place, it is quite easy to add extra levels or sprites at the same level, basically copy either the Parent sprite or another Sprite at the same level you want. Update the Costume with your new image, then simply change the Variables so it has the correct Parent and Level information and it should all work.

AND Homework for next week!

Have a think about what you want to Magnify and see if you can gather some images to use. The more images you have the better the project will end up.

Advancers – Week 9 (2023 – 2024)

Programming

This week we created our very own programming language in Scratch.

It reads a list of commands and does what it’s told.

It only understands a few commands:

M = Move
T = Turn
X = Go To X
Y = Go To Y
P = Pen Up or Down
C = Change colour

The Lines in the list have to be in the right format for the code to work. The right format is the Single Letter for the command followed by a colon (:), followed by a Parameter, if the command needs it. For example this command:

M:10

Tells the code to M(ove) 10 steps.

Spirals – To create a list of Commands.

We also spent some time updating the Spirals project so that it could create a List of Commands that could be used by the Programming project to draw the same Spiral.

Export/Import a List

We also experimented with the Export List and Import List options in Scratch to move lists of Commands in and out of different Projects. So for Example you could:

1: Open the Spirals Project.
2: Run a Spiral to add entries to the List.
3: Right Click on the List and Export it to a file.
4: Open the Programming Project.
5: Right click on the List and Import the file you created in step 3.
6: Run the Programming project and it will draw the same spiral.

See it in Action.

Both the Programming Project and the Spirals project that can generate a List have been loaded up to the Scratch Web Site (https://scratch.mit.edu), you should be able to see them without connecting by using the following links:

ClassVersion-Programming https://scratch.mit.edu/projects/953994281/
ClassVersion-Spirals-Programming https://scratch.mit.edu/projects/953995854

If you want to connect and upload your own projects you can use the following details:
username : athenryadvancers
Password : Advancers


Advancers – week 6 (2023 – 2024)

Platformer Game

This week we created a platform game, the objectives of the game is to get as much milk as possible. But the more milk you get the smaller the platforms get and the smaller the milk gets.

If you end up at the bottom of the screen, you will lose a live and start at the top of the screen again.

You can use “Boosts” using the space key to jump up to higher platforms, but beware, you only get a few boosts, but getting milk will also give you 2 more boosts.

And remember, as always (well mostly always!) I have uploaded this to the Scratch web site, you can use the following URL to access it:

https://scratch.mit.edu/projects/930315522/

If you want to Sign In to the Scratch Website you can use the following credentials:

Username : athenryadvancers
Password : Advancers

Don’t forget the uppercase A on the password.

Advancers – Week 5 (2023-2024)

Car Racing Game (RoadRacing)

This week we created a Car Racing game, the object is to get as much score as possible by dodging all the other cars and trucks on the road.

The finished project is available on the Scratch Website:

https://scratch.mit.edu/projects/926443877/

If you want to SignInand edit any of the projects you can use the following credentials:

Username : athenryadvancers
Password : Advancers

Note: The password has an uppercase “A” at the beginning.

Advancers – Week 4 (2023-2024)

Snake

This week we attempted to recreate the old Nokia game of Snake.

We created:

The Snake – This could move around the screen and across the screen edges.
The Tail – This followed the Snake around the screen, wherever the Snake went, the tail would follow.
An Eraser – This followed the Tail rubbing it out, so it stayed the same length all the time.

We still need to complete the following:

The Bug – This will appear on the screen randomly for the Snake to eat. Eating the Bug will increase the length of the Tail.
Score – A simple scoring variable to keep track of how many Bugs we eat.
Music – Some annoying music to play during the Game, it has to be annoying!

I have uploaded 2 versions of the Game to the Scratch Web Site:
ClassVersion-Incomplete – This is from Saturday where we didn’t quite finish everything
ClassVersion-Complete – This is a complete version which has The Bug, The Score and annoying Music.

You can find them both here:

https://scratch.mit.edu/studios/33944393

If you need to log in, use the following details:
Username : athenryadvancers
Password : Advancers (don’t forget the uppercase “A”)
This is an image from the completed version.

Advancers – Week 1 (2023-2024)

Welcome back everyone.

We started off this year with the Spirals Project.

We could specify how many lines the code should draw, how many sides the Spiral should have and then finally how many extra degrees we should turn before drawing the next line.

I have uploaded 2 versions of this project to the Scratch Website, you can get all the code and also play with them online.

ClassVersion-Spirals – This is the one we ended up with where it creates the early universe.
ClassVersion-SingleSpiral – This is the one that we started with, where you can choose the different values.

Go to:

https://www.scratch.mit.edu//

And then you can sign in with the following details, don’t forget the uppercase “A” on the password:

Username : AthenryAdvancers
Password : Advancers

Once you are connected you can go to “My Stuff” and then select the 2023-2024 Studio.

Advancers – Snake and Magnify Updates

Snake Updates

The Snake project has changed a little bit from Saturday. I had to add another Sprite to get the “touching colour” code to work. So now there are 3 Sprites that move around.

  1. The one that you move around with the Arrow keys.
  2. One that follows 0.2 seconds behind, this one now draws the tail and is not touching the first one.
  3. This one follows 2 seconds behind and erases the tail.

I also changed the first Sprite to Move “2” steps not one, this speeds it up a little. I have uploaded the completed project to the AthenryAdvancers account on http://www.scratch.mit.edu so you can take a look and have a go.

My challenge to you is to beat my high score of 1200

Magnify Updates

I have uploaded a Gravity project with one single Sprite to the AthenryAdvancers account on http://www.scratch.mit.edu.

You can use this Template project to create your own Magnify project, think of an idea and draw out the Sprites you will need on a bit of paper, give the Sprites Names on this bit of paper, it doesn’t have to be a masterpiece, any rough old picture will do.

Then you need to get one Image for each of your Sprites, save them all to the same Folder on your Computer.

Once you have your diagram and all your images you can download a copy of the Magnify Project and save it to the same folder as all the images.

The steps (process) to follow to use this Project are:

  1. Rename the StartSprite to the Level 1 Sprite in your diagram
  2. Update the Variables, for this one you only need to update the MyName variable
  3. Change the Costume by uploading your image for this Sprite, delete the original costume

And then to add More Levels and Sprites use these steps:

  1. Copy the Level 1 Sprite
  2. Update the new Sprites name
  3. Update the new Sprites variables, the MyParent needs to match the MyName of the Sprite from the level above
  4. Update the MyX and MyY variables to where you want this Sprite to appear on the screen, you may have to test a few different places to get it right
  5. Change the Costume by uploading your image for this Sprite, delete the original costume

Don’t forget to Save and Test often.

http://www.scratch.mit.edu

To access the Scratch website use the following details:

Username : athenryadvancers
Password : Advancers

Plan for Christmas Card – Improvements.

For the final week we are going to convert the Christmas Card into a Christmas Game.

We will be starting with the Christmas Card that we made last week, if you weren’t there or want to start with the same one that I will be using, have a look at the bottom of this document, I have added instructions on how to get it.

The Plan for this week.

We will be adding some additional Sprites. We will be using Scratch Sprites rather than drawing our own to save time.

  • A sprite for Santa’s sleigh
    • This will move backwards and forward across the top of the screen
  • A sprite for the Presents
    • This will fall from Santa’s sleigh to the bottom of the screen, not directly down though.
    • This sprite will have many costumes.
  • As sprite for you
    • You will be able to move Left and Right across the bottom of the screen to try and catch the falling presents.

The Sleigh Sprite

Scratch does not have a sleigh sprite, so I used the reindeer.

He needs to start on the top left of the screen and move all the way to the top right of the screen and then turn around and go back to the top left, he will just keep doing this.

The code might look something like this:

The Present Sprite

We might have to draw this one.

The present Sprite will start from wherever the Sleigh Sprite is glide down to a random place at the bottom of the Screen, you can make the Present a random size as well to make it more interesting.

The is a Scratch block to put one Sprite in the same place as another Sprite So the code to move down the screen will look something like this:

There will also be code to count the number of presents caught. So, if the Present Sprite touches you, it will count as being caught, so you can increase your score.

When the present is caught you can change to a random costume to display the unwrapped present.

I’ll let you figure out this code as a little challenge (I haven’t done it yet 😊 )

You Sprite

This is the one that catches the presents. I used the Scratch cat, finally.

Not much code for this one, he just needs to move left or right using the left or right keys on the keyboard. So, something like this:

Getting the Christmas Card project.

https://scratch.mit.edu

Login with user name AthenryAdvancers and Password Advancers

Select My Stuff and then click the See Inside button for the ClassVersion-ChritmasCard

You will then have to save it to your device, select File – Save to your computer, so you can work on your version.

Now you will have to open Scratch 3 on your device and open the file you just saved.

This week’s challenge to create a Christmas Card.

This will be an interactive Christmas Card.

  1. A nice background with Snow, Christmas Trees, a house.
    1. We might use different Sprites for the Trees.
  2. Flashing lights on the House and the Tree.
  3. Falling snow.
  4. Snow building up on the ground.
  5. An animated Snowman.

Snowflakes

To make it even more interesting, we are going to make the snowflakes different sizes and fall at different rates depending on how big they are.

We will use the clone functionality to make the snowflakes.

Each clone will pick a random size and will glide to the bottom of the screen, how fast if glides will be related to how big or small it is.

The snowflake is going to be quite hard to draw as it will be a small white dot on a white background, so we will be careful.

The building up on the ground part, is quite easy, we just pick a random Y value to stop at, as long as it is close to the bottom of the screen we should be ok.

Flashing Lights or Tree Sprites

Again, these might be quite difficult to draw as we have to draw them over the background and get them to be over the Trees?

If we draw the complete Tree in the Sprite I think it is going to be a lot easier.

Snowflake code

Flashing light code