BattleWEBships
所属分类:其他智力游戏
开发工具:Java
文件大小:388KB
下载次数:54
上传日期:2006-03-20 23:06:23
上 传 者:
vivitung
说明: 一个简单的网络游戏,Java源代码,单人或双人对抗模式
(a simple online games, Java source code, single or double confrontation mode)
文件列表:
BattleWEBships (0, 2004-11-25)
BattleWEBships\battleships.png (50149, 2004-11-25)
BattleWEBships\compile.bat (181, 2004-11-25)
BattleWEBships\compile.sh (183, 2004-11-25)
BattleWEBships\index.html (1085, 2004-11-25)
BattleWEBships\source (0, 2004-11-25)
BattleWEBships\source\game (0, 2004-11-25)
BattleWEBships\source\game\Battleships.java (2659, 2004-11-25)
BattleWEBships\source\game\Battleships2players.java (4971, 2004-11-25)
BattleWEBships\source\game\ComputerPlayer.java (12123, 2004-11-25)
BattleWEBships\source\game\Display.java (2262, 2004-11-25)
BattleWEBships\source\game\DisplayPair.java (1245, 2004-11-25)
BattleWEBships\source\game\EditingFinished.java (431, 2004-11-25)
BattleWEBships\source\game\Editor.java (2987, 2004-11-25)
BattleWEBships\source\game\EditorDisplay.java (2082, 2004-11-25)
BattleWEBships\source\game\Fleet.java (6414, 2004-11-25)
BattleWEBships\source\game\Game.java (4211, 2004-11-25)
BattleWEBships\source\game\GameApplication.java (5089, 2004-11-25)
BattleWEBships\source\game\GameVersusComputer.java (844, 2004-11-25)
BattleWEBships\source\game\Images.java (2009, 2004-11-25)
BattleWEBships\source\game\Move.java (865, 2004-11-25)
BattleWEBships\source\game\MoveListener.java (403, 2004-11-25)
BattleWEBships\source\game\OpponentDisplay.java (2616, 2004-11-25)
BattleWEBships\source\game\OwnDisplay.java (1381, 2004-11-25)
BattleWEBships\source\game\Player.java (2028, 2004-11-25)
BattleWEBships\source\game\Playfield.java (5826, 2004-11-25)
BattleWEBships\source\game\Ship.java (4049, 2004-11-25)
BattleWEBships\source\game\ShipGraphics.java (2277, 2004-11-25)
BattleWEBships\source\game\ShipPlacer.java (669, 2004-11-25)
BattleWEBships\source\game\ShipPlacerButton.java (1305, 2004-11-25)
BattleWEBships\source\game\ShipSelection.java (6624, 2004-11-25)
BattleWEBships\source\game\ShipType.java (3004, 2004-11-25)
BattleWEBships\source\game\TargetPosition.java (537, 2004-11-25)
BattleWEBships\source\game\WaitForPlayer.java (2803, 2004-11-25)
BattleWEBships\source\game\WaitInfo.java (1140, 2004-11-25)
BattleWEBships\source\servlet (0, 2004-11-25)
BattleWEBships\source\servlet\BattleshipsServlet.java (441, 2004-11-25)
BattleWEBships\start.bat (1008, 2004-11-25)
BattleWEBships\start.sh (923, 2004-11-25)
... ...
Hi! This is the BattleWEBships game, a web-based battleships version.
To compile and run this game, you need the webbase gui library
which is included in this project (/WEB-INF/lib/webbase.jar)
Have fun! 2004, nextwebstep.com
STARTING THE GAME
-----------------
webbase includes a small web server, so you can directly start the
game web server with
java -classpath WEB-INF/lib/webbase.jar:WEB-INF/classes game.Battleships
or calling the start.bat (Windows) or start.sh (Linux) command script.
You access the game through your web browser then by entering the URL
http://localhost:26299/game.Battleships
(26299 is the port number the web server is running on)
TWO-PLAYER GAME
---------------
We have included an experimental 2-player game mode of BattleWEBships.
Access this by starting
http://localhost:26299/game.Battleships2players
in your web browser.
Please note: two players starting the application are automatically
connected after entering their names.
while it's your opponent's turn, a wait screen is displayed.
COMPILING THE GAME
------------------
The complete source code is included in this package. To re-compile the
program, simply type
compile.bat (Windows) or compile.sh (Linux)
RUNNING THE GAME AS A SERVLET IN TOMCAT
---------------------------------------
If you are running a Tomcat or similar application server, you might want
to run BattleWEBships as a web context.
We have included the servlet descriptor (web.xml) in the WEB-INF directory,
as well as the neccessary Servlet-interfacing version of the game in
the servlet/BattleshipsServlet class.
To create a web archive (.WAR), simply zip all the WEB-INF content using jar:
jar cf battle.war index.html *.png WEB-INF
Copy this battle.war file to the /webapps directory of your Tomcat server.
The game will shortly be available by typing
http://localhost:8080/battle/index.html
(8080 is the port number of the Tomcat web server)
LICENSE
-------
BattleWEBships and the source code is free. You may use every part of the
source code supplied as well as the graphics (ship images etc) for your
projects. Please feel free to enhance this little game!
MORE INFORMATION
----------------
Please visit our website http://www.nextwebstep.com to find out more about
programming web applications with the webbase framework.
Download the extensive documentation with many programming examples.
The webbase library is free for development and non-commercial usage.
近期下载者:
相关文件:
收藏者: