wiki:Projects/Winter

Final Project - Winter

Completed 12/11/2003.

Project Overview

This program is an interactive outdoor winter scene.

Interaction

There are two main modes of interaction -- on foot and on a sled.

To detect mouse motion, the cursor is locked inside the window. To free the cursor, press the escape key. To regain focus, click inside the window.

  • Common Controls
    • Keyboard
      • a/s/d/w = Move left/back/right/forward.
      • q/e = Turn left/right.
      • o = Get into or out of the sled.
      • x = Exit.
      • escape = Free the cursor.
    • Mouse
      • Left click = Throw a snowball, or just regain focus if the cursor was freed.
      • Middle click Get into or out of the sled.
    • On Foot
      • Mouse
        • Motion = Look around or turn.
        • Right click = Jump.
    • On Sled
      • Mouse
        • Right button (hold it) = Let go and let gravity move the sled.
      • Keyboard
        • Space (hold it) = Let go and let gravity move the sled.

Files (.h files pertain to relevant .cpp or .hpp files)

  • README - This
  • winter - The Linux binary
  • winter.exe - The Windows binary
  • Makefile - 'make' to build in Linux
  • Makefile.cygwin - 'make -f Makefile.cygwin' to build in Cygwin
  • cabin.cpp - Displays a log cabin, complete with a fireplace and smoke
  • cabin.h
  • clock.cpp - Used to maintain constant motion despite frame rate
  • clock.h
  • data - Contains images
  • main.cpp - User interface, displace, etc.
  • makesled.pl - Used to generate part of sled.cpp
  • matrix.h
  • matrix.hpp - An NxN matrix class
  • movingobject.cpp - An object with a velocity
  • movingobject.h
  • object.cpp - A position and rotation
  • object.h
  • random.cpp - Generate random numbers
  • random.h
  • sled.cpp - Draws a toboggan
  • sled.h
  • snowfall.cpp - Draws textured triangles falling from the sky
  • snowfall.h
  • terrain.cpp - Draws a heightmapped terrain
  • terrain.h
  • texture.cpp - Loads a 256x256 raw image into a GL texture
  • texture.h
  • treeline.cpp - Draws a treeline around the terrain
  • treeline.h
  • trees.cpp - Draw pine and maple trees
  • trees.h
  • vertex.cpp - Some linear algebra helpers
  • vertex.h

Compilation Instructions

Compiled in Linux with:

  • gcc-3.3.2
  • glut-3.7.1

Compiled in Windows with:

  • Cygwin
  • gcc-3.3.1
  • glut-3.7
  • $ make -f Makefile.cygwin
Last modified 19 years ago Last modified on Aug 7, 2005, 6:53:49 PM

Attachments (6)

Note: See TracWiki for help on using the wiki.