billiards
所属分类:OpenGL
开发工具:Visual C++
文件大小:989KB
下载次数:115
上传日期:2007-07-29 12:50:44
上 传 者:
chenhd925
说明: 一个三维桌球的例子,很好的运用了OPENGL的例子,可以帮助初学者理解OPENGL。希望大家相互交流
文件列表:
billiards (0, 2005-07-04)
billiards\audio (0, 2005-07-04)
billiards\audio\hit.wav (4486, 2003-01-13)
billiards\audio\shoot.wav (1555, 2003-01-13)
billiards\audio\side.wav (578, 2003-01-13)
billiards\audio\sunk.wav (4050, 2003-01-13)
billiards\billiards.cpp (47974, 2003-01-15)
billiards\billiards.exe (117044, 2003-01-15)
billiards\billiards.h (6911, 2003-01-15)
billiards\cygwin1.dll (768840, 2002-01-21)
billiards\EaxAc3.dll (61440, 2001-06-05)
billiards\glut32.dll (221184, 2000-09-29)
billiards\Makefile (169, 2003-01-13)
billiards\Makefile.Linux (122, 2002-12-31)
billiards\mySphere.cpp (2853, 2003-01-15)
billiards\mySphere.h (1036, 2003-01-15)
billiards\OpenAL32.dll (143360, 2002-04-10)
billiards\textures (0, 2005-07-04)
billiards\textures\ball_black.bmp (49208, 2003-01-07)
billiards\textures\ball_blue_solid.bmp (49208, 2003-01-07)
billiards\textures\ball_blue_stripe.bmp (49208, 2003-01-07)
billiards\textures\ball_brown_solid.bmp (49208, 2003-01-07)
billiards\textures\ball_brown_stripe.bmp (49208, 2003-01-07)
billiards\textures\ball_green_solid.bmp (49208, 2003-01-07)
billiards\textures\ball_green_stripe.bmp (49208, 2003-01-07)
billiards\textures\ball_orange_solid.bmp (49208, 2003-01-07)
billiards\textures\ball_orange_stripe.bmp (49208, 2003-01-07)
billiards\textures\ball_purple_solid.bmp (49208, 2003-01-07)
billiards\textures\ball_purple_stripe.bmp (49208, 2003-01-07)
billiards\textures\ball_red_solid.bmp (49208, 2003-01-07)
billiards\textures\ball_red_stripe.bmp (49208, 2003-01-07)
billiards\textures\ball_white.bmp (3128, 2003-01-03)
billiards\textures\ball_yellow_solid.bmp (49208, 2003-01-07)
billiards\textures\ball_yellow_stripe.bmp (49208, 2003-01-07)
billiards\textures\black.bmp (3126, 2002-12-28)
billiards\textures\carpet.bmp (12344, 2002-12-28)
billiards\textures\char1.bmp (12344, 2003-01-14)
billiards\textures\char2.bmp (12344, 2003-01-14)
billiards\textures\checker.bmp (3128, 2003-01-02)
... ...
-----------------------------------------------------------
READ ME (15 January 2003)
Billiard ball simulator
-----------------------------------------------------------
Created by Nelis Franken
-----------------------------------------------------------
Contents:
1. Running the game
2. System Requirements
3. Keys / Input handling (moving and shooting)
4. Features
5. Known Issues / Bugs
6. Questions / Comments
-----------------------------------------------------------
1. Running the game
-----------------------------------------------------------
Double click on 'billiards.exe', or type it at the command
prompt to run the game.
-----------------------------------------------------------
2. System Requirements
-----------------------------------------------------------
This game requires 16mb of available memory, and a relatively
fast CPU (depending on the resolution). It also requires a
good 3D Accellerator (GeForce2 or better) for optimal
performance. This game has not been tested on a huge variety
of graphics cards, but any NVIDIA-based card should be fine.
The game defaults to desktop resolution, but looks best in
1024x768. Finally, it is highly recommended that the game be
run in Windows 2000, Windows XP or ME, since some slowdown
has been observed in Windows *** based systems. It will also
compile and run without modification in any Linux environment,
given that the GLUT and OpenAL libraries have been installed.
-----------------------------------------------------------
3. Keys / Movement
-----------------------------------------------------------
Mouse movement/input is recommended.
The mouse behaviours are:
* Look around
-> Hold-Move Left-Mouse-button
* Aim and look around
-> Hold-Move Right-Mouse-button
* Increase/Decrease power of shot (while aiming)
-> Hold-Move forward/backward Right-Mouse-button
* Shoot
-> Release Right-Mouse-button
* Zoom in/out
-> Hold-Move forward/backward Middle-Mouse-button
Key input is as follows:
* Rotate-left: A or Keypad-Left
* Rotate-right: D or Keypad-Right
* Zoom in W or Keypad-Up
* Zoom out S or Keypad-Down
* Ascend: Z
* Descend: X
* Toggle shoot mode space
* Increase shot power G
* Decrease shot power F
* Shoot T
* Toggle laser aim L
* Exit ESC
-----------------------------------------------------------
4. Features
-----------------------------------------------------------
The game boasts some nice features apart from the pretty
(self made) textures.
- Realistic reflections (table on floor)
- Real-time shadows (balls on table carpet, although not
terribly obvious that they are real-time, trust me, they
are - the light is just positioned in such a manner that
you don't notice the changes that much)
- Anti-aliasing (on the table markings (lines) and laser
aiming guide).
- SOUND! Made possible by the multi-platform OpenAL sound
libraries available at www.openal.org (Creative Labs seem
to have a hand in putting these together).
- Realistic physics. Okay, relatively realistic. There are
some minor bugs relating to hitting a shot at full power
and there are no spin (or jump shots) available, but the
basics seem to work most of the time.
- Multiple input methods (keyboard / mouse)
- A way too complex and totally under-utilized stairs
generation function. Lots of undocumented customizeable
features to render stairs that will hopefully be displayed
in a later project.
- Multi-platform compatible code.
- Reduced CPU load. This may seem trivial, but the CPU does
nothing (or close to nothing) when the balls don't roll
around on the table, leaving it open for use by other
applications.
Then, the game made use of the following OpenGL features:
- Blending (used in anti-aliasing and the reflections)
- Display lists (the reason why everything still renders
relatively fast - it gets cached using display lists)
- Texturing (from bitmap image files)
- Mip-mapping (of textures)
- Dynamic lighting (spot light and omni light)
- Quadrics (used for the balls and pillars)
- Bitmap fonts (GLUT)
-----------------------------------------------------------
5. Known Issues / Bugs
-----------------------------------------------------------
- Have not been extensively tested on any other 3D cards
(apart from NVIDIA-based ones), so there might still be
some unresolved issues relating to driver updates etc.
- Texture blinking (around pockets and below balls). This
is fixed by downloading the latest drivers for your graphics
card.
- Inverse spinning of balls. When shooting at full power and
hitting a ball on an outer edge may sometimes cause the
stationary ball to move in the opposite direction. No fix
yet, but it has to do with the way collision testing is done
and the absence of a custom timing function. Working on it.
- Magnetic table edges. A ball may once in a while get stuck
in the table sides. Same problem as above, will get fixed soon.
- Texture flipping. When the balls get to rest, the textures
sometimes flip 180 degrees. No idea why, but will try to
fix it.
- The game seems to be EXTREMELY slow on Windows*** based systems,
irrespective of the CPU or graphics card in use. No idea why.
Maybe due to the fact that it was compiled under Windows 2000?
Will try to recompile under Windows*** and see what happens.
-----------------------------------------------------------
6. Questions / Comments
-----------------------------------------------------------
For any questions or comments don't hesitate to contact me
at igor@global.co.za
Enjoy!
Nelis Franken
近期下载者:
相关文件:
收藏者: