📄 778-778.html
字号:
<HTML>
<HEAD>
<META name=vsisbn content="1571690433"><META name=vstitle content="Black Art of Java Game Programming"><META name=vsauthor content="Joel Fan"><META name=vsimprint content="Sams"><META name=vspublisher content="Macmillan Computer Publishing"><META name=vspubdate content="11/01/96"><META name=vscategory content="Web and Software Development: Programming, Scripting, and Markup Languages: Java"><TITLE>Black Art of Java Game Programming:Slider Puzzle</TITLE>
<!-- HEADER --><STYLE type="text/css"> <!-- A:hover { color : Red; } --></STYLE><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"><script><!--function displayWindow(url, width, height) { var Win = window.open(url,"displayWindow",'width=' + width +',height=' + height + ',resizable=1,scrollbars=yes'); if (Win) { Win.focus(); }}//--></script><SCRIPT><!--function popUp(url) { var Win = window.open(url,"displayWindow",'width=400,height=300,resizable=1,scrollbars=yes'); if (Win) { Win.focus(); }}//--></SCRIPT><script language="JavaScript1.2"><!--function checkForQuery(fm) { /* get the query value */ var i = escape(fm.query.value); if (i == "") { alert('Please enter a search word or phrase'); return false; } /* query is blank, dont run the .jsp file */ else return true; /* execute the .jsp file */}//--></script></HEAD><BODY>
<TABLE border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=75 valign=top>
<img src="../1571690433.gif" width=60 height=73 alt="Black Art of Java Game Programming" border="1">
</td>
<td align="left">
<font face="arial, helvetica" size="-1" color="#336633"><b>Black Art of Java Game Programming</b></font>
<br>
<font face="arial, helvetica" size="-1"><i>by Joel Fan</i>
<br>
Sams, Macmillan Computer Publishing
<br>
<b>ISBN:</b> 1571690433<b> Pub Date:</b> 11/01/96</font>
</td>
</tr>
</table>
<P>
<!--ISBN=1571690433//-->
<!--TITLE=Black Art of Java Game Programming//-->
<!--AUTHOR=Joel Fan//-->
<!--AUTHOR=Eric Ries//-->
<!--AUTHOR=Calin Tenitchi//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Sams//-->
<!--CHAPTER=19//-->
<!--PAGES=778-778//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="774-778.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="../ch20/779-784.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H4 ALIGN="LEFT"><A NAME="Heading15"></A><FONT COLOR="#000077">Improving the Sounds</FONT></H4>
<P>Better sounds would also improve the look and feel of this game. Joe Carlson’s Amiga version has very nice “woody” sounds, but no sound converter has been found that can turn them into sounds that Netscape can play.
</P>
<P>Done in combination with pictures instead of wood block images, sounds can be located that somehow relate to the image being displayed. You could have a lot of fun with this!</P>
<H4 ALIGN="LEFT"><A NAME="Heading16"></A><FONT COLOR="#000077">Creating Smoother Animation</FONT></H4>
<P>Instead of having a block move abruptly from one position to another, you can modify your game so that the blocks move in smaller steps, perhaps as small as a pixel, to make the animation appear more fluid.
</P>
<P>This enhancement may need to be benchmarked on slow machines, such as 33MHz 80486-based PCs, at least until the JIT (just-in-time ) Java compilers become available, which promise at least a 10 times speed improvement.</P>
<H3><A NAME="Heading17"></A><FONT COLOR="#000077">Suggestion Box</FONT></H3>
<DL>
<DD><B>•</B> Investigate other layout styles instead of BorderLayout. You can experiment with placing the buttons in different positions relative to the puzzle itself.
<DD><B>•</B> You can create a new window to run the applet in, rather than allocating space in the HTML page. This could look very effective. This window could be made to be resizable. The applet could decide whether to rescale the image or redraw the grid with a new number of blocks when resized.
<DD><B>•</B> Investigate one of the many new Java development environments, such as Microsoft’s Visual J++. This is a much better way to program in Java.
<DD><B>•</B> Ensure your bicycle wheelnuts are tight before attempting to ride! Failure to do so could result in a rapid meeting with the pavement!
</DL>
<H3><A NAME="Heading18"></A><FONT COLOR="#000077">Summary</FONT></H3>
<P>I hope you have gained some understanding of how to display graphics, perform simple animation, and incorporate sound into a Java applet. I also hope you have gained an insight into some of the inner workings of Java applets, and that you use this knowledge in developing your own. There are many excellent Java books available now, including this one, to help programmers utilize this very powerful new language.
</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="774-778.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="../ch20/779-784.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</BODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -