Difference between revisions of "ECE597 Project 3D Chess"

From eLinux.org
Jump to: navigation, search
(Documenting how to use the Graphics SDK)
m (Timeline)
Line 21: Line 21:
 
| High
 
| High
 
| Fri, 4/2/2010
 
| Fri, 4/2/2010
| TI SGX demos running on beagleboard demo image
+
| complete
 
| Create our own OpenGL code and get it running on our BeagleBoard.
 
| Create our own OpenGL code and get it running on our BeagleBoard.
 
|-
 
|-
Line 28: Line 28:
 
| High
 
| High
 
| Mon, 4/26/2010
 
| Mon, 4/26/2010
|  
+
| 10% complete
 
| Port Paul's existing 3D chess graphics to the BeagleBoard.  This task includes a significant amount of modification to the OpenGL code because OpenGL ES provides only a subset of the OpenGL API.  This task does not include porting chess game play.
 
| Port Paul's existing 3D chess graphics to the BeagleBoard.  This task includes a significant amount of modification to the OpenGL code because OpenGL ES provides only a subset of the OpenGL API.  This task does not include porting chess game play.
 
|-
 
|-

Revision as of 21:34, 23 April 2010

This project will simulate a hand-held chess game, and the game will allow two player games using two BeagleBoards over a network connection. The graphics will use the beagle's PowerVR SGX for hardware accelerated graphics by using OpenGL. If time permits, a third portion of the project will be to optimize the boot time because a chess computer should start up quickly.

Team Members

Paul Morrison

Steven Stark

Timeline

Below is an estimated timetable of tasks to be completed. Some adjustments may be necessary.

Task Owner Priority Estimated Completion Status Description
1. Working OpenGL Code Paul High Fri, 4/2/2010 complete Create our own OpenGL code and get it running on our BeagleBoard.
2. Port 3D Chess Graphics Paul High Mon, 4/26/2010 10% complete Port Paul's existing 3D chess graphics to the BeagleBoard. This task includes a significant amount of modification to the OpenGL code because OpenGL ES provides only a subset of the OpenGL API. This task does not include porting chess game play.
3. Refactor Piece Movement Architecture Steven High Fri, 4/2/2010 Evaluate and refactor piece movement architecture so that piece movements can be handled from the network just as easily as from the mouse.
4. Two Player Game Through Networking Steven High Mon, 4/26/2010 Allow two BeagleBoards to play a game of chess through a network connection.
5. Handle Mouse Interaction Paul High Mon, 5/3/2010 An extension of task 2, this task will continue porting the existing 3D chess game, including the user's mouse interactions and graphical display of legal moves. At the completion of this task, each player will be able to click on a piece and make a move.
6. Implement Game Rules Paul Medium Mon, 5/10/2010 This task will finish porting the existing chess logic, including all game rules. Additional features will be added to the original code. At the completion of this task, each player will be able to make only legal moves. The game will determine and handle when the game ends.
7. Integration and Testing Steven Medium Mon, 5/17/2010 Integration and testing will take place throughout the project, but this task represents final testing and bug fixes.
8. Interface with Chess A/I Engine Steven Low End of quarter, time permitting Building off task 3, chess movements should be able to come from an existing chess A/I engine. This task will involve hooking up an existing chess A/I engine to the game so that a player can play against the chess engine.
9. Networking Server Steven Low End of quarter, time permitting To facilitate multiplayer games, games will connect to a simple game server that we develop. Then players will not need to know the IP address of the other BeagleBoard to play a multiplayer game. Instead, players would find each other through our game server.
10. Optimize Boot Process Paul Low End of quarter, time permitting We want to minimize the startup time and boot directly into the chess game.

About priorities: High Priority items need to be completed for a successful project. Medium Priority items should be completed for an effective project, but the project can still be successful without the item's completion. Low Priority items should be completed if time allows.

Developing with OpenGL ES (under construction)

