Animated GO Board

CHENG-YU  SUNG
chengyus@ucsc.edu
CS161 Winter 2004
COMPUTER GRAPHICS
FINAL PROJECT REPORT
Date: March 15, 2004

Abstract

This report lists ideas implemented in the preliminary report, lists features and possible enhancements. This project is based on the game GO, and I extended it from previous CS160 project with animation enhancementss using topics/algorithms covered in the lab/class.

Ideas Used

The board is texture-mapped with wooden textures, and the texture image can be loaded in JPEG format with the help of FLTK; however, I ran into difficulities in converting pixels/color values (please see Difficulties/Possible enhancements for details). Textures for the board are selectable from widget. The animation consists of pieces showing up at coordinates inputted using alpha blending effect, fly-in effect, or projected by a piece projector controlled by mouse. There are basic AI to show effects upon capturing stones/pieces such as (group of) piece(s) disintegrate or blew away, sinking, or disappearing. The challenging part I tried to create is the following --- an effect where a player is very upset and decided to give up so he would tile/split the board/table (parameters controlled by GUI) and create pieces moving/falling-dynamics due to gravity). I found it very helpful and meaningful to integrate the code we wrote earlier for pendulums and particles because those codes are re-used. Collision detection and response is something new in this project; although it is implemented naively, it behaves quite close to my expectation.

Features/Possible Enhancements

The following lists are features in this project's implementation. In particular, features incorporated are algorithms such as collision detection and particle system algorithm, and splitting objects by altering vertices locations and copying/shifting. Possible enhancements are things that I planned but couldn't finish in time or ran into difficulties; those items are striked out.
  1. I tried loading a JPEG Image, at one point the texture loaded, but there might be some bug since, after making other necessary changes, it ceased to work (in particlar, changing the split texture-loading methods). Covert PPM File loading in the simple version to JPEG texture file loading in the animated version. Change required data declaration/structures/and passing/parsing functions. This make the project more presentable in size since the PPM file previously used are quite large in size (on the order of MBs).
  2. I improved lighting calculation of all pieces to have specular reflections (there were no specular reflections in simple version).
  3. With proper order of placing/gui operations, upon placing a GO piece, the range detection function/codes also scales.
  4. implementing transparency on the pieces. Initially, I will check the static pieces transparency effect (basically showing transparent pieces on the board). But after the is correctly implemented, it should be integrated to the AI part, so that when pieces are captured, there is a animated effect as pieces slowly "fade" away. I call this the pieces blending/fading effect. However, I looked at P590 in RedBook v1.4 edition for one possible "easy fade effect"; this can be implemented as one of the possible enhancements.
  5. Extend the transparency effect by implementing a white noise function so that there might be a different flavor animated effect when pieces are captured --- "disintegrate" effect. This is similar to the "easy fade effect" described above.
  6. Next, the losing special effects have two candidates:
    (1) the player hits the table and pieces jump up in the air from their placed coordinates. This does not look naturual in animation since I tried to take out gravity/reverse its direction. One other difficulty is that jumping pieces requires many random factors to determine to landing position. This is considerably harder to implement with coordinate systems implemented in this project. It would also involve many overheads/values to keep track of.
    (2) The following idea is implemented --- using a preset/pre-modeled special effect board, after the losing player apply extreme forces to the board, the board should break in half and pieces start falling/sliding due to gravity as the each half piece of the board is tilted. There are three variations to this: the first two variations simply tilt in left or right direction without breaking the board. The third one breaks the board in half and allows pieces to fall off with collision detection/response.
    (3) create a chainsaw effect so that instead of applying perpendicular force to the board, the losing player tries to use chainsaw to cut it in half. The process will create flying wood-grain/tiny particles shooting up and falling down. (might need to observe some typical fireworks OpenGL code to accomplish this). This is implemented as shown in the third pair of screenshots

Results/Screenshots

The following images show the results of the implementation (intermediate frames in animation are not shown). Each pair of images shows the starting pictures of each animation effects implemented. There is also a movie animating these shots at the end.

The following picture is the starting image of the program.

Here is the left tilting animation effect (starting and ending image). Please see the movie for details.



Here is the right tilting animation effect (starting and ending image). Please see the movie for details.



Here is the spliting/tilting animation effect (starting and ending image). Please see the movie for details.



Animated GO Board Movie
The following link refers to the documentation of the simple version of the GO game before this project.
Simple GO Board

References

[1] CMPS161 Prog3 and Prog4
[2] David M. BOurg. Physics for Game Developers.
[3] OpenGL RedBook