Terrain options... (Wishlist)

Terrain options... // Wishlist

1  |  

lady nighthawk

Jan 31, 2005, 9:05pm
It would be nice if we could do sets of terrain, I know we get 0 - 64 now
but I find that I've used up most of those just on one theme (ex: summer).
It would be nice if we could have sets of terrain files 0 - 64, maybe four
sets, one for each season. So instead of just 64 total we could have up to
256 terrain files but still only use up to 64 within a set. Then just pick
in world features which set we'd like to use and have them change all at
once. For that matter we could include the skybox IF someone wanted to
change that to match the season terrain they're using.

I can see one problem with this idea and that is areas in a world that have
terrain manually changed. Like my world, most is a summery kind of look but
there is an area that is full winter all year round. In that instance I'd
probably have to go back to that area and manually change that back to
winter. Unless some sort of *leave manual changes as is* is built in to your
seasons set changes.

LNH



--

john dough

Jan 31, 2005, 10:40pm
On my object paths I have 6 different terrain sets (64 textures per set).
But only 1 set may be used at a time. What I have done for seasons is made
up 4 of those sets but left things like roads, paths etc named alike so they
wont change when you change your seasons terrain sets. Simply put, ensure
your path textures (IE: terrain10.jpg etc) are named the same in each of the
'season' folders if you want to keep that path.You could do the same with
the snow textures. Then as seasons change, one needs only to copy the
required seasons texture set over the existing texture set within your
textures folder.

[View Quote]

lady nighthawk

Feb 1, 2005, 3:20am
Ya well that's my beef, you gotta rename or move the old ones so you can use
the next set :o/ I think we should have more and in sets to start with, so
we'd tell the world we want to use set 1 which is 0 - 64, or set 2 which is
65 - blah blah blah (too tired to do the math LOL). Right now it's a whole
lotta copyin over, just saying a few more sets of 64 would be nice :o}

LNH



--

[View Quote]

andras

Feb 1, 2005, 8:21am
[View Quote] Use the following php script on your OP and the path in the world features will be:
yourisp/youraccount/tourop/terrain.php
Every time you want to change your theme, just change the $setnameprefix variable in this script.
(Don't forget to change the $localpath to your actual settings :)

terrain.php:

<?php
// define your local path:
$localpath="/var/www/html/arts/";

// define a terrain name prefix for your theme:
$setnameprefix="winter_";

// extract the filename path
$rqname=substr(strstr($_SERVER['REQUEST_URI'],basename(__FILE__)),strlen(basename(__FILE__))+1);
// construct a local reference
$filename=$localpath . $rqname;
// check if exists
if (!file_exists($filename))
{
header('HTTP/1.1 404 Not exists');
exit ();
}
// let see if the filename is a terrain texture
if (strpos($rqname,"textures/terrain")&&strpos($rqname,".jpg"))
{
// Yes, so create a texture name which corresponds to our theme
$terrainname = substr($rqname,strpos($rqname,"terrain")) . $setnameprefix . strstr($rqname,"terrain");
// in this example the reference to textures/terrain12.jpg is translated to textures/winter_terrain12.jpg
$rqname=$terrainname;
// and recreate the local path with this modified one
$filename=$localpath . $rqname;
}
$headers = getallheaders();
// check if the request is only a check if the file is up to date
if(isset($headers["If-Modified-Since"]))
{
# $since = $_GET['If-Modified-Since'];
# if ($since)
// check if the modification time is more recent
$currentModified = filemtime($filename);
$rqtime=strtotime($headers["If-Modified-Since"]);
if ($currentmodified<$rqtime)
{
// send "Not modified" header back
header('HTTP/1.1 304 Not Modified');
exit();
}
}
// check the extension to set the proper mime type
if (strpos($rqname,".zip"))
{
$ctype="application/zip";
}
else
{
if (strpos($rqname,".jpg"))
{
$ctype="image/jpeg";
}
else
$ctype="application/download";
}
// open this file
$handle = fopen($filename, "rb");
// send the proper headers
header("Content-type: " . $ctype);
header("Content-Length: " . filesize($filename));
// and send the file itself too
fpassthru($handle);
exit ();
?>


--
Andras
"It's MY computer" (tm Steve Gibson)

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn