Jump to content
MakeWebGames

BasTijs

Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by BasTijs

  1. Re: miniNEaB version 4.0 Would be good to have a movie with examples of all the features :)
  2. Re: miniNEaB version 4.0 Do you also see other players moving on the map? To get the feeling that its actually a multiplayer game?
  3. Always fun to know as a developer how much you coded, so here is a nice script I use to <censored>yse my own browsergame http://www.landofdestiny.com. It counts the amount of images, lines and characters so perfect for browsergames: edit: place it in a folder and it will check that folder + all directories in it.   <?php $map = "./"; class Stats { private $map; private $ext_img = array(); public $directories = array(); public $stats; public function __construct($map) { $this->map = $map; $this->ext_img = array("jpg","gif","jpeg","png","bmp"); $this->getFilesRecursive($this->map); $this->stat(); } private function getFilesRecursive($dir="") { $dir = $dir."/"; $handle = opendir($dir); $this->directories[$dir] = array(); while (false !== ($file = readdir($handle))) { if (is_dir($dir.$file) && $file != "." && $file != "..") { $this->getFilesRecursive($dir.$file); } elseif (is_file($dir.$file)) { $this->directories[$dir][] = $file; } } } private function stat() { foreach ($this->directories as $dir => $files) { foreach ($files as $file) { $ext = explode(".",$file); $ext = strtolower($ext[count($ext)-1]); $contents = file_get_contents($dir."/".$file); if ($ext == "php" || $ext == "js") { $strlen = strlen(str_replace(array("\n","\r","\t"),"",$contents)); $lines = count(explode("\n",$contents)); (int)$this->stats['strlen'] += $strlen; (int)$this->stats['lines'] += $lines; $this->directories[$dir]['^strlen'] += $strlen; $this->directories[$dir]['^lines'] += $lines; } elseif (in_array($ext,$this->ext_img)) { (int)$this->stats['images']++; $this->directories[$dir]['^images']++; } } } } } $stats = new Stats($map); echo "<pre>"; print_r($stats->directories); echo "</pre>"; echo "<pre>"; print_r($stats->stats); echo "</pre>"; ?>
  4. Re: An introduction to security If you have alot of spare time it might be fun to try some of the security challenges of my old website http://www.net-force.nl Yea can learn alot php & javascript in there, might also be worth checking some of the texts (most of them are old but still good info). Also explained how xss works, yes I was one of the first to discover xss, but stopped in 2002 with this website. Currently working on a browser game, much more fun :)
×
×
  • Create New...