Computer Camp 2006/Notes

From MCIS Wiki

Jump to: navigation, search

Contents

Monday

Starting Out

  • Get waivers
  • Goals of the camp
  • Introductions
  • Review camp schedule
  • Explain policies:
    • Using the school computers
    • Wiki usage and posting your work
    • Breaks at 10 and 3
    • Snacks

Programming

  • Work in teams closely with faculty / students
  • Work in pairs or individually
  • Experiment if you want - we can help you do more advanced work if things are going slow for you
  • Goals:
    • Learn the basics of programming
    • See how math is used to build games
    • Understand how to build mathematical models of real world physics
    • Construct objects that live in the video game env: models, music, textures
    • Goal is not just to build games - it's to understand what goes into the process

What is a game engine?

  • About Panda 3-D
  • About game development: art vs programming (logic)
  • Limitations of our software - what we can't do easily
  • Point out the games in the samples directory
  • Side note: what is "open source" software?

What is a programming language?

  • Communicating with a computer
  • About Python
  • About Reactive programming - functions of time (RPanda)
  • About Haskell
  • Programming in "regular Panda" vs programming in RPanda

What is a progam development environment?

  • Helps edit the program
  • Runs the program
  • Debugging
  • Compile errors vs runtime errors
  • Explain Eclipse
  • Mention that programs stay on the machine you're using

How to run a program

  • Make a new project (will keep this throughout camp)
  • Make a .py file
  • Run a simple console application
 print "Python"
  • Add another line:
print 1+1
  • Introduce an error:
print (1+

Programming in RPanda

  • Explain Panda boilerplate
from Panda import *
begin()
  # Your program goes here
start()
  • Example: 1 bear
pandaBear(position = P3(0,5,0))
  • Example: 2 bears or other models

Programming languages

  • Syntax: constants (numbers, strings, points, ...), keywords, punctuation
  • Naming
  • Types
  • Examples: some syntax errors, some type errors, using naming, problems in naming

The 3-D Coordinate System

  • Basic axis orientation
  • The "P3" notation
  • Camera position
    • Example: the bear with camera at different places
    • Example: mouse control of the camera
  • Using the mouse to control the camera

Reactive Values

  • What is a reactive value?
  • Using "time" to get motion
    • Example: the bear in motion
    • Example: two bears in motion

Building a world

  • Object names
  • Setting the object position
  • Setting the object scale
  • Kinds of models:
    • Standing
    • Flying
    • Sky
    • Scenery
    • Look in the "models.py" file to see how this is done.
  • Default object orientation and size

Orienting Models

  • What is HPR?
  • Examples of moving H, P, and R on the bear
  • Example: move these at different rates
  • Setting the HPR of the camera

Sliders

  • Configuration parameters on a slider (min, max, init, position)
  • 2-D vs 3-D position
  • Control the bear position with sliders
  • Control bear HPR with sliders
  • Demonstrate the program to fit models

Text Objects

  • Note that text is reactive
  • Using String and +
  • Formatting
  • Setting the text color
  • Example:
    • Setting H, P, and R with sliders and text on the screen

Circular Trajectories

  • Periodic functions: sine and cosine
  • What are radians?
  • What is the amplitude
  • Using sine and cosine to set a circular trajectory
  • Vector addition: recentering a trajectory
  • Setting the heading to keep the bear pointed straight

Definition

  • Defining a common value
  • Defining a reactive value
  • Example: setting the rate
    • Example: three different bears reacting to the same HPR
  • Function definition syntax: arguments and return
  • What parameters are for
    • Example: Bears in a line.

Colors

  • Defining a color on the computer
  • Setting the background color
  • Setting the color attribute of a model
  • Built-in color names
Personal tools