Introduction to TouchDevelop

Slides:



Advertisements
Similar presentations
What we will cover today… Where is the camera on my phone? Taking a photo Zoom in and out Deleting a photo Where do my photos go to? Viewing my photos.
Advertisements

Pages and boxes Building quick user interfaces. learning objectives o Build a quick UI with pages and boxes o understand how pages and boxes work o click.
Pong! “The oldest commercially available game in history” Resources created from the video tutorials provided by David Phillips on
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
App Inventor Barb Ericson July 3, 2013.
How to make a game on game maker 7. Start With an Idea Before you actually start making your game, you are going to need an idea as to what it is you.
Contact: Fei Gao Office of Information Technology Montclair State University Creating Professional ePortfolios with Google Sites.
Downloading eBooks to your iPhone, iPad, and iPod Touch from Overdrive.
Screens naming screens and concepts Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL and.
Introduction to TouchDevelop
Facebook Page’s for All of Your Listings Increase your FB lead Generation Presented By: YOUR NAME YOUR CONTACT INFO YOUR NMLS#
Programming on the Go Chapters 1and 2 Siddharth Patel
Created by Amber Craddock, Kylee Stone & Caleb Truette.
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
Introduction to TouchDevelop
Getting Started with Moodle Getting Started Logging In Entering Your Address Viewing a Course Navigating Your Course’s Homepage Personalizing Your.
Tutorial. What is Instagram? Instagram is a free, online photo sharing, video sharing and social networking service that enables users to take pictures.
Code Club Session 2 Dance Party. What will we learn ?  How to change the background  How to create animations  How to make objects talk to each other.
Introduction to Scratch!
Games. learning objectives o writing games! o understanding the built-in 2D game engine o events in games o using art (pictures, sounds)
FACEBOOK IS THE BEST THING THAT EVER HAPPENED TO FRIENDSHIP WHY I LIKE FACEBOOK! By Mike Matthews.
TECH19599 Exploring Information Technology Mobile Application Development (Control Statements)
StopPreviousNext Vicnet Internet training course Workbook 7 Working with pictures on the Internet Easy English workbook July 2010.
Learning the skills for programming Advanced Visual Programming.
VB Games: Preparing for Memory Brainstorm controls & events Parallel structures (again), Visibility, LoadPicture, User-defined procedures, Do While/Loop,busy.
Introduction to TouchDevelop
Guide for Mahara My Views PY1 team 3 - Yihong Huo, Jian Ren, Poonam Kala 1Guide of My Views - Team 3.
How to Create Visual Presentations with Microsoft PowerPoint.
How to Create a Quiz Using MultiQuiz. Step 1 Go to Create an account and activate the account via.
How to make a digital portfolio SCC YEAR 1. Table of contents  1. Go to your digital portfolio  2. Make the document as your digital portfolio  3.
Facebook for Beginners One Session Class. What will you learn today? What can you do on Facebook? Creating a profile Privacy Connecting with friends Sending.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Craps Game Application Introducing Random-Number Generation and Enum.
Variables and Random Numbers Computer App Session 4.
Getting started with the turtle Find the latest version of this document at
Cloning in Scratch Computer App Session 6. Cloning in Scratch Learning Objectives: I will clone sprites in Scratch to create copies of an existing sprite.
When the program is first started a wizard will start to setup your Lemming App. Enter your company name and owner in the fields designated “Company Name”
How to create a basic game in Scratch. The Scratch Stage The Scratch stage is 480 pixels wide and 360 pixels high x increasesx decreases.
How to create an educational wiki. Laurie Roberts 2010.
Introduction to TouchDevelop Lesson 3 – Comments & Lists Created by S. Johnson
Screens naming screens and concepts v2.8 Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL.
Creating a Podcast using GarageBand Symphonic Band Project: An Introduction to Musical Instruments.
Randomness Exploring Computer Science Lesson 4-10 – Part 2.
Boxes. boxes- learning targets o I will be able to display buttons (boxes) o I will be able to organize boxes o I will be able to create an animation.
Introducing Scratch Learning resources for the implementation of the scenario
Objective of the lesson Use Blockly to make a dice for Snakes and Ladders All of you will: – Make an image which displays when you press a button Most.
Martin Norris Computing Teacher/Leader at Moldgreen Community Primary School, Huddersfield
Boxes. SOUNDBOARD Objective: Tap the boxes to play sounds! Demo:
Basic coding… with TouchDevelop!!
Scratch Unit Overview We are going to look at computer programming and how to create your very own computer game The piece of software we will be using.
Tutorial - Editing and viewing profiles on SimpleVLE
Explain what touch develop is to your students:
BBC Microbit.
BBC Microbit.
Introduction to Object-Oriented Programming
Extranet User Instructions
Explain what touch develop is to your students:
Introduction to TouchDevelop
Explain what touch develop is to your students:
Introduction to TouchDevelop
Introduction to TouchDevelop
BBC Microbit.
And and or…and RANDOMNESS
Explain what touch develop is to your students:
Lesson 2.
Explain what touch develop is to your students:
Explain what touch develop is to your students:
Explain what touch develop is to your students:
Explain what touch develop is to your students:
Exploring Computer Science Lesson 4-10 – Part 2
Explain what touch develop is to your students:
Presentation transcript:

Introduction to TouchDevelop Lesson 5 – My First App Created by S. Johnson - www.touchdevelop.weebly.com

TouchDevelop My First App “Dice App” Created by S. Johnson - www.touchdevelop.weebly.com

Learning objectives To create a game board for a mobile phone app. Created by S. Johnson - www.touchdevelop.weebly.com

My first app In this lesson, we are going to create an app to simulate the rolling of a dice. Created by S. Johnson - www.touchdevelop.weebly.com