This section will explain how to set up and use the graphics SDK to compile using the cross compiler previously set up during ECE597. The 2010.3 Angstrom demo image was used to run the programs.

Obtaining the Software

The Graphics SDK is available from TI's website. Download OMAP35x_Graphics_SDK_setuplinux_3_01_00_06.bin (you will need to create an account).

Make sure the file is executable

$ chmod +x OMAP35x_Graphics_SDK_setuplinux_3_01_00_06.bin

Extract the files to your desired location

./OMAP35x_Graphics_SDK_setuplinux_3_01_00_06.bin

Everything necessary for 3D Chess is contained in <your chosen directory>/GFX_Linux_SDK/OGLES2/SDKPackage/. This will simply be referred to as SDKPackage/ in the future.

Compiling a Training Course Program

The general instructions on compiling the programs are provided in SDKPackage/OpenGL ES 2.x SDK.User Guide.1.20f.External.pdf. The following instructions are specific to the cross compiler used with OpenEmbedded:

Create a new source-me.txt similar to what was done for the u-boot exercise. Note the addition of PLATFORM and X11ROOT variables. X11ROOT specifies the directory of the X11 freedesktop binaries which is necessary if you want the programs to run inside a window using X11.

export OETREE="${HOME}/oe"
export ARCH=arm
export CROSS_COMPILE=arm-angstrom-linux-gnueabi-

export PLATFORM=LinuxOMAP3
export X11ROOT=${OETREE}/angstrom-dev/staging/armv7a-angstrom-linux-gnueabi/usr/lib/X11/

PATH=${OETREE}/angstrom-dev/staging/i686-linux/usr/bin/:${PATH}
PATH=${OETREE}/angstrom-dev/cross/armv7a/bin/:${PATH}

Now to compile an interesting first program: 02_HelloTriangle. The source can be found in SDKPackage/TrainingCourse/02_HelloTriangle/OGLES2. There are two files, one for using X11 and one without. We need to set the flag, X11BUILD, to 1 if we want to build the X11 version.

cd SDKPackage/TrainingCourse/02_HelloTriangle/OGLES2/Build/LinuxOMAP3
make X11BUILD=1

It may be necessary to modify SDKPackage/Builds/OGLES2/LinuxOMAP3/make_platform.mak if the build fails. Modify the compiler lines to append the prefix arm-angstrom-linux-gnueabi-

ifdef TOOLCHAIN
PLAT_CC  = $(TOOLCHAIN)/bin/arm-angstrom-linux-gnueabi-gcc
PLAT_CPP = $(TOOLCHAIN)/bin/arm-angstrom-linux-gnueabi-g++
PLAT_AR  = $(TOOLCHAIN)/bin/arm-angstrom-linux-gnueabi-ar
else
PLAT_CC  = arm-angstrom-linux-gnueabi-gcc
PLAT_CPP = arm-angstrom-linux-gnueabi-g++
PLAT_AR  = arm-angstrom-linux-gnueabi-ar
endif

After the program is built, it will be in SDKPackage/TrainingCourse/02_HelloTriangle/OGLES2/Build/LinuxOMAP3/ReleaseRaw/OGLES2HelloTriangle.

To move this file to a running Beagleboard without setting up NFS, secure copy can be used:

$ scp ../LinuxOMAP3/ReleaseX11/OGLES2HelloTriangle user@beagleoard:/home/<user>/Documents/HelloTriangle/

Finally, on the Beagleboard, run the program:

$ cd /home/<user>/Documents/HelloTriangle
$ ./OGLES2HelloTriangle

Annotated Bibliography

Under development

  1. New beagleboard demo image available
    This thread describes how to obtain the latest image for the Angstrom distribution on the beagleboard which includes the SGX 3D demos.

  2. OMAP Graphics SDK
    This is the download page for the OMAP35x graphics SDK required to build your own image. It also links to a wiki containing the getting started guide.