Learning Outcomes

Learning intention: how to create pixel characters (sprites) for digital outcomes.

  1. To understand images can be made from pixels.
  2. To convert a design into a graphical image.
  3. To use drawing software to create sprites.
  4. To import graphical images into a program.


Speech Pixel - tongi


Speech Programming - papatono



Making obstacles for your country!

How could you make your game more interesting to play?

Use your research into your chosen country to design an obstacle for your character sprite to move around.

Edit

This will make it more challenging for your character to explore the country, while still learning about the features in a country!



Recap: Creating a sprite in PixilArt

Edit Once you have designed your obstacle, sprite head back to Pixilart to make your sprite:

https://www.pixilart.com

Edit When you’re at PixilArt, you will again see this box pop up:

Edit

Edit You need to change the sizes of the grid to match your pixel design as before:

  • Change width from 100 to 30
  • Change height from 100 to 30

Edit You can select a colour palette if you wish, or just leave the standard one.

Edit Now click the new drawing button.


If you forgot how to use PixilArt, then watch the video to recap.

Just remember, we’re not making an emoji! We want to create an obstacle this time (like a volcano or lake).



Download our obstacle!

Edit Click on File in the menu bar…

Edit Click on Export/Download:

Edit

Edit Now click on Download .png:

Edit

Edit Go find where you downloaded your drawing.

Edit Rename it to something like: volcano.png



Time to upload our obstacle into Repl!

Edit Click on these 3 dots:

Edit

Edit Click on Upload file:

Edit

Edit Then select the image you downloaded from PixilArt.

Edit Check it’s there!

Edit



Tell our program to use our new image!

Add the following code to your program. You will need to specify two things:

  • The name of the file representing your obstacle (e.g. volcano.png), and
  • The coordinate you’d like it to be (e.g. H9).

But remember, we need to surround each of these in double quotes! For example:

add_obstacle("volcano.png","H9")


You should place just after you build the land, but before you move:

Edit



Run your program again, and check your obstacle is there.

Edit



Watch out for the obstacles!

Modify the program such that…

ByteEd hits the obstacle:

Edit


ByteEd avoids the obstacle:

Edit


Add more obstacles!

Edit



Let’s make some noise!

Would you like to hear a sound when ByteEd hits an obstacle?

Follow these steps:

Edit Find some sound effects, for example from https://freesound.org

Edit Download the sound you would like to use.

Edit Upload it to Repl, just like you uploaded all those images you created.

Edit Update your add_obstacle() code, by specifying the sound you added as follows:

Edit



Testing and trialing

Once you have made your game, it’s time to test it.

Edit

You can do this in two ways:

  1. You test and check the program:
    • Does it work?
    • Could you add anything?
    • Does it fulfill the design brief?
    • How could you make it better?
  2. Get someone else to check your educational game:
    • Can they understand it?
    • What have they learned?
    • Could they suggest any improvements?



Design brief & attributes

Design Brief: To design and make an educational online game to teach other students about countries of the world through the use of computational thinking.

Attributes: The educational game must:

  • Be created in Python using the techniques you have developed,
  • Link to one chosen country,
  • Teach students about the country, for example places, people, geological features.


Check your finished game…

  • Does it fulfill the design brief?
  • Does it fulfill the attributes? How? Why? Why not?



Edit Kua mutu? Finished?

Evaluation of your game

Edit

What do you think about your final program?

Does it work as you wanted it to?

Does it teach someone about another country?

Could it be improved?