interactive scripting - CGR C/092 - fall 2004
Philip van Allen - v a n a l l e n @ a r t c e n t e r . e d u

room 142, Monday 4:00pm-7:00pm
all materials on this web site © copyright 2004, Philip van Allen
 
week 01a - interaction design, scripting approach, resources, first scripts

assignments : 

 

 




reading:

  • preface "What can ActionScript Do?" xxvii - xxxi
  • pages 3-17

coding:

  • do the "first script" from 01b again from scratch

review:

  • if you are not up on Flash, go over the flash overview, these sections:
    • Basic Features
    • Tweening
    • Importing Images



interaction design : 
and scripting : 

scripting is becoming an essential part of interaction design

The time is approaching when professional interaction designers will need a basic understanding of programming concepts. More and more, quality projects will have interactions so rich that that the designer will need to plan the "logic" that makes up the design. While it's tempting to leave the logic to "the programmer," interaction logic is an integral part of the project experience and the designer should take a lead role in defining how it works.

Of course, interaction designers don't need to know how to program C++ or be computer scientists. But as we move beyond print-on-the-screen web sites, and standarize on database-driven, dynamic, responsive...interactive media, those who want to design the user activity and context will need a conceptual foundation in the logic, practice, and "composition" of interaction. The best way to understand the medium is by building interactive experiences with scripts.

Being able to think in this interaction logic is not a "skill" like learning Photoshop, but a conceptual discipline like visual design. Creating the interaction logic approach is a part of the problem making process of interactive design ideation, as important to a project as developing a visual concept, creating a theme, or defining the audience.

 

 
interaction design issues : 

what are some ways scripting can be used?

Creating rich interactive experiences often requires the use of scripting. Some of the design problems scripting can help solve include:

  • responsive navigation
    • interactively reveal information within one page
    • animated navigation elements - e.g. pop out menus
    • automatically change navigation depending on context
    • tracking what the user had seen
  • custom applications that adapt to the user
    • change content & form based on user preferences
    • change images or other elements randomly
    • change behavior in response to user actions - e.g. games
    • create dynamic juxtapositions
    • display automatic browsing systems
  • dynamic and responsive visual and audio elements - the audio/video experience is active rather than static
    • interacts with the user - e.g. hovering tool-tips, audio follows level of interaction
    • has random elements - e.g. imagery created algorithmically
  • storing, processing, and retrieving information
    • take user input - e.g. forms
    • make queries into a database - e.g. searches, product information
    • display content dynamically from a live database
    • present and synthesize information based on user preferences and history - e.g. amazon recommendations
  • technical and production problems
    • load content as needed rather than all at once - e.g. faster loading Flash presentations
    • automate page creation - e.g. dynamic web pages
  • game play & advanced interactions
    • scoring
    • moving graphics on the screen
    • detecting when graphics collide
    • giving behavior to graphical objects
    • controlling audio and visuals depending on the action

 

 

approach to scripting : 

It's a discipline, not an application

Scripting is a discipline and way of thinking that takes some time to master, just like any aspect of design. And while there are some "rules" of scripting, it is impossible to create scripts of any sophistication by simply following the rules.

"learning to program is a process, not an event" - Colin Moock

Scripting is a creative process that is not so different from visual design. It requires:

  • understanding the medium
  • understanding the project goals and audience
  • developing a concept
  • defining the design problem
  • finding coherent solutions that communicate well

Unlike visual design, scripting requires a very logical, precise, linear approach. Everything must be broken down to the minutest detail or the project simply won't work. It requires:

  • breaking down the problem into all of it's parts
  • coming up with elegant solutions to each part of the problem, then integrating those solutions
  • making code solutions in exact detail so the computer knows what to do
  • testing each part, and fixing syntax and logical problems
  • building the parts into a whole
  • testing and debugging the whole system

For example, suppose you wanted to move a bird across the screen with software instead of tweening in Flash. You might have to deal with the following questions when writing a script:

  • what is the name of the bird graphic?
  • where should it start on the screen?
  • how many pixels should it move each frame?
  • what direction should it move and how is that translated into pixels?
  • what should happen when the bird reaches the edge of the screen? where are the edges of the screen in XY coordinates?
  • how does the user tell the bird to start/stop moving?

With answers to these questions, you then create an exact and complete set of logical instructions for the computer to follow at each moment during the interaction. Usually, this involves:

  • do some initialization to set things up
    • e.g. position the bird at its starting point
  • execute the necessary steps over and over again, plus check for special conditions
    • e.g. move the bird object by 10 Y pixels and 15 X pixels
    • did the bird hit the edge of the screen? if so, make it fly in the opposite direction
  • check for user input
    • did the user ask to start or stop the bird? If so, respond
  • terminate and clean up
    • stop moving the bird, and save the last location of the bird for the next time

Some things to keep in mind when scripting:

"Think of programming a computer like talking to a child: take nothing for granted, be explicit in every detail, and list every step that's necessary to complete a task." - Colin Moock

  • successful coding depends on breaking down the problem and understanding it completely. only then can you tell the computer what to do, because...
  • computers are incredibly stupid--you have to tell them everything in excruciating detail
  • simple typos can cause the whole program to stop working--always check your spelling and punctuation
  • code almost always has bugs the first time, so expect them and learn how to find and fix bugs
  • think of all the possible scenarios that might come up...and code for them
  • most times, the best way to start is by looking at some existing code that does a similar task. then modify the code to do what you want. copying code is standard practice!
  • try out each part of the problem in a simple case--don't try to solve the whole thing all at once.
  • experimentation is the key--you can't break the computer
  • once you have something working in principle, you may want to recode it in a cleaner way

 

 

all materials on this web site © copyright 2004, Philip van Allen

top