1 TouchDevelop Chapter 8-10 Presenter: Jing Xu. 2 Outline Interactions Game Board Tiles and Printing.

Slides:



Advertisements
Similar presentations
Understanding an Apps Architecture ASFA Computer Science: Principles Fall 2013.
Advertisements

physics engine + graphics
Touchdevelop api api: location & maps show geo locations Disclaimer: This document is provided “as-is”. Information and views expressed in this document,
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.
® Microsoft Office 2010 Browser and Basics.
TouchDevelop Chapter 5-7 Chapter 5 Audio Chapter 6 Camera, Graphics and Video Chapter 7 Sensors Mengfei Ren.
Chapter 6 Photoshop and ImageReady: Part II The Web Warrior Guide to Web Design Technologies.
Microsoft Word 2010 Lesson 1: Introduction to Word.
Introduction to TouchDevelop
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
1 Chapter 12 Working With Access 2000 on the Internet.
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
Digimap Carto is an advanced version of classic but with many more options. You need to return to the Digimap home page and this time select the “Digimap.
Service Definer Roles NHS e-Referral Service
Chapter 1 Getting Started With Dreamweaver. Explore the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
Browser and Basics Tutorial 1. Learn about Web browser software and Web pages The Web is a collection of files that reside on computers, called.
CHAPTER 3&4 ZHONGWEI LI TouchDevelop Book. What are we covering Review of Chapter 1-2 TouchDevelop as a scripting language: actions, events, table and.
COMPUTER TERMS PART 1. COOKIE A cookie is a small amount of data generated by a website and saved by your web browser. Its purpose is to remember information.
Creating Web Page Forms
How the World Wide Web Works
DEMONSTRATION FOR SIGMA DATA ACQUISITION MODULES Tempatron Ltd Data Measurements Division Darwin Close Reading RG2 0TB UK T : +44 (0) F :
Programming on the Go Chapters 1and 2 Siddharth Patel
Adobe Forms THE FORM ELEMENT PANEL. Creating a form using the Adobe FormsCentral is a quick and easy way to distribute a variety of forms including surveys.
GAME:IT Junior Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
DE&T (QuickVic) Reporting Software Overview Term
Introduction to TouchDevelop
Tutorial. What is Instagram? Instagram is a free, online photo sharing, video sharing and social networking service that enables users to take pictures.
GAME:IT Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
In addition to Word, Excel, PowerPoint, and Access, Microsoft Office® 2013 includes additional applications, including Outlook, OneNote, and Office Web.
Microsoft Office Outlook 2013 Microsoft Office Outlook 2013 Courseware # 3252 Lesson 3: Working with People.
COMPREHENSIVE Windows Tutorial 4 Working with the Internet and .
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
Windows Tutorial 4 Working with the Internet and
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
1.Getting Started 2.Modifying Design 3.Page 4.News 5.Events 6.Photo Gallery 7.Newsletter Index Training 15 th Mar., 2011.
 The World Wide Web is a collection of electronic documents linked together like a spider web.  These documents are stored on computers called servers.
1 of 8 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
Chapter 5: Windows and Frames
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
IT Services Getting Started on your iPad Created by Michael Mackenzie.
RM Monitor and RMAlerts Installation, Setup, and Requirements January 23, 2010 John Raffenbeul presented this live via an internet connection. These slides.
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.
Chapter 1 Getting Started With Dreamweaver. Exploring the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
FriendFinder Location-aware social networking on mobile phones.
FriendFinder Location-aware social networking on mobile phones.
FriendFinder Location-aware social networking on mobile phones.
Quick Test Professional 9.2. Testing Process Preparing to Record Recording Enhancing a Test Debugging Running the Test and Analyzing the Results Reporting.
Easy WP Guide V2.6 for WordPress 3.8. easywpguide.com Adding Tags within your Post Adding Tags whilst editing your Post, will automatically assign those.
JQuery Events, Mobile Events, and Page Events CIS 136 Building Mobile Apps 1.
Downloading the App 1 Go to the right store. Access the App Store on iOS devices, the Play Store on Android, and for a.
Office 2013 and Windows 8: Essential Concepts and Skills Microsoft Office 2013.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
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
Collision testing. learning targets Increase awareness of the struggles that of game development; Recognize computer science elements for game logic;
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
Boxes. SOUNDBOARD Objective: Tap the boxes to play sounds! Demo:
Game development.
Section 17.1 Section 17.2 Add an audio file using HTML
Learning Objective LO: We’re learning to understand when it is appropriate to use particular data types.
1. Download the Instagram app
Explain what touch develop is to your students:
Explain what touch develop is to your students:
Shelly Cashman: Microsoft Windows 10
Presentation transcript:

1 TouchDevelop Chapter 8-10 Presenter: Jing Xu

2 Outline Interactions Game Board Tiles and Printing

3 Interactions SMS messages Social messages Calendar and appointments Contacts Locations, places, maps s Phone Calls 2D barcodes

4 SMS messages SMS is an abbreviation for Short Message Service. The TouchDevelop API allows a script to generate an SMS message ready for transmission but it will not actually send it. Demo: SMS(phone)

5 Social messages Several websites, including Twitter and Facebook in particular, provide the ability to post messages for other people to read. The TouchDevelop API provides facilities for downloading such messages and for posting new messages. Demo: SocialMessage

6 Calendar and appointments The Windows phone provides a calendar where each day’s schedule, comprised of various meetings or appointments, is recorded. A TouchDevelop script has read-only access to the phone’s calendar and can retrieve all the appointments for a specific range of times. Demo: Calendar(phone)

7 Contacts Each contact contains several fields. All fields except for the name are optional. We can use the API to access and change the list of contacts. When some part of the contact’s information has been changed, the updated contact may be saved back to the phone’s contact list by using the social→save contact method.

8 Locations&Maps A location can be created or described by using the methods of the locations resource.

9 Locations&Maps(Cont.) In addition to the methods provided by the locations service, location values can be obtained from several other sources. Here is a list of the possibilities. – senses → current location – senses → current location accurate – maps → directions – location method of the Link datatype – center method of the Map datatype – location method of the Message datatype – location method of the Picture datatype – location method of the Place datatype Demo: Locations(phone)

10 s A TouchDevelop script can prepare an message ready for transmission, but it does not actually send it. Demo: (phone)

11 Phone Calls A script can prepare for a phone call by setting up the number and transferring control to the phone’s software for making the call. Demo: Phone(phone)

12 2D barcodes TouchDevelop provides access to the Microsoft Tag service which generates two- dimensional barcodes for text messages and for URLs.

13

14 Game Board Introduction Board Datatype Sprite Datatype Sprite Collection Datatype Touching and board event Debugging game

15 Sprite Sprites are 2D bitmaps that are drawn directly to the screen. Sprites are commonly used to display information such as health bars, number of lives, or text such as scores. TouchDevelop allows creation and use of several types of sprite, such as ellipse, rectangle, text and picture.

16 Game program structure The game loop event is triggered approximately every 50 milliseconds

17 The Board datatype

18 Methods of Board datatype: appearance

19 Sprite Sprites are associated with particular game boards and are created by methods of the Board type

20 Methods of Board datatype: creating / accessing sprites

21 Obstacles and boundaries Obstacles are walls that can be added to the board Walls cannot be moved once created. Moving sprites which encounter an obstacle will bounce back with a speed determined by the product of the obstacle’s elasticity and the sprite’s elasticity.

22 Methods of Board datatype: obstacles / boundaries

23 Forces and animation A uniform force can be applied to all sprites on the board. The force need not remain constant.

24 Methods of Board datatype: forces / animation

25 Demo MovingBall(phone)

26 Springs A spring can be added between two sprites to make them accelerate towards each other. The force of the spring is proportional to the distance between the two sprites. The further they are apart, the stronger the force. Demo: CreateSpring

27 Anchors One way to produce an unmovable sprite is to set its friction to 1. An alternative possibility is to use an invisible anchor sprite. The create anchor method creates the invisible sprite with its friction set to 1.0.

28 The Sprite datatype Sprites are movable objects which visually represent parts of a game.

29 Position and motion A sprite has a current position and a current angular orientation. Both of these change at rates determined by the sprite’s speed and its angular velocity.

30 Methods of Sprite datatype: mass, friction, elasticity Demo: CreateSprite

31 The Sprite Collection datatype When writing simple games with multiple objects of the same kind (e.g. multiple shots, missiles, etc.), it quickly becomes necessary to group related sprites into collections. A Sprite Set is an ordered set. A value can appear at most once in the set. The elements of the set are ordered by their index positions.

32 Touching and board events These events are triggered when the user touches the screen and taps, swipes or drags a finger across the board.

33 tap board event The tap board event fires if there is tap anywhere on the board except on a position where a sprite is located. The tap board event has two parameters x and y which give the position where the tap occurred. Demo: TapBoard

34 swipe board event The swipe board event is similar, except that the event code is passed four parameters. The first two show where the swipe started and the second two show the extent of the swipe in the x and y dimensions. Demo: SwipeBoard

35 tap sprite in XXX event Tap events can be provided for sprites held in different sprite collections. Demo: TapinXXX

36 swipe sprite in XXX event The swipe sprite event is similar to the tap sprite event, except that one’s finger is swiped across the screen and the extent of the swipe is passed as two additional parameters.

37 drag sprite in XXX event A drag event does not wait for the finger to be lifted from the screen, as with the tap and swipe events. It fires while one’s finger is still on the screen. It will repeatedly fire while the finger is in motion across the screen. Demo: TapinXXX

38 tap sprite SSS, swipe sprite SSS, drag sprite SSS We can also have events associated with an individual sprite. The sprite must be promoted to be a global data variable

39 Debugging games If debug mode is on, the board will display the position and speed of a sprite next to the sprite content. Additionally, the width and height is displayed as a box around the sprite. Also, in debug mode, even invisible sprites are displayed. Demo: SwipeBoard

40 Tiles Pinning the tile simply means creating a tile on the home screen Tiles always have a front side; they optionally can have a back side. When there is both a front side and a back side, the phone’s software randomly flips the tile over to show the other side.

41 Tiles A tile can be associated with an action in a TouchDevelop script. If the script contains more than one publicly visible action, there can be more than one tile for the script.

42 General steps Create the action which is to be invoked when the tile is tapped. The action need not contain any code at this point. Run the action to its conclusion. When the action has finished, a row of icons appears across the bottom of the phone’s screen. One of the icons is a pushpin. This icon should be tapped.

43 Programming the tile’s content A new global data item. It has the name XXX tile. Demo-SMS(phone)

44 Printing via a home server A home network may include one or more printers. These printers would normally be attached to the network via their WiFi capabilities.

45 Two API for connecting to a printer The TouchDevelop script provides two API methods for connecting to a printer.

46 References [1]

47 Questions?

48 Thank you!