#!/usr/bin/perl

use CGI qw(:standard);



$invitems = param("items");
$invingreds = param("ingreds");



$constGravity = param("constGravity");
if($constGravity eq "") { $constGravity = .05; }
$constBallXSpeed = param("constBallXSpeed");
if($constBallXSpeed eq "") { $constBallXSpeed = 1.5; }
$constWinScore = param("constWinScore");
if($constWinScore eq "") { $constWinScore = 10; }
$constFlapStrength = param("constFlapStrength");
if($constFlapStrength eq "") { $constFlapStrength = 2.5; }

$arenaWidth = param("arenaWidth");
if($arenaWidth eq "") { $arenaWidth = 300; }


$arenaHeight = param("arenaHeight");
if($arenaHeight eq "") { $arenaHeight = 300; }


print header();  

print<<__EOQ__;
<html>
<title> JoustPong by alienbill.com</title> 
<FORM>

<BODY  BGCOLOR="#006699" TEXT="#66CCFF" LINK="#FFFF33" VLINK="#FFFFCC" ALINK="#FFFF99">

        <FONT FACE="arial,helvetica,sans-serif">


<div align=center>

<I>"The future of gaming can be summed up in two words -- Pong and Joust"</I>
<BR> --Otter on rec.games.video.classic
<BR>


<applet code = JoustPong.class width=$arenaWidth height=$arenaHeight>
<param name="constGravity" value="$constGravity">
<param name="constBallXSpeed" value="$constBallXSpeed">
<param name="constWinScore" value="$constWinScore">
<param name="constFlapStrength" value="$constFlapStrength">
</applet><BR>
<font size=+2>JoustPong</FONT><BR>
<TABLE>
<TR><TD WIDTH=350>
        <FONT FACE="arial,helvetica,sans-serif">
 Pong with a "Flap" button. (If you have trouble 
starting the game, try clicking on the applet itself
to make sure it's receiving the keystrokes.) Feel free to distribute,
but drop me some 
e-mail at <b>kirkjoustpong at alienbill dot com</b>.
Here's the <A HREF="JoustPong.java">source code</A> as 
well as the general <A HREF="SquareSprite.java">SquareSprite</A> and 
<A HREF="GameRunner.java">GameRunner</A> classes I made that handle the
collision detection, double buffering, movement, and framerate
handling.
<P>
The idea for this game came from the Usenet group
rec.games.video.classic.  I think it's 
philisophically interesting, as one of the most complex
games you can control with a single button press.  Earlier 
I've made versions in Visual Basic and PocketC for Palm.


<P>
You can change some of the phsyics of the game here:<BR>
<TABLE><TR><TD>        <FONT FACE="arial,helvetica,sans-serif">
Gravity:</TD><TD><input name="constGravity" value="$constGravity" size=4>
</TD><TD>        <FONT FACE="arial,helvetica,sans-serif">
BallXSpeed:</TD><TD><input name="constBallXSpeed" value="$constBallXSpeed" size=4>
</TD>
<TD ROWSPAN=2 VALIGN="CENTER">
<INPUT TYPE="SUBMIT" VALUE="Change Values">
</TD></TR><TD>        <FONT FACE="arial,helvetica,sans-serif">
FlapStrength:</TD><TD><input name="constFlapStrength" value="$constFlapStrength" size=4>
</TD><TD>        <FONT FACE="arial,helvetica,sans-serif">
WinScore:</TD><TD><input name="constWinScore" value="$constWinScore" size=4>
</TD></TR><TD>        <FONT FACE="arial,helvetica,sans-serif">
arenaHeight:</TD><TD><input name="arenaHeight" value="$arenaHeight" size=4>
</TD><TD>        <FONT FACE="arial,helvetica,sans-serif">
arenaWidth:</TD><TD><input name="arenaWidth" value="$arenaWidth" size=4>





</TD></TR></TABLE>

</font>
</TD></TR></TABLE>
<A HREF="../..">Back</A>

</body>

</html>


__EOQ__
