game development with touchdevelop

29
Sage Franch | @theTrendyTechie Building a Game with TouchDevelop

Upload: sage-franch

Post on 18-Jul-2015

149 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Game Development with TouchDevelop

Sage Franch | @theTrendyTechie

Building a Game with

TouchDevelop

Page 2: Game Development with TouchDevelop

Meet Sage Franch | @theTrendyTechie

• Technical Evangelist– Interfacing with developers

– Bringing Microsoft’s technology to you!

• Proud geek and “Trendy Techie”– Find me online at my blog trendytechie.ca

• Advocate for equality in technology

• Student at Dalhousie University

Page 3: Game Development with TouchDevelop
Page 4: Game Development with TouchDevelop

Why TouchDevelop?

• It’s a snap to learn.

• You learn coding concepts without worrying about semantics.

• It makes building mobile games and apps easy.

• It runs on anything (laptop, desktop, tablet, phone).

• You can share your code and creations with friends.

• It’s free

• All you need is a browser.

Page 5: Game Development with TouchDevelop

Which browsers can I use?

• TouchDevelop is supported on the latest versions of most

browsers.

• To avoid a delay in your classes, make sure ahead of time that

the browsers are updated

• For a full list of supported browsers, see here:

https://www.touchdevelop.com/app/current.browsers

Page 6: Game Development with TouchDevelop

The Agenda

• TouchDevelop tour

• Important Coding Concepts:– Objects, Functions and Parameters

– Variables

– The TouchDevelop coordinate system

– Conditional statements

– On every frame

– Loops

• Play time! :D

• Resources for teaching and learning

Page 7: Game Development with TouchDevelop

touchdevelop.com

TouchDevelop Tour

Page 8: Game Development with TouchDevelop

build

testsave

sign in

Page 9: Game Development with TouchDevelop

build

testsave

sign in

Page 10: Game Development with TouchDevelop

What You Need to Know

Important Coding Concepts

Page 11: Game Development with TouchDevelop

Objects, Functions and Parameters

object function parameter

• Object: a representation of something in the game

• Function: performs an action on the object it is associated with

• Parameter: specifies the value of the function

Page 12: Game Development with TouchDevelop

Variables

• A variable holds data that can be used throughout a script.

• Every variable has a name, a type, and a value.

• A variable’s type describes the kind of data the variable can hold.– For example: A number, a string, a sprite

• In TouchDevelop, a variable’s type is determined when it is

initialized.

Page 13: Game Development with TouchDevelop

The TouchDevelop coordinate system

(0, 0) x axis

y axis

yIN

CR

EASIN

G1

2 3

4 5

6 7

Page 14: Game Development with TouchDevelop

Conditional Statements

A conditional statement is special code for making decisions based

on some condition.

So what’s a condition? Anything statement that can be either true

or false.

If I am hungry, then I eat.

The action taken if the condition is false.

The action taken if the condition is true.

Otherwise, I sleep.

The condition. (It’s either true or false.)

Page 15: Game Development with TouchDevelop

In code, conditional statements are also called if-then-else statements

Condition

Code to execute if the condition is true goes here.

Code to execute if the condition is false goes here.

Page 16: Game Development with TouchDevelop

BUT you have to pay attention to when the condition

is checked…

Page 17: Game Development with TouchDevelop

Computer games are a series of very fast frames

Frame 1 Frame 2 Frame 3

Frame 4 Frame 5 Frame 6

Page 18: Game Development with TouchDevelop

A game frame-by-frame

Page 19: Game Development with TouchDevelop

Use “on every frame” to perform checks continuously

Page 20: Game Development with TouchDevelop

Loops

A loop is a special tool in coding

that lets us write code once and

repeat it as many times as we’d

likeRepeat the following block of code X times:

End of repeated block

You get to specify this value.

Whatever code you put here

gets repeated X times.

Tells the program that any

code after this isn’t part of the

code to be repeated.

Page 21: Game Development with TouchDevelop

The syntax for a loop…

The number of times the code is repeated.

The code that will be repeated.Tells the program that any

code after this isn’t part of the

code to be repeated.

Page 22: Game Development with TouchDevelop

aka.ms/jetpackstarter

Let’s play!

Page 23: Game Development with TouchDevelop

So how do I get started?

It’s easy!

1. Go to http://www.touchdevelop.com

2. Click .

3. And .

Page 24: Game Development with TouchDevelop

Resources for Teaching and Learning

Page 25: Game Development with TouchDevelop

Two Recommended Formats

One-Day Event

• Provide students with a “half-

baked” game to fix and customize

• Jetpack Jumper prompted tutorial

• Estimated time: 2 hours maximum

Multi-Day Event

• Build a side scroller game from

scratch

• Use CODExist MVA as reference

• Estimated time: 6-12 hours

(flexible)

Page 26: Game Development with TouchDevelop

Pre-course checklist

• Will you provide students with devices or will they bring their

own?

• Do you have a reliable internet connection?

• If the students will be watching videos or working with tutorials,

have you asked them to bring headsets?

Page 27: Game Development with TouchDevelop

When teaching TouchDevelop

• Emphasize the excitement of coding

• Be prepared to handle students with different levels of coding

experience

• Make sure to leave time for customization

• Encourage students to share their games, both in show-and-tell

in person and online on social media

• Provide NEXT STEPS – how can they continue once the program

is over? Publish their game to app stores, build more games, etc.

Page 28: Game Development with TouchDevelop

TouchDevelop Resources

• Jetpack Jumper Tutorial with prompts: aka.ms/startcoding

• “Broken” Jetpack game without prompts: aka.ms/jetpackstarter

• Complete Jetpack Jumper: aka.ms/jetpackcomplete

• Hour of Code video: http://channel9.msdn.com/events/Hour-of-

Code/2014/LearningToCode

• CODExist: The Birth of Bot course on Microsoft Virtual Academy

(build a side scroller game from scratch):

http://www.microsoftvirtualacademy.com/training-

courses/codexist-the-birth-of-bot

Page 29: Game Development with TouchDevelop

Sage Franch

@theTrendyTechie

[email protected]

Adarsha Datta

@AdarshaDatta

[email protected]