life3D
所属分类:Java编程
开发工具:Java
文件大小:19KB
下载次数:152
上传日期:2007-10-30 15:38:32
上 传 者:
zellux
说明: 使用Java3D编写的生命棋游戏。可拖拽鼠标改变视角。
(Prepared by the use of Java3D chess game of life. Can drag the mouse to change the perspective.)
文件列表:
Life3D (0, 2007-03-03)
Life3D\Cell.java (9652, 2006-07-30)
Life3D\CellsGrid.java (8362, 2006-08-02)
Life3D\jssaverLife3D.cfg (32, 2006-07-31)
Life3D\Life3D.java (4507, 2006-07-27)
Life3D\Life3DConfig.java (10479, 2006-07-25)
Life3D\life3DProps.txt (143, 2006-08-02)
Life3D\LifeProperties.java (14448, 2006-07-16)
Life3D\mainClass.txt (20, 2006-07-13)
Life3D\TimeBehavior.java (729, 2006-07-27)
Life3D\WrapLife3D.java (6862, 2006-07-27)
Chapter 2. Get a Life (in 3D)
From:
Pro Java 6 3D Game Development
Andrew Davison
Apress, April 2007
ISBN: 15905***172
http://www.apress.com/book/bookDisplay.html?bID=10256
Web Site for the book: http://fivedots.coe.psu.ac.th/~ad/jg2
Contact Address:
Dr. Andrew Davison
Dept. of Computer Engineering
Prince of Songkla University
Hat Yai, Songkhla 90112, Thailand
E-mail: ad@fivedots.coe.psu.ac.th
If you use this code, please mention my name, and include a link
to the book's Web site.
Thanks,
Andrew
==================================
Files here:
* Life3D.java, Life3DConfig.java, LifeProperties.java,
WrapLife3D.java, CellsGrid.java, Cell.java,
TimeBehavior.java
// 7 Java files
* life3DProps.txt
// the application configuration files
* mainClass.txt
// used when creating a JAR
* jssaverLife3D.cfg
// a configuration file for JSCreenSaver that uses Life3D
==================================
Requirements:
* J2SE 5.0 from http://java.sun.com/j2se/1.5.0/index.jsp
* Java 3D 1.4.0 (or 1.3.2) from https://java3d.dev.java.net/
==================================
Compilation:
$ javac *.java
Execution:
$ java Life3D
// this starts the 3D application
or
$ java Life3D -edit
// this puts up the configuration screen
==================================
Screensaver Software
JScreenSaver is a Windows screensaver loader which can
execute Java programs. It was written by Yoshinori Watanabe,
and is available from
http://homepage2.nifty.com/igat/igapyon/soft/jssaver.html
and http://sourceforge.net/projects/jssaver/
NOTE: it only works with Windows (sorry to Linux/Mac users)
1. From the sourceForge link, download jssaver-1_1alpha7.zip (*** KB).
2. Unzip, and copy the following 3 files from /bin:
jssaver.cfg-SimpleSaver
jssaver.jar
jssaver.scr
3. Rename jssaver.cfg-SimpleSaver to jssaver.cfg.
4. Move jssaver.cfg, jssaver.jar, jssaver.scr to c:\windows\system32
(in Windows XP).
5. Check if the jscreensaver shows up as a screensaver choice
in the screensaver tab of the Display control panel. Test it.
It should display a series of moving lines and a time.
========================================
Making a Java 3D Screensaver. Step 1. Java --> JAR
Compilation:
$ javac *.java
Package the classes as a JAR:
$ jar cvfm Life3D.jar mainClass.txt *.class
// at the end, check if there's a Life3D.jar
Move Life3D.jar *and* life3DProps.txt to a new location,
so there's no chance of using the unpackaged class files
by accident during the testing phase.
Testing:
$ java -classpath Life3D.jar Life3D -edit
// tests the configuration screen
$ java -classpath Life3D.jar Life3D
// tests the 3D application
========================================
Making a Java 3D Screensaver. Step 2. Moving into the System
1. Move Life3D.jar *and* life3DProps.txt to
c:\windows\system32
2. Rename jssaverLife3D.cfg to jssaver.cfg, and
copy it to c:\windows\system32, overwriting the
old one that you used earlier.
3. Revisit the screensaver tab of the Display control
panel, and try out jscreensaver with Life3D.
NOTE: remember that you terminate Life3D by pressing ,
'q', -c, or . Moving or pressing the mouse
doesn't stop the saver.
-----------
Last updated: 3rd March 2007
近期下载者:
相关文件:
收藏者: