Project#3 : OOP for Billiard Game (Due : November 15th, 11:59pm)
- 1. Download and Install DirectX 9.0 SDK
- 2. Download source code
- 3. compile it using Visual Studio 6.0 (You may also use Visual Studio 2008)
- If it is not compiled, make sure that directory setting for DirectX is properly done. (Menu->Tool->Options->Directories : option1 , option2
- 4. modify the source code
- Modify VirtualLego.cpp
- Search for "// add your code" comments. They are the places where your code is likely to be added.
- Note that the function "Display" is repeatedly called when you execute the code. You have to use the variable 'timeDelta' (time difference between two consecutive frames) appropriately.
- 5. Execute and test it.
- 6. Put your source code package, .exe file, and README.txt file into one directory named "yourEnglishName_studentId#" and zip the directory into "yourEnglishName_studentId#.zip". (ex) "HongGildong_2004301.zip". README.txt file should contain the description on how to compile and how to execute.
- 7. submit the zip file through eClass webpage.
Direct3D Programming 참고서적 : DirectX 9를 이용한 3D GAME프로그래밍 입문
- Mission : object oriented programming of billiard game as follows.
- When you execute your code, the program should display four balls (red, red, yellow, white). You also have to put one additional ball (blue) which is used for specifying the direction of white ball to hit.
- After setting the direction of the white ball by placing blue ball (right mouse button down + mouse move), when you press "SPACE" key, the white ball should start to move toward the direction.
- After a ball and the wall of billiard ball is hit, the ball should change its direction and decrease its energy(speed).
- After a ball and another ball is hit, the direction of the two balls should change their directions and energy appropriately.
- A moving ball should lose its energy(speed) slowly while it moves.
- Your program should be REALISTIC!
- The speed of moving balls should be independent of computing power of your PC. You can achieve this by appropriately using the 'timeDelta' parameter of Display function. The amount of ball movement should be proportional to the 'timeDelta' from frame to frame.