Week 1 - Introduction and Objects

Slides:



Advertisements
Similar presentations
Summer Computing Workshop. Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs.
Advertisements

Events Chapter 7. Interactivity The real world is interactive User determines order of actions instead of programmer.
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 18 – Macromedia Flash MX 2004: Building an Interactive Game Outline 18.1 Introduction 18.2 Object-Oriented.
SE320: Introduction to Computer Games Week 8: Game Programming Gazihan Alankus.
Scratch Understanding some programming techniques using Scratch Resetting, Parallelism and Events.
Programming Games Computer science big ideas. Computer Science jargon. Show virtual dog Homework: [Catch up: dice game, credit card or other form.] Plan.
Tutorial for Arrays and Lists By Ruthie Tucker. Description This presentation will cover the basics of using Arrays and Lists in an Alice world This presentation.
Introduction to Scratch!
DIGITAL GAME PROG I Large-Scale Design Process Part 2.
Review For Test Chapter 4 & 5 Test is Wednesday, January 27th.
Learning Unity. Getting Unity
Microsoft® Small Basic Collision Detection Estimated time to complete this lesson: 1 hour.
Game Maker Terminology
Piñata Game: Keeping Score in Alice By Maggie Bashford Professor Susan Rodger Duke University July
STAGE 16: FLAPPY. OBJECTIVES  Match blocks with the appropriate event handler  Create a game using event handlers  Share a creative artifact with other.
Lesson 3: Arrays and Loops. Arrays Arrays are like collections of variables Picture mailboxes all lined up in a row, or storage holes in a shelf – You.
CHAPTER 14 Classes, Objects, and Games XNA Game Studio 4.0.
Video Game Package Intro 1 Last Edited 1/10/04CPS4: Java for Video Games Introduction.
Tank Game Part 3 of 6. Secondary Weapons and Pick ups Pick ups will appear randomly in the battle area and can be collected by driving into them. Each.
Programming in Alice IT-IDT-9 Design, develop, test and implement programs using visual programming. 9.1 Utilize drag and drop software to develop programs.
PaintPictureBoxDemo Refers to the PaintPictureBoxDemo Visual Basic Program Included With The Lecture.
World of Wokcraft The very best in Single pan cooking themed fantasy gaming!
World of Wokcraft The very best in Single pan cooking themed fantasy gaming!
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
School of Computer Science Space School 2015 Programming a Lunar Lander Game.
Student Workbook Work through this booklet to complete tasks and even a whole game! Check for video tutorials on Passmarc – Academic Links / eLearning.
Scratch Programming Cards
Sound and more Animations
Visual Basic.NET Windows Programming
With and The Sims are a registered trademark of Electronic Arts, Inc
Object-Orientated Programming
Large-Scale Design Process
An Introduction to Alice (Short Version)
Mrs. Tracy Moricone Game Design Project 3
Learning to Program D is for Digital.
FOP: Buttons and Events
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.
How to work with your sprite
Introduction to Google Tag Manager
Sphero CPD 9.30 – 11am Introduction to Sphero 11 – 11.15am
Control Structures
Introduction to Events
Learning to program with Logo
Learning Java with Alice 3.0 Game Design Kathy Bierscheid
Learn… Create… Program
Scratch – Simple Programming
GAMESTAR MECHANIC JR Video Game Design Unit.
Alice Variables Pepper.
Character-A-Palooza:
Go to =>
Learn… Create… Program
Functions, Regular expressions and Events
Program Documentation
Go to =>
Getting Started with Physical Computing
JavaScript objects, functions, and events
Tutorial for Arrays and Lists
Learn… Create… Program
Learn… Create… Program
Creating a Simple Game in Scratch
Game-Based Online Safety!
Web Programming and Design
CSC 221: Introduction to Programming Fall 2018
So you want to be a Game Designer
Web Programming and Design
Web Programming and Design
Goal Space Parts Rules Mechanics Space – Where the game takes place
under the direction of Professor Susan Rodger
Presentation transcript:

Week 1 - Introduction and Objects Game Design Week 1 - Introduction and Objects

Competition! Your Hero Broad theme, be creative The more creative and interesting your take, the better Focus will be on design and ideas, not programming

What is a game?

What is a game? A game is an activity played using a sets of rules There are many types of games Board games Video games Card games Word games Sports General concepts apply across the board for games We’ll be focusing on mechanics as we start out

Game General Concepts Games (especially video games and board games) can be made up of any number of a few different elements: Mechanics Visuals Narrative Games will ALWAYS have mechanics, but not always visuals or narrative, and are always interactive in some way We’ll be focusing on mechanics as we start out

Game Mechanics So let’s talk about game mechanics Can someone give me an example of a game mechanic?

What are mechanics? Rules that together form the constraints and functionality of the game Defines how things like combat, interactions, etc work Mechanics are the absolute core of any game

What games do you play? What mechanics does the game have? Your examples? What games do you play? What mechanics does the game have? So let’s talk about game mechanics Can someone give me an example of a game mechanic?

Breaking down mechanics Breaking blocks in Minecraft

Breaking down mechanics Breaking blocks in Minecraft Player clicks the left mouse button (click event) Character’s arm punches (animation) Character’s arm checks to see if it’s hitting a block (collision detection) If block is being hit, it starts to break (damage) When click is held down, this repeats until the block takes enough damage to break Let’s break down breaking down So what does this rely on? Tamara talked about events in web

Let’s look at the elements Player Character Character skin Animations Interactions from events Movement, punching, placing blocks Block Type Texture Damage limit How do we define these things in code? These have loads of parameters associated with them. There are loads of block types with different textures, uses and damage limits We can’t define those with the code we know right now, so how do we do it?

Objects

What is an Object? In real life, an object can be anything! (seriously) All objects in the world have properties - for example, a car has a color, weight, max speed, and loads of other stuff Some objects have methods - like functions or actions - for example, a car can start, drive, break, etc Lets think about what our car object needs as an example

The Base Object We use objects in games when we want to create a sort of “model” of how something should be described For example, a “car” is made up of a main body with 4 wheels that can drive, stop, and change directions These details remain the same, regardless of the car, but other things like the color, size, speed etc can change Lets think about what our car object needs as an example

The Base Object A JavaScript object is essentially a collection of: Properties; variables with values that describe aspects of the object, and Methods; functions which describe what actions the object can take, or what it can do Lets think about what our car object needs as an example

Object Properties Name: Tesla Roadster Color: Red Year: 2019 Top Speed: 250+mph Name: FIAT 500 Color: White Year: 2008 Top Speed: 120mph Now we can use our new constructor function to create different cars, using the same properties! We just add in the values we want to use in the arguement list for the constructor

Objects can be written like variables, but use { } Each property take the form of ⇒ property : value Lets think about what our car object needs as an example

Working with Properties The values of properties can be accessed using object.property What will the following give us: car.name car.weight Lets think about what our car object needs as an example

Adding an object Method Lets think about what our car object needs as an example

Working with Methods Methods can be easily run from objects using object.method() So what do you think will happen if we say car.drive()? HINT: In JavaScript, the thing called this, is the object that "owns" the method/property. Lets think about what our car object needs as an example

Other ways of creating objects Lets think about what our car object needs as an example

Other ways of creating objects Lets think about what our car object needs as an example

Other ways of creating objects Lets think about what our car object needs as an example

Useful Links W3Schools Javascript Objects https://www.w3schools.com/js/js_objects.asp W3Schools Javascript Object Constructors https://www.w3schools.com/js/js_object_constructors.asp