Mr. Giansante. Alice. 3D Programming

Similar documents
Mr. Giansante. Alice. 3D Programming

Begin at the beginning," the King said, very gravely, "and go on till you come to the end

GameMaker. Adrienne Decker School of Interactive Games and Media. RIT Center for Media, Arts, Games, Interaction & Creativity (MAGIC)

CONCEPTS EXPLAINED CONCEPTS (IN ORDER)

STEP-BY-STEP THINGS TO TRY FINISHED? START HERE NEW TO SCRATCH? CREATE YOUR FIRST SCRATCH PROJECT!

Starting from LEARNER NOTES edited version. An Introduction to Computing Science by Jeremy Scott

Module 1 Introducing Kodu Basics

CS Problem Solving and Structured Programming Lab 1 - Introduction to Programming in Alice designed by Barb Lerner Due: February 9/10

Let's Race! Typing on the Home Row

Development Outcome 2

VACUUM MARAUDERS V1.0

Alice: A Visual Introduction to Programming. Chapter 1 Part 2

Creating Computer Games

No Evidence. What am I Testing? Expected Outcomes Testing Method Actual Outcome Action Required

Overview. The Game Idea

Annex IV - Stencyl Tutorial

CISC 1600, Lab 2.2: More games in Scratch

1hr ACTIVITY GUIDE FOR FAMILIES. Hour of Code

How to Make Games in MakeCode Arcade Created by Isaac Wellish. Last updated on :10:15 PM UTC

How Tall Are You? Introducing Functions

Scratch for Beginners Workbook

Kismet Interface Overview

The Beauty and Joy of Computing Lab Exercise 10: Shall we play a game? Objectives. Background (Pre-Lab Reading)

Programming with Scratch

RPG CREATOR QUICKSTART

COMPUTING CURRICULUM TOOLKIT

Chapter 1 Virtual World Fundamentals

CAPSTONE PROJECT 1.A: OVERVIEW. Purpose

G54GAM Lab Session 1

For more information on how you can download and purchase Clickteam Fusion 2.5, check out the website

To solve a problem (perform a task) in a virtual world, we must accomplish the following:

GAME:IT Junior Bouncing Ball

Editing the standing Lazarus object to detect for being freed

Instructions.

Creating 3D-Frogger. Created by: Susan Miller, University of Colorado, School of Education. Adaptations using AgentCubes made by Cathy Brand

Assignment Cover Sheet Faculty of Science and Technology

DESIGN A SHOOTING STYLE GAME IN FLASH 8

ALICE TUTORIAL. Introduction to Alice 3

Once you have chosen the water world this is how your screen should look.

Introducing Scratch Game development does not have to be difficult or expensive. The Lifelong Kindergarten Lab at Massachusetts Institute

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Kinect2Scratch Workbook

the gamedesigninitiative at cornell university Lecture 3 Design Elements

Introduction to Turtle Art

Challenge 1: Tami s World

Introduction. Overview

Chapter 1:Object Interaction with Blueprints. Creating a project and the first level

the gamedesigninitiative at cornell university Lecture 3 Design Elements

A. creating clones. Skills Training 5

Table of Contents. Creating Your First Project 4. Enhancing Your Slides 8. Adding Interactivity 12. Recording a Software Simulation 19

LESSON 1 CROSSY ROAD

Tutorial: A scrolling shooter

Princess & Dragon Version 2

Part II Coding the Animation

Kodu Lesson 7 Game Design The game world Number of players The ultimate goal Game Rules and Objectives Point of View

the gamedesigninitiative at cornell university Lecture 3 Design Elements

04. Two Player Pong. 04.Two Player Pong

Step 1 - Setting Up the Scene

Introduction: Alice and I-CSI110, Programming, Worlds and Problems

Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game

Contact info.

Meteor Game for Multimedia Fusion 1.5

Maze Puzzler Beta. 7. Somewhere else in the room place locks to impede the player s movement.

Battlefield Academy Template 1 Guide

Maniacally Obese Penguins, Inc.

Star Defender. Section 1

How Tall Are You? Introducing Func6ons

Adding in 3D Models and Animations

C# Tutorial Fighter Jet Shooting Game

Unity Game Development Essentials

Game Design Curriculum Multimedia Fusion 2. Created by Rahul Khurana. Copyright, VisionTech Camps & Classes

Clickteam Fusion 2.5 [Fastloops ForEach Loops] - Guide

GAME:IT Bouncing Ball

Cato s Hike Quick Start

Unity 3.x. Game Development Essentials. Game development with C# and Javascript PUBLISHING

While there are lots of different kinds of pitches, there are two that are especially useful for young designers:

Your First Game: Devilishly Easy

FATE WEAVER. Lingbing Jiang U Final Game Pitch

Experiment 02 Interaction Objects

Installation Instructions

Create Your Own World

BE SURE TO COMPLETE HYPOTHESIS STATEMENTS FOR EACH STAGE. ( ) DO NOT USE THE TEST BUTTON IN THIS ACTIVITY UNTIL THE END!

First Steps in Unity3D

Module. Introduction to Scratch

Using Bloxels in the Classroom

Tac Due: Sep. 26, 2012

PING. Table of Contents. PING GameMaker Studio Assignment CIS 125G 1. Lane Community College 2015

Creating Generic Wars With Special Thanks to Tommy Gun and CrackedRabbitGaming

understanding sensors

Scheme of Work Overview

2D Platform. Table of Contents

Creating a Maze Game in Tynker

Mobile and web games Development

Tutorial: Creating maze games

GAME:IT Junior Bouncing Ball

BAFTA YGD Lesson plans

The editor was built upon.net, which means you need the.net Framework for it to work. You can download that here:

Workshop 4: Digital Media By Daniel Crippa

Making Your World with the Aurora Toolset

Programming I (mblock)

Trial code included!

Transcription:

Alice 3D Programming September 2016

Table of Contents What is Alice?... 3 The Alice Environment... 4 Tutorials... 5 Example Worlds... 6 Methods and Events... 7 Kangaroo Program... 8 Continuous Motion... 9 Car Track Game... 10 Shark Program... 12 Countdown Timer... 16 Moving on a Path - Patrolling Enemy... 17 Shooting a Projectile... 18 Detecting Collisions with the Ground... 22 Sample Programs... 23 Exporting as a Video... 23 Character Builder... 24 Animating Character Motion... 25 Elements of Game Design... 26 PRINTING Please consider the environment before printing anything from this document. Pages that need to be printed are marked with a printer icon. Assignments Assignment 1: 20 Second World... 27 Assignment 2: Interactive World... 28 Assignment 4: Large Interactive World... 29 Appendices Appendix 1 - Learning Outcomes... 30 3D Programming with Alice - Table of Contents

What is Alice? Alice is an innovative 3D programming environment that makes it easy to create an animation for telling a story, playing an interactive game, or a video to share on the web. Alice is a free and open source object-oriented educational programming language with an integrated development environment (IDE). Alice uses a drag-and-drop environment to create computer animations using 3D models. Alice allows users to learn fundamental programming concepts in the context of creating animated movies and simple video games. In Alice, 3-D objects populate a virtual world and the programmer can write code to animate the objects. NOTE Alice Website From the Alice website, you can download Alice onto your home computer. You can also download additional 3D models. www.alice.org Alice was developed by researchers at Carnegie Mellon University. The project leader was the late Randy Pausch, famous for his "The Last Lecture" (look it up on YouTube). The current version is Alice 2.4 Game-maker Electronic Arts (EA) has agreed to help underwrite the development of Alice 3.0 and provide essential arts assets from The Sims - the best selling PC video game of all time. The Sims content will transform the Alice software from a crude, 3D programming tool into a compelling and user-friendly programming environment. Experts predict that when the transformation is complete, the new programming environment will be in position to become the national standard for teaching software programming. Sources: alice.org, WikiPedia.org Alice 2.0 Alice 3.0 Featuring characters from The Sims 3D Programming with Alice - Page 3

The Alice Environment World Window It shows you the world you are building. Events Area It allows you to tell Alice when to make certain objects do certain things. Object Tree It contains a list of the objects in your world. Details Area It provides more information about the world or an object in the world. Editor Area It allows you to make objects in your world do new things like move and spin. 3D Programming with Alice - Page 4

Tutorials When you start Alice, the following window should appear (you may need to click on the "Tutorial" tab). If the window does not appear, go to File New World Complete the four tutorials included with Alice. Tutorial 1 This tutorial will introduce you to the basics of Alice. Tutorial 2 In this tutorial, you will learn how to teach Alice worlds and objects how to do new things. Tutorial 3 In this tutorial, you will learn how to make Alice worlds respond to mouse clicks and key presses. Tutorial 4 In this tutorial, you will learn how to create your own scenes. 3D Programming with Alice - Page 5

Example Worlds Once you have completed the four tutorials, you should explore some of the example worlds that come with Alice. When you start Alice, the following window should appear (you will need to click on the "Examples" tab). If the window does not appear, go to File New World Example World - lakeskater This example world is a very good example of what you can do using Alice. Example World - amusementpark Use the arrow keys to navigate through the Amusement Park world. Example World - flightsimulator Use the arrow keys to turn plane left/right/up/down. Use the Space Bar to make the plane do a barrel roll. Go through all 5 rings to get a prize. Example World - snowlove This example is a good guide for the first assignment "10 Second World". 3D Programming with Alice - Page 6

Methods and Events A Method is a sequence of instructions that will be carried out when requested. A Primitive Method is a Method that characters already know how to perform. Examples: move orientto(asseenby) turn roll(direction,amount) say playsound(sound) A Custom Method is a Method that is specific to a particular object. For example, an object constructed from the Penguin class has the following custom methods in addition to the primitive methods: wing_flap jumping turn_head_right walk glide jump turn_head_left walking In addition to the primitive methods and the custom methods, it is also possible for the programmer to create their own new methods for objects. These are known as User Created Methods. An Event is some signal or action that can be detected and responded to by a program. Examples: World starts The mouse is clicked on an object The user presses a key An Event Handler is a method that performs some action when a particular event is triggered 3D Programming with Alice - Page 7

Kangaroo Program The following program will make a kangaroo jump forward three times. The first command makes the kangaroo move up (jump) up 0.5 meters. The second command makes the kangaroo move forward 1 meter. Because they are in a "Do Together" loop, the two actions will happen simultaneously. Now, we need to make the kangaroo return to the ground. The first command makes the kangaroo move down 0.5 meters. The second command makes the kangaroo move forward 1 meter. Because they are in a "Do Together" loop, the two actions will happen simultaneously. The above code, when done in sequence, will result in the kangaroo jumping forward once. The kangaroo will reach a height of 0.5 meters and will have travelled a total of 2 meters (1 meter on the way up, and 1 meter on the way down). We can repeat this process 3 times by simply placing the above code in a "Loop" structure. The motion could be made more realistic by turning the kangaroo's legs slightly when it jumps up and also when it lands. 3D Programming with Alice - Page 8

Continuous Motion This world will illustrate how to create a simple game in which the user can control a rabbit. The idea will be that the user does not have to constantly press a key to make the rabbit move, but rather that the rabbit will constantly move forward. The user will be able to turn the rabbit left or right. Create the method to turn the rabbit right... Create the method to turn the rabbit left... Create the method to constantly move the rabbit forward... Note the use of "Loop Infinity Times" as well as "Wait" Finally, create events the trigger the methods you have just created... 3D Programming with Alice - Page 9

Car Track Game - Part 1 This world will illustrate how to create a simple game in which the user can control a car which can move left or right in 5 different "tracks". Enemy vehicles will travel toward the car and the idea is to move out of their way. The tracks are numbered 1 to 5 (see below) and the car starts in track 3 (the middle one). We begin by declaring a variable named "track" in the car's properties. Create the method to move the car left... Note that if the car is already in the leftmost lane, we will not move it further left. Create the method to move the car right... Note that if the car is already in the rightmost lane, we will not move it further right 3D Programming with Alice - Page 10

Car Track Game - Part 2 We can now create the events to trigger the two new methods we created. It is important to ensure that the enemy vehicles fall exactly in the same tracks as the car. It is easiest to accomplish this using code (rather than trying to line up the enemies by eye). Below is the code to line up one of the enemies: The enemies' forward movement can be accomplished in a loop. If the ambulance crashes into the car (the centers are "within 2 meters") then the 3D Text which says "Game Over" will be made visible. 3D Programming with Alice - Page 11

Shark Program - Part 1 In this example, we will create a world with a shark that can be controlled by the user. The user will be able to turn the shark left or right, using the "left" and "right" arrow keys. The user will be able to move the shark forward, using the "up" arrow key. If the user clicks on one of the scuba divers, the shark will turn to face the scuba diver and then swim to it. Begin by creating a new world using the water template. Add one shark object (found in the "animal" category). Add four scuba diver objects (found in the "people" category). Arrange the items as indicated in the picture above. Note: You will need to move the scuba diver down into the water. Select the Shark object. Create a New Method. Name the Method "turnleft". In the shark.turnleft code area, enter the following: 3D Programming with Alice - Page 12

Shark Program - Part 2 Create a New Method. Name the Method "turnright". In the shark.turnright code area, enter the following: Create a New Method. Name the Method "swim". In the shark.swim code area, enter the following: The swimming motion could be made more realistic by having the shark's body move left and right a small amount, but for simplicity, we will not do that. Create a New Method. Name the Method "gotoobject". 3D Programming with Alice - Page 13

Shark Program - Part 3 Create a New Parameter Name the Parameter: supper In the shark.gotoobject code area, enter the following: Now, we need to create Events and link them to the Methods we have created. You will need to do this four times (once for each of the Events listed below, excluding the first one which is automatically there). 3D Programming with Alice - Page 14

Shark Program - Part 4 We will now add code to the program that will allow the shark to submerge. The [SPACE] bar will control the sharks postion. If the shark is above the water and the [SPACE] bar is pressed, it will submerge. If the shark is below the water and the [SPACE] bar is pressed, it will return to the surface. Declare a Boolean (True or False) Variable in the Shark s properties... The initial value of the variable is false since the Shark is at the surface. Create the Method to turn the submerge or surface the Shark... Finally, create an Event that will trigger the above Method when the [SPACE] bar is pressed. 3D Programming with Alice - Page 15

Countdown Timer This example shows a Countdown Timer that counts from 20 to 0 in one second increments. Add a 3DText Object to your World. In the "Properties" of the 3DText Object, set the "Text" Property to "20.0". In the "Properties" of the 3DText Object, create a new integer variable named "timeleft" and set its initial value to 20. In the "Methods" of the 3DText Object, create a new method named "countdown"... Note: To get the last line, drag the "Text" tile from the 3DText Object's "Properties". In "Functions" of the the World, drag the "[what] as a string" tile into the tile you just placed in the above step. Starting the Timer You can start the time by calling the Method "3DText.countdown". This can be done when your World starts by placing the following in the "Events" area: 3D Programming with Alice - Page 16

Moving on a Path - Patrolling Enemy Moving an object along a fixed path is often useful when designing games. Example: A guard patrolling an area. In this simple example, we will have an object (mummy01) walking a rectangular path with 18 "steps". A number variable (world.mummy01position) will keep track of the mummy's location. After each step, we will check if the mummy has collided with the IndianaJones character (the object the player controls in the game). 3D Programming with Alice - Page 17

Shooting a Projectile - Part 1 For this example, we will create a Tank Game. The user will control the tank using the left and right arrow keys and the space bar to shoot. The object will be to destroy the vehicles heading toward the tank. The Events... World.MyFirstMethod Code to position the camera above the tank and then start the tank gently rocking back and forth. 3D Programming with Alice - Page 18

Shooting a Projectile - Part 2 Tank.TurnLeft Method to rotate the Tank Turret to the left. Tank.TurnRight Method to rotate the Tank Turret to the right. world.movehumvees Moves the humvees forward toward the tank. Once a humvee is hit, it's "alive" variable is set to false and the humvee is no longer moved forward. 3D Programming with Alice - Page 19

Shooting a Projectile - Part 3 Tank.FireShell Method to position the rolling pin in the gun barrel and then move it forward in increments while checking if a target is hit. 3D Programming with Alice - Page 20

Shooting a Projectile - Part 4 tank.targetdestroyed Method to destroy a humvee (passed as a parameter) using fire. 3D Programming with Alice - Page 21

Detecting Collisions with the Ground It is often useful to determine if an object has crashed with the ground (ex. flight simulator program). The distance to function is not ideal since it measures the distance from the center of the object to the center of the ground. So, unless the object is directly over the center of the ground, it will not produce the desired effect. We need to use the distance above function. Inserting the distance above method into an If-Then statement is a bit tricky. Begin by inserting the If-Then statement. Now, insert a function from the Math category of the World's available functions into the condition part of the If-Then. Functions available in the Math category of the World's functions... Equal to Not Equal to Great Than Greater Than or Equal to LessThan Less Than or Equal to Finally, you can insert the distance above function from the object (in this case, a Blimp). The best place to insert the If-Then statement is immediately after you move the object down. The code above simply set's the Blimp object's opacity to 50% when it hits the ground. 3D Programming with Alice - Page 22

Sample Programs Open the following sample programs and play the worlds. You can view the code to determine how certain effects were achieved. Bouncing Ball.a2w Dragon Circling Castle.a2w Dragon Descends to Drawbridge.a2w Dragon Flapping Wings.a2w Dragon Shaking Head.a2w Girl Approaching Horse.a2w Girl Riding Horse.a2w Helicopter Flight Simulator.a2w Jumping Fish.a2w Marching Soldier.a2w Wizard and Trolls.a2w Exporting as a Video It is possible to export Alice worlds to video. File Export Video... 3D Programming with Alice - Page 23

Character Builder Did you know that you can create your own custom characters in Alice 3D? Just use the "hebuilder" or "shebuilder" found at the end of the "People" Gallery. If you don't see the "hebuilder" or "shebuilder" in the "People" Gallery, go to the "Edit" menu and choose "Preferences". Select the "Seldom Used" tab and check "show he/she builder in gallery". 3D Programming with Alice - Page 24

Animating Character Motion Source: J. Foley www.erain.com 3D Programming with Alice - Page 25

Elements of Game Design Game Development is the software development process by which a video game is developed. Development is undertaken by a game developer, which may range from a single person to a large business. Mainstream games are normally funded by a publisher and take several years to develop. Indie games can take less time and can be produced cheaply by individuals and small developers. The indie game industry has seen a rise in recent years with the growth of new online distribution systems and the mobile game market. Mainstream games are generally developed in phases. First, in pre-production, pitches, prototypes, and game design documents are written. If the idea is approved and the developer receives funding, a full-scale development begins. This usually involves a 20 100 man team of various responsibilities, such as designers, artists, programmers, testers, etc. Source: Wikipedia.org - Video game development Game Design, a subset of game development, is the process of designing the content and rules of a game in the pre-production stage and design of gameplay, environment, storyline, and characters during production stage. Game design requires artistic and technical competence as well as writing skills. Source: Wikipedia.org - Game design Components of a Game A game is made up of elements that work closely together. Space Compontents Mechanics Goals The look and feel of a game come from the design of its space. Compontents are the parts of your game like your avatar, blocks and enemies. These are known as "nouns". Mechanics are the actions in the game like jumping or collecting. These are known as "verbs". Players try to achieve goals to win the game. Victory Conditions - Actions that will result in a player(s) winning the game. Failure Conditions - Actions that will result in a player(s) losing the game. Rules Rules guide the player on how the game should be played. Source: GameMaker documentation, FETC 2012 Presentation. Challenge vs. Reward The best video games balance challenge and reward. Bad video games have too much challenge and/or little reward. Good video games also have "replay value". In other words, something about the game makes players want to play it many times. 3D Programming with Alice - Page 26

20 Second World Create a 20 second Alice world. A good example of what your finished product should look like is the snowlove world that can be found in the example worlds that come with Alice. However, your world should contain a minimum of 10 objects and last a minimum of 20 seconds. You must submit a storyboard for approval before starting this project. Storyboard should be 1 to 2 pages. Please fill out all the information in this column using a pen before getting this assignment marked. Name Date Class Academic Honesty The work I am submitting is completely my own creation and has not been copied from anyone else's work. If I have received help on this project, the names of those who have assisted are listed below. Storyboard / 1 Storyboard turned in Storyboard complete and accurate Production / 1 Minimum length requirement met Indicative of amount of time allotted Animation / 5 Realistically Timed Smooth Animation Animation is not limited to a few objects Things happen Simultaneously Advanced / 2 Camera Motion Object Re-sizing Complex Methods are used (example: turntoface) Sound / 1 Sound is included Comments Signature Mark / 10 philgiansante.com

Interactive World Create an Interactive Alice World. A good starting point is the flightsimulator and amusementpark worlds that can be found in the example worlds that come with Alice. The "Shark Program" example in these notes can also serve as a simple guideline. Your world should contain a minimum of 20 objects. You must submit a storyboard for approval before starting this project. Storyboard should be 1 to 2 pages. Please fill out all the information in this column using a pen before getting this assignment marked. Name Date Class Academic Honesty The work I am submitting is completely my own creation and has not been copied from anyone else's work. If I have received help on this project, the names of those who have assisted are listed below. Signature Production / 2 Storyboard turned in Storyboard complete and accurate Indicative of amount of time allotted Objectives / 2 Is the game easy to understand? Are the game controls explained? Animation / 4 Realistically Timed / Smooth Animation Animation is not limited to a few objects Interactivity / 5 The user can control the motion of an object(s) or the camera. The program responds to key presses The program responds to mouse clicks The user is given feedback Playability / 5 Is the game fun and exciting? Is there a good Challenge-to-Reward Ratio? Sound and Music / 2 Sound Effects and Background Music used effectively to enhance Game Play Comments Mark / 20 philgiansante.com

Large Interactive World Create a large interactive Alice world. A good starting point is the flightsimulator and amusementpark worlds that can be found in the example worlds that come with Alice. This is a major assignment. You will have roughly five to six weeks to complete it. Marks will be indicative of effort, time spent and quality of the finished product. Make sure you avoid... References to alcohol and drugs Scenes involving or related to sex Scenes involving or related to violence Scenes that could be hurtful to others Please fill out all the information in this column using a pen before getting this assignment marked. Name Date Class Academic Honesty The work I am submitting is completely my own creation and has not been copied from anyone else's work. If I have received help on this project, the names of those who have assisted are listed below. Signature Production / 10 Storyboard turned in Storyboard complete and accurate Indicative of amount of time allotted Objectives / 10 Is the game easy to understand? Are the game controls explained? Playability / 50 Is the game fun and exciting? Is there an appropriate ramp up of difficulty? Is there a good Challenge-to-Reward Ratio? Does the design allow for repeat play? Do interactions make sense? Are there multiple ways to solve challenges? Player Feedback / 20 Does the game provide feedback for the player such as high scores, end of level reports, etc.? Sound and Music / 10 Are Sound Effects and Background Music used effectively to enhance Game Play? Comments Mark / 100 philgiansante.com

Appendix 1 - Learning Outcomes The student will... General Demonstrate proper care of all computer equipment Demonstrate positive attitudes and work habits Demonstrate interpersonal and organizational skills Demonstrate Problem Solving Skills Make Productive Use of Time Demonstrate independence skills and only seek help when necessary The Alice Environment Place objects into the Alice World Change properties of the World Manipulate objects (size, orientation) at design time Use the Object Tree to select objects Use the Details Area to manipulate properties Use simple methods such as Move and Turn Use decision statements such as If-Else Use repetition structures such as Loop, Do Together and While Play a World Export a World to YouTube Storyboarding a multimedia project Advanced Create Methods Add a Key Typed Event Add a Mouse Clicked Event Add Mouse Clicked Details Use the Object Clicked On 3D Programming with Alice - Page 30