Getting started Open the TouchDevelop app by visiting http://touchdevelop.com/ Login to your account. Tap Create Script. Choose blank. Created by S. Johnson - www.touchdevelop.weebly.com

Getting started … Give your script a name. Tap on create. Created by S. Johnson - www.touchdevelop.weebly.com

TouchDevelop My First App “Creating the game board” Created by S. Johnson - www.touchdevelop.weebly.com

Creating the game board Before we start, we need to create the game board. In the previous lesson we created a game board for a landscape game (800 pixels by 480 pixels). This time, let’s create a game board for a portrait game (480 pixels by 800 pixels). Go to ▷ main() Tap on do nothing. Tap var on the lower right keyboard. Rename the variable board. Created by S. Johnson - www.touchdevelop.weebly.com

Creating the game board continued 1... Tap on media. Tap on create portrait board. Next we need to store board in a global variable. Move the cursor to the new variable. Tap on promote to data. Your code should look like this: Created by S. Johnson - www.touchdevelop.weebly.com

Creating the game board continued 2... Finally, we need to display the game board on the screen. The screen is referred to as the wall so posting board to the wall will display the game board on the screen. Add a new line. Tap data. Tap board. Tap post to wall. Your code should look like this: Created by S. Johnson - www.touchdevelop.weebly.com

TouchDevelop My First App “Adding the dice sprites” Created by S. Johnson - www.touchdevelop.weebly.com

Adding the dice sprites The next step is to add the images to our script to represent each side of our dice. As explained in previous tutorials, you can either upload a picture of your own or reuse a picture that has already been uploaded by another user. Created by S. Johnson - www.touchdevelop.weebly.com

Adding the dice sprites continued 1... Tap on add new action, event, … Tap on pic : Picture. Created by S. Johnson - www.touchdevelop.weebly.com

Adding the dice sprites continued 2... Scroll down and tap on search online art pictures Type in dice in the search bar. Find and tap on Dice 1. Created by S. Johnson - www.touchdevelop.weebly.com

Adding the dice sprites continued 3... The image will now appear in your art library: Repeat the above steps for the remaining 5 sides of the dice. Created by S. Johnson - www.touchdevelop.weebly.com

Adding the dice sprites continued 4... When finished, your art library should look like this: Created by S. Johnson - www.touchdevelop.weebly.com

TouchDevelop My First App “Rolling the dice” Created by S. Johnson - www.touchdevelop.weebly.com

Rolling the dice First we need to instruct the computer to generate a random number between 1 and 6. Go to ▷ main() Add a new line We will use a variable to store the random number. Tap var on the lower right keyboard. Rename the variable dice roll. Tap on math. Tap on random Remember: Click on the blue arrow button to cycle through all the available options. Created by S. Johnson - www.touchdevelop.weebly.com

Rolling the dice continued 1... Your code should look like this: Delete the number generated by TouchDevelop and replace it with a 6. Due to the way in which TouchDevelop works, the code will generate a number between 0 and 5 NOT 1 and 6. In order to rectify this, we need to add a 1 to the randomly generated number i.e. a 0 will become a 1 and 5 will become 6 etc. Created by S. Johnson - www.touchdevelop.weebly.com

Rolling the dice continued 2... Tap on the end of the previous line and add + 1 to the end of the code: Now that we have instructed the computer to generate a random number between 1 and 6, next we will write the code which will display the corresponding image based on the number randomly generated by the computer. For example: If the computer generates a 1, the code will display dice 1. If the computer generates a 5, the code will display dice 5. Created by S. Johnson - www.touchdevelop.weebly.com

Rolling the dice continued 3... Add a new line. Tap on if. Tap condition. Tap dice roll. Tap = Type in 1. Your code should look like this: Created by S. Johnson - www.touchdevelop.weebly.com

Rolling the dice continued 4... Tap on do nothing. In here we will write the code which displays the artwork for dice 1. Tap on art. The art button lists all the images we have in our library. Tap on dice 1. Now lets display it on the wall. Tap on post to wall: Created by S. Johnson - www.touchdevelop.weebly.com

Rolling the dice continued 5... Now lets add the code for dice 2. We will add the next if statement directly after the else statement. Tap do nothing after the else statement. Tap on if. Tap condition. Tap dice roll. Tap = Type in 2. Created by S. Johnson - www.touchdevelop.weebly.com

Rolling the dice continued 6... Tap on do nothing. In here we will write the code which displays the artwork for dice 2. Tap on art. Tap on dice 2. Tap on post to wall: Your code should look like this: Created by S. Johnson - www.touchdevelop.weebly.com

Rolling the dice continued 7... Repeat the above steps for dice 3 to 5. Your finished code should look like this: Finally, we will write the code which displays the artwork for dice 6. Created by S. Johnson - www.touchdevelop.weebly.com

Rolling the dice continued 8... As this is the last possible number we do not need to write another if statement. Instead, we will add the code for dice 6 directly after the last else statement. Tap on do nothing after the last else statement. Tap on art. Tap on dice 2. Tap on post to wall. Created by S. Johnson - www.touchdevelop.weebly.com

Rolling the dice continued 9... Your finished script should look like this: Run your script to see what happens. Created by S. Johnson - www.touchdevelop.weebly.com

TouchDevelop My First App Challenge Created by S. Johnson - www.touchdevelop.weebly.com

Challenge Challenge 1: Add a second dice to your game and edit the script so that it adds the total of the two dice and displays the total on the screen. Challenge 2: Using the dice game as an example, create a coin toss game that will randomly pick heads or tails. Challenge 3: Using the dice game as an example, create a random name selector which will randomly pick a student from your class. Collaborate: Share your game with your classmates and see if they can improve your code. Created by S. Johnson - www.touchdevelop.weebly.com