|
|
|
Windows Phone 7 Sensors and XNA
|
Windows Phone 7 Sensors and XNA
|
|
|
Release 1.0 (XNA V4.0)
9/15/2010
|
Overview
This tutorial set is designed for audiences where:
"You have worked with the XNA Framework API and you are interested in
programming with sensors on the Windows Phone 7 device."
More specifically, the tutorials are designed for faculty members in higher education who have
worked with XNA and are interested in including Windows Phone 7 (WP7) as part of their
courses or research programs. The tutorials are designed to illustrate the details of working with the Wp7 sensors. It is
assumed that faculty members will have their distinct requirements for
abstraction.
The tutorials do not attempt to wrap or hide the sensor APIs.
The
tutorial does not attempt to address any application-level issues (e.g., game-design, game-play), or
general issues concerning programming with the XNA Framework.
General developers in the XNA community may find the tutorials to be helpful as
an initial guide to working with the sensors on the Windows Phone 7 device.
The Tutorials:
- Development Environment: Here are the
detailed
step-by-step guide for setting up the environment to programWP7 devices.
- WP7 Development Tool access/download.
- Windows Phone Market place registration details.
- Unlocking your phone for development.
- IDE download and setup.
- XNA with WP7 Sensors: The following are 5 simple
tutorials focus on demonstrating how to work with respective sensors on the
phone. The tutorials are loosely related. However it is important to
start with the first tutorial on pinch zoom and touch panel because
all of the examples require user input and thus require knowledge in
decoding user touches or gestures.
|
Pinch Zoom and Touch Panel: the phone touch
screen
- Touch panel: press, move.
- Gesture: Tap, Drag, Pinch, Flick, etc.
|
Emulator: supports all functionality except pinch zoom.
|
|
Orientation:
portrait vs. landscape orientations
- Application locks orientation vs. user phone control.
- Portrait, left/right landscape modes.
|
Emulator: supports all functionality.
|
|
Accelerometer:
the X/Y/Z accelerometers
- Thread-save programming interface.
- Range and values of accelerometer readings.
|
Emulator: no support for accelerometer. This demo does not work on the emulator.
|
|
The camera:
camera and photo chooser tasks
- Camera and Photo Choose as separate Tasks.
- Import image and convert to Texture2D.
|
Emulator: supports all functionality. The camera on the
emulator does not take actual photographs. |
|
The GPS: GPS receiver, geo-position, and
resolving civil addresses
- Receiver setup.
- Triggered events.
- Civic address resolution (future).
|
Emulator: no support for GPS. This demo does not
work on the emulator. |
|
Bluetooth:
Not supported in First WP7 Release.
|
- A Simple Library:
A very simple library design to hide drawing and font-output details from the above tutorials.
Here is the source code to
the library.
|
- Images hierarchy: simple image with size control: selectable, bounceable, and, zoomable.
Selection and zooming supports arbitrary reference position.
- Fonts: simple output of message
- Vibrate, Song, SoundEffect
|
References and Credits
Useful WP7 Reference sites:
Useful XNA Reference sites:
Credits:
Kelvin Sung
Computing and Software Systems
University of Washington, Bothell
ksung@u.washington.edu
Project home page:
The Game-Themed Introductory Programming Project.
|
This work is supported in part by Microsoft Research under the Computer Gaming Curriculum in Computer
Science RFP, Award Number 15871 and 16531, and Microsoft Higher
Education.. |
|
9/15/2010
|
The Imagine Cup Game Design round 1 deadline is Oct 15th. Imagine Cup Game Design competition is an opportunity for your students get an amazing game design and development experience (plus an opportunity for a free trip and prizes).
See www.ImagineCup.com for details.
|