Our Scripts Vault contains many game scripts that you can use to create your own game!
...then I start coding the admin panel. I do this first because I want to populate my database tables first, and usually that requires a few more operations than what phpmyadmin can do for me.
Then I get the classes going and start with login, registration, etc, and go on from there with my plan
I work on a local server, so when I finally upload anything it means a bit more debugging to make it work on the internet (broken links, different directory paths, etc)I'm a perfectionist so I first get a page exactly the way I want it before I go onto developing the next part, so I tend to spend a lot of time on simple stuff like registration and login.
I've got dynamic stat bubbles for hp, mana, energy, and xp working (this was pretty cool).
What's a 'dynamic stat bubbe'? Never heard this term before.
Your setting sounds really nice. lookign forward to trying it out
<?php $src = $_GET['src']; $x = $_GET['x']; $y = $_GET['y']; $w = $_GET['w']; $h = $_GET['h']; if($src == "red") { $image = "../pics/red_btn.png"; } elseif($src == "green") { $image = "../pics/green_btn.png"; } elseif($src == "blue") { $image = "../pics/blue_btn.png"; } elseif($src == "yellow") { $image = "../pics/yellow_btn.png"; } elseif($src == "clear") { $image = "../pics/clear_btn.png"; } else { $image = "../pics/black_btn.png"; } $srcImage=imagecreatefrompng($image); $destImage=imagecreatetruecolor($w,$h); imagealphablending($destImage,FALSE); imagesavealpha($destImage,TRUE); imagecopy($destImage,$srcImage,0,0,$x,$y,$w,$h); //output image header("Content-type: image/png"); imagepng($destImage); imagedestroy($destImage); imagedestroy($srcImage);?>
function GetGelStat($strUserName, $strStatName, $strColorBtn, $pctLeft){ $strSrc1 = "../pics/" . $strColorBtn . "_btn.png"; $strSrc2 = "../pics/clear_btn.png"; if($pctLeft >= 100) { return "<img src='" . $strSrc1 . "' border=0>"; } elseif($pctLeft <= 0) { return "<img src='" . $strSrc2 . "' border=0>"; } $info = getimagesize($strSrc1); $w = $info[0]; $w = $w * $pctLeft / 100; $h = $info[1]; $pctLeft = 100 - $pctLeft; $info = getimagesize($strSrc2); $w2 = $info[0] * $pctLeft / 100; $strImages = "<img src='button.php?x=0&y=0&w=" . $w . "&h=" . $h . "&src=" . $strColorBtn ."' border=0>"; $strImages .= "<img src='button.php?x=" . $w . "&y=0&w=" . $w2 . "&h=" . $h . "&src=clear' border=0>"; return $strImages;}
$strTbl .= "<tr class='statrow'><td class='outset'><font class='statname'>XP</font></td><td class='outset'>";$strTbl .= GetGelStat($UserName, "xp", "green", $pct);$strTbl .= "</td></tr>\n";
Haha wow, you guys are way more procedural than I am. I do it weird, I start out by making a layout, and then making a game to fit the theme of the layout. I easily have like 40 games completed to different degrees on my harddrive, and maybe only 2 or 3 that are playable. The rest are just skeletons.