Basic coding… with TouchDevelop!!

Slides:



Advertisements
Similar presentations
events reactive programming
Advertisements

Introduction to touchdevelop if then else conditional statement Disclaimer: This document is provided “as-is”. Information and views expressed in this.
CMPT 100 : INTRODUCTION TO COMPUTING TUTORIAL #5 : JAVASCRIPT 2 GUESSING GAME By Wendy Sharpe 1.
CS0004: Introduction to Programming Repetition – Do Loops.
Loops (Part 1) Computer Science Erwin High School Fall 2014.
Introduction to TouchDevelop
Announcements The first graded lab will be posted Sunday 2/15 and due Friday 2/27 at midnight It is brand new, so please don’t hand in last semester’s.
Screens naming screens and concepts Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL and.
Programming on the Go Chapters 1and 2 Siddharth Patel
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
Introduction to TouchDevelop
Bridges To Computing General Information: This document was created for use in the "Bridges to Computing" project of Brooklyn College. You are invited.
Do … while ( continue_cond ) Syntax: do { stuff you want to happen in the loop } while (continue_condition);
LOOPING What are the 3 structures of writing code? sequential decision repetition Def. Looping is the repetition of statements in a program. There various.
How to Create a Videogame By: Connor McCann. Java Java is one of many programming languages Java is used to run web browsers and most PC video games I.
Chapter 7 LOOPING OPERATIONS: ITERATION. Chapter 7 The Flow of the while Loop.
Introduction to touchdevelop statements overview Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including.
Introduction to Programming G50PRO University of Nottingham Unit 2 : Introduction To Scratch Paul Tennent
Programming games HTML/JavaScript basics Functions, events, forms Classwork: [Show favorite sites.] Coin toss. Homework: GET WEB SPACE. Complete coin toss.
Scripts what’s in a script – basic language concepts Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including.
Scripts what’s in a script – basic language concepts Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including.
JavaScript, Fourth Edition
Repetition. Loops Allows the same set of instructions to be used over and over again Starts with the keyword loop and ends with end loop. This will create.
Repetition Control Structure. Introduction Many applications require certain operations to be carried out more than once. Such situations require repetition.
Getting started with the turtle Find the latest version of this document at
Introduction to touchdevelop statements overview Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including.
Language Find the latest version of this document at
Chapter 7: Repetition Structure (Loop) Department of Computer Science Foundation Year Program Umm Alqura University, Makkah Computer Programming Skills.
Copyright 2006 Addison-Wesley Brief Version of Starting Out with C++ Chapter 5 Looping.
Introduction to TouchDevelop Lesson 3 – Comments & Lists Created by S. Johnson
PHY 107 – Programming For Science. Today’s Goal  How to use while & do / while loops in code  Know & explain when use of either loop preferable  Understand.
Screens naming screens and concepts v2.8 Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL.
PYTHON WHILE LOOPS. What you know While something is true, repeat your action(s) Example: While you are not facing a wall, walk forward While you are.
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.
Programming games Show work on site. Work on slide show. Timed event for bouncing ball. Homework: [Finish slide show and upload to site.] Acquire a short.
Zhen Jiang Dept. of Computer Science West Chester University West Chester, PA CSC530 Data Structures - LOOP 7/9/20161.
Chapters 13 and 14 in Quigley's "UNIX Shells by Example"
Boxes. SOUNDBOARD Objective: Tap the boxes to play sounds! Demo:
BIT116: Scripting Lecture 05
CHAPTER 4 DECISIONS & LOOPS
CSC111 Quick Revision.
BIT116: Scripting Lecture 06
CHAPTER 4 REPETITION CONTROL STRUCTURE / LOOPING
PYGAME.
Warm-up Program Use the same method as your first fortune cookie project and write a program that reads in a string from the user and, at random, will.
Programming the Web using XHTML and JavaScript
Layering: Building Functions out of Functions
Arrays, For loop While loop Do while loop
Introduction to TouchDevelop
Organizing Memory in Java
Introduction to TouchDevelop
Lecture Notes – Week 3 Lecture-2
Matlab tutorial course
Objective of the lesson
Module 4 Loops.
Program Documentation
Explain what touch develop is to your students:
Game Loop Update & Draw.
Chapter 6: Repetition Statements
Due Next Monday Assignment 1 Start early
Testing and Repetition
Announcements: Reading materials are posted on Discussion Board.
Explain what touch develop is to your students:
Building Java Programs
Chapter 4: Repetition Structures: Looping
Selection Statements Chapter 3.
Python While Loops.
Creating a Simple Game in Scratch
Programming Basics Review
Lecture 3 More on Flow Control, More on Functions,
Presentation transcript:

Basic coding… with TouchDevelop!! Let’s do some gaming! Based on Lawrence Snyder’s slides for UW-Seattle. This notice serves as permission for their use for teaching in public or private (not for profit) schools. © 2014

TouchDevelop From Microsoft Research Technical (geeky terms): An easy-to-learn platform for developers of all expertise levels to build their own video games and apps! Technical (geeky terms): A touch-first IDE built in Type Script Managed Language TouchDevelop contains a gallery of Libraries & Functions!  remember these?

Create apps with TouchDevelop

Development Support Visit touchdevelop.com for help & tutorials

The TouchDevelop Environment

Try it yourself!

T.D.’s Language The scripting language is statement oriented Statements are executed sequentially Control flow constructs include if-statements, for and while loops, and functions (actions)

Sample Script action main ( ) // Finds songs not played yet. var found := 0 var songs := media → songs for each song in songs where true do found := found + ▷ display song(song) ("Songs played with this app: " ∥ ◳ played) → post to wall ("Songs never played: " ∥ found) → post to wall private action display song ( song : Song ) returns ( result : Number ) // Post a song to the wall if not played yet and returns 1 // otherwise returns 1. if song → play count = 0 then song → post to wall result := 1 else result := 0 event active song changed ( ) // Increment song played counter. ◳ played := ◳ played + 1 event shake ( ) // Pauses and resume playing. if player → is playing then player → pause player → resume data played : Number

Overview of the program Example Functions- Main() and Shoot(): Where are the names of the functions located in both cases? between action and (…) Where are the bodies of the functions located? between “()“ and “end”

Game Loop + Stuff Order: Check out the “art” hub To Quit: Main() runs once (and only once!!) Gameloop() continues forever! Check out the “art” hub There are a lot of images, audios stored in TouchDevelop’s libraries! To Quit: Click the back button in the top corner to exit the application.

Play a TouchDevelop App!

Make sense?

Coding is ALL detail!! Remember… int defines an integer (0, 1, 2, -1, -2 …) Int or Integer are undefined Code only goes between brackets or parentheses

Make your own Flappy Bird game!

Question!

Background! Do you remember how to change the background? Type this line: wall → set background picture(✿ background) Where did it go? In between action main() and end action

Error checking … Type something wrong … and you will receive an error message:

Scopes and Variables

Variables: Declare Within the “Function Scope”

Things to try Test out all the tutorials on the site, and once you feel confident, go ahead and make your own apps!