Jump to content

reportingsjr

Members
  • Posts

    1,183
  • Joined

  • Last visited

Posts posted by reportingsjr

  1. I think.. you have the wrong idea. Hex has two meanings, hexadecimal, color codes. Just hex, those are characters. I think they are in the format of 1x11. Is that right? The person here seems to be talking about files though. Maybe the hex chars, but not color codes..

  2. Scientific Notation :). BTW chocolate. I know your name *gasp*. :), its your secret weakness, like superman to kryptonite. :)You still never know!

  3. Someday when a large man with a trenchcoat and violin case shows up at your door you will wish you had stopped calling him steve like he asked :):)
    Nah, he just said not to call him sally. So dont call him sally, heh! I found out what Chocolate570's name is 0.o
  4. There we go! Thank you skemcin!A- I dont think it will be 10 person, right now it is 3 person. I am doing most of the work, and no, no pay.B- Naigox says he will be selling it, but im not exactly sure if it will exactly "jump off the shelves" (or server in the case :)). Oh yeah, there is also a free version.C- What do you mean? If you mean are we the only site going to be using this, no. Read answer B.D- I dont know.

  5. Thanks to steve we got it all figured out! If you want to see the whole class and how to use it this is how:

    <?phpclass GameMap{  # declare properties  var $map_ar;  var $map_name;  # constructor  function GameMap($name = "")  {	# create an empty array	$this->map_ar = array();	$this->map_name = "";	# if a name was given, call the SetMap method	if ($name != "")	  $this->SetMap($name);  }  # SetMap will check for the file, set the map_name property,  # and call the CheckCompiled and LoadMap functions  function SetMap($name)  {	if (file_exists($name))	  $this->map_name = $name;	else	  die ("Class " . __CLASS__ . " error: the map file does not exist.");  }  # GetCoords returns the x,y coordinate of the array  # this function returns boolean false if the coordinates are out of bounds  function GetCoords($x, $y)  {	$x--; $y--;	if ($x < 0 || $y < 0) return false;	if ($this->map_name == "")	  die ("Class " . __CLASS__ . " error: GetCoords has been called without setting a map file.");	  	# open the map file for reading	if (!$fh = fopen($this->map_name, "rb"))	{	  die ("Class " . __CLASS__ . " error: Could not open map file for reading (" . $this->map_name . ").");	}	$y_found = false;	$retval = false;	$nr = 0;	while (!@feof($fh) && !$y_found)	{	  # get line number $nr	  $line = trim(fgets($fh));	  if ($nr == $y)	  {		$y_found = true;		break;	  }	  else		$nr++;	}	if ($y_found)	{	  if (strlen($line) > $x)		$retval = $line[$x];  # get character number $x	}	fclose($fh);	return $retval;  }}?>

    <?phpinclude "class.GameMap.php";$map = new GameMap("file name");echo $map->GetCoords(1,2);echo "<br />".memory_get_usage();?>

    :)

  6. Use gmail for chat?Looks like it worked..http://www.excibius.com/excibius/skills/wi...ess/maptest.phpSo, went from 8,352,616 to 820,496 bytes apparently. Or maybe that was just for writing it! I dont know, you check it out.EDIT: odd, tell me whats wrong with this:

    Line 264 processed, memory used: 820456Line 265 processed, memory used: 820496Line 266 processed, memory used: 820496Line 267 processed, memory used: 820496Line 268 processed, memory used: 820496
    The memory stays the same from 265 on.
  7. Bah!

    [Wed Dec 06 20:10:52 2006] [error] [client 74.129.6.7] Allowed memory size of 8388608 bytes exhausted (tried to allocate 11796480 bytes)[Wed Dec 06 20:10:52 2006] [error] [client 74.129.6.7] Premature end of script headers: php-script
    -.-sounds like its not so compiled :).
  8. What would it do if you use alot of memory?

    <?if (!function_exists("str_split")){  function str_split($str, $nr=1) {  	 return array_slice(split("-l-", chunk_split($str, $nr, '-l-')), 0, -1);  }}include "";$maptext = file_get_contents("bitmaps/map1.map");$map = explode("\n", $maptext);foreach ($map as $i => $mapline){  $map[$i] = str_split($mapline);  memory_get_usage();}echo "test";$position = mysql_fetch_object($database->query("SELECT * FROM `map` WHERE name = '{$_GET['username']}'"));$up = $position->y - 2;$down = $position->y + 2;$left = $position->x + 2;$right = $position->x - 2;if($_GET['way'] == "up"){	//GO UP	if($map[$up][$position->x] == "."){		$database->query("UPDATE `map` SET y = y-2 WHERE name = '{$_GET['username']}'");	}}elseif($_GET['way'] == "down"){	//GO DOWN	if($map[$down][$position->x] == "."){		$database->query("UPDATE `map` SET y = y+2 WHERE name = '{$_GET['username']}'");	}}elseif($_GET['way'] == "left"){	//GO LEFT	if($map[$position->y][$left] == "."){		$database->query("UPDATE `map` SET x = x-2 WHERE name = '{$_GET['username']}'");	}}else{	//GO RIGHT		if($map[$position->y][$right] == "."){			$database->query("UPDATE `map` SET x = x+2 WHERE name = '{$_GET['username']}'");		}}?>

    So what would this class do exactly? How would you compile the map?looks like the very last array it does ends up giving it 8352616 bytes of memory 0.o . So help would be nice :). Your the best steve!

  9. But gravity and electrodynamic forces have no true speed, because the speed is unattainable. You try and figure out the speed you want. Also how do you figure out the speed of light? Its not matter or anything, did they have someone out in space look for a big light on earth and check what time they saw it, and check what time the people turned it on at? (or blew up or what have ya!)

  10. A Kleenex box traveling at 40km per hour can give a person a serious concussion.
    Actually, just to say it, that was disproved. Myth busters :), gotta love that show! But they did that one and all it did was hit the dummy, no damage at all. So I have to disagree with you! Light is fast!
  11. Nope :), we are moving along to. Who said all of the team mates wanted money anyways? I cant get any money, I dont want it either! I just want tyo work on something productive for someone. OH yeah, if I already havent posted it, the new link is http://phpboard.excibius.com/ . :)

  12. Well, thats what I meant. I sometimes say wrong things. But thats what I mean, its alot of time for a web page to download. Nice computer :) *jealous*. But we are upgrading it alot. Looks better:).

×
×
  • Create New...