Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 05:41
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AbrahamR, AndrewAMD), 1,278 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Had a Skycube once, but now is a No-Show #89246
09/09/06 17:31
09/09/06 17:31
Joined: Aug 2003
Posts: 73
Newport, N.C.
D
David Offline OP
Junior Member
David  Offline OP
Junior Member
D

Joined: Aug 2003
Posts: 73
Newport, N.C.
I had a skycube show up on my scene last week, but I had to redo my folders and re-build the level and now I can't get the skycube to show up.

I have something wrong.

Can someone look over these scripts and spot where problem is??

If problem not in them, then where?

Most of these are unchanged templates from the Template_6 folders.


////////////////////////////////////////////////////////////////////////
// A6 main wdl:
// Created by WED.
////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////
// The PATH keyword gives directories where template files can be found.
path "C:\\Program Files\\GStudio6\\template_6"; // Path to A6 templates directory
path "C:\\Program Files\\GStudio6\\template_6\\code"; // Path to A6 template code subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\images"; // Path to A6 template image subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\sounds"; // Path to A6 template sound subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\models"; // Path to A6 template model subdirectory

/////////////////////////////////////////////////////////////////
// Filename of the starting level.
string level_str = <porch1.WMB>; // give file names in angular brackets
////////////////////////////////////////////////////////////

sky cube5
{
type=<skycube5+6.tga>;
flags=cube,visible;
layer=2;
z=0;
}


////////////////////////////////////////////////////////////////////////////
// Included files
include <gid01.wdl>; // global ids
include <display00.wdl>; // basic display settings
include <plSelect.wdl>;
include <levels00.wdl>;
include <cameraTarget.wdl>;
include <miscInput01.wdl>;
include <plBipedInput01.wdl>;
include <bipedPhy01.wdl>;
include <bipedAnim01.wdl>;
include <bipedSnd01.wdl>;
include <plBiped01.wdl>;
include <trigger00.wdl>;
include <door01.wdl>;
include <cameraSelect.wdl>;
include <camera1stPerson01.wdl>;





/////////////////////////////////////////////////////////////////
// Desc: The main() function is started at game start
function main()
{
// set some common flags and variables
// freeze all entity functions
freeze_mode = 1;
// no level has been loaded yet...
gid01_level_state = gid01_level_not_loaded;

// entry: Warning Level (0,1, or 2)
// entry_help: Sets sensitivity to warnings (0 = none, 1 = some, 2 = all).
warn_level = 2; // announce bad texture sizes and bad wdl code


// entry: Starting Mouse Mode (0, 1, or 2)
mouse_mode = 0;

// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

// now load the level
level_load(level_str);

wait(2); // let level load
// level should be loaded at this point...
gid01_level_state = gid01_level_loaded;

//+++ load starting values


// un-freeze the game
freeze_mode = 0;

// save start of game here
wait(6); // allow time for functions that wait for "gid01_level_loaded" to load
file_delete("start0.SAV"); // remove any old savefile
wait(1);
if( game_save("start",0,SV_ALL) <= 0)
{
diag("\nWARNING! main - Cannot save 'start' of level (ignore on restarts).");
}
else
{
diag("\nWDL: main - Game 'start' saved.");
}


// main game loop
while(1)
{
if(gid01_level_state != gid01_level_loaded)
{
freeze_mode = 1; // pause the game
while(gid01_level_state != gid01_level_loaded) { wait(1); }
freeze_mode = 0; // resume the game
}
wait(1);
}

}


// Desc: this is the function used to restart the game.
function main_restart_game()
{
// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

// freeze the game
freeze_mode = 1;

if( game_load("start",0) <= 0)
{
diag("\nWARNING! main_restart_game - Cannot load 'start' of level.");
}
else
{
diag("\nWDL: main_restart_game - Game 'start' loaded");
}

// un-freeze the game
freeze_mode = 0;
}


// Desc: this is the function used to quit the game.
function main_quit()
{
//+++ // save global skills & strings
exit;
}

/////////////////////////////////////////////////////////////////
// The following definitions are for the pro edition window composer
// to define the start and exit window of the application.
WINDOW WINSTART
{
TITLE "3D GameStudio";
SIZE 480,320;
MODE IMAGE; //STANDARD;
BG_COLOR RGB(240,240,240);
FRAME FTYP1,0,0,480,320;
// BUTTON BUTTON_START,SYS_DEFAULT,"Start",400,288,72,24;
BUTTON BUTTON_QUIT,SYS_DEFAULT,"Abort",400,288,72,24;
TEXT_STDOUT "Arial",RGB(0,0,0),10,10,460,280;
}

/* no exit window at all..
WINDOW WINEND
{
TITLE "Finished";
SIZE 540,320;
MODE STANDARD;
BG_COLOR RGB(0,0,0);
TEXT_STDOUT "",RGB(255,40,40),10,20,520,270;

SET FONT "",RGB(0,255,255);
TEXT "Any key to exit",10,270;
}*/


/////////////////////////////////////////////////////////////////
//INCLUDE <debug.wdl>;


//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
///////////////////THE DISPLAY00 WDL FILE ////////////
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////


ifndef display00_wdl;
define display00_wdl;

// ver: 2
// date: 040505


// title: Display
// image: display.pcx
/*
help: The display represents the screen that all windows are rendered to.
*/

// needs: gid01.wdl

// prefix: display00_
// idcode: 00A


//----------------------------------------------------------------------
// section: General Settings

// entry: Screen Resolution
// entry_help: Set the initial screen resolution.
// entry_help: Note: Some resolutions may not be available on all video cards.
// entry_help:or for all versions of GStudio.
// entry_help: 1 - 320x200, 2 - 320x240, 3 - 320x400, 4 - 400x300,
// entry_help: 5 - 512x384, 6 - 640x480, 7 - 800x600, 8 - 1024x768
// entry_help: 9 - 1280x960, 10 - 1400x1050, 11 - 1600x1200
// cntl: spin 1 11 1
// id: 1
var video_mode = 7; // 800x600

// entry: Color Depth
// entry_help: Video color depth. Can be set to 16 (high-color) or 32 (true-color)
// cntl: spin 16 32 16
// id: 2
var video_depth = 16; // 16bit high-color

// entry: Force Full/Window?
// help: Force display to fullscreen (1) or windowed (2), or leave unchanged (0)
// cntl: spin 0 2 1
// id: 3
define display00_force_window_full_const = 0;

// entry: Watermark Loc
// help: Select the corner where the watermark will appear.
// help:(0-off, 1-4 select corner)
// cntl: spin 0 4 1
// id: 4
var logo = 0;

//----------------------------------------------------------------------
// section: Limits

// entry: Max Entities
// help: Set the maximum number of entities.
// cntl: spin 0 x x
// id: 5
var max_entities = 1000;

// entry: Max Particles
// help: Set the maximum number of Particles
// cntl: spin 0 x x
// id: 6
var max_particles = 2000;


//----------------------------------------------------------------------
// section: Frames Per Second (FPS)

// entry: FPS MAX
// help: Maximum frame per second (FPS)
// help: Note! TIME correction may not work at very high frame rates!
// cntl: spin 1 x 1
// id: 7
var fps_max = 60;

// entry: FPS MIN
// entry: Minimum frame per second (FPS)
// cntl: spin 1 x 1
// id: 8
var fps_min = 5;

// enable: FPS Lock
// help: Lock time step to maximum frame per second (FPS)
// id: 9
// var fps_lock = ON;

//----------------------------------------------------------------------
// section: Lighting

// entry: Max Dynamic
// entry_help: Gives the maxium number of dynamic lights (including the sun) that
// entry_help: can be active at the same time (Range: 2..8).
// cntl: spin 2 8 1
// id: 10
var max_lights = 8;


// enable: Dynamic Sun?
// help: Use directional light for sun?
// help: Note: This will use one of the dynamic lights.
// id: 11
var sun_light = 1;

//----------------------------------------------------------------------
// section: Shadow

// entry: Shadow Offset
// help: Set the distance that entity shadows are offset from the floor
// id: 12
var shadow_offset = 2.5;

// enable: Stencil Shadow
// help: Stencil shadows 'bend' around corners, and objects cast shadows on themselves.
// id: 52
var shadow_stencil = on;


//----------------------------------------------------------------------
// section: Entity Display Settings


// entry: Floor Range
// help: Set the range within which the light value of a entity is effected.
// cntl: spin 0 x 1
// id: 13
var floor_range = 1000;

// enable: Disable Trans. Sort
// help: (Advanced) Disable sorting of transparent entities
// id: 14
// var d3d_entsort = 0;

// enable: Share textures?
// help: (Advanced) Make map entities share texture with level and each other.
// id: 15
var tex_share = 1;



//----------------------------------------------------------------------
// section: Mouse

// entry: Mouse Icon
// help: Set the look of the windows mouse pointer when over the application window.
// entry_help: 0: The mouse pointer is always switched off over the window.
// entry_help: 1: The mouse pointer is switched off when mouse_mode is activated
// entry_help: and a mouse_map is set, otherwise it's a hand.
// entry_help: 2: Like 1, but the mouse pointer is the standard arrow.
// entry_help: 3: Like 1, but the mouse pointer is a crosshair.
// entry_help: 4: Like 1, but the mouse pointer is a hourglass.
// cntl: spin 0 4 1
// id: 20
var mouse_pointer = 0; // turn off mouse pointer


//----------------------------------------------------------------------
// section: Advanced Settings

// entry: Anisotopy
// help: Maximum level of anisotopy (0 - off)
// help: Used to help eliminate distortion in textures whose surfaces
// help:are oriented with respect to the screen plane.
// help: Set to a value greater than 1.0 to activate.
// id: 21
var d3d_anisotropy = 0;

// enable: Force Triple Buffer?
// help: (Advanced) Force triple buffering?
// id: 22
// var d3d_triplebuffer = 1;


// enable: Force VSync
// help: (Advanced) Force vertical sync?
// id: 24
// var d3d_vsync = 1;


// enable: Disable Mipmapping
// help: Deactivate mipmapping
// id: 26
// var d3d_mipmapping = 0;

// entry: Mipmap dist (flat)
// help: Set the relative distance for switching mipmap textures on flat surfaces
// id: 27
var mip_flat = 1.5;

// entry: Mipmap dist (shaded)
// help: Set the relative distance for switching mipmap textures on shaded surfaces
// id: 28
var mip_shaded = 1.0;

// enable: Adv. Light Res?
// help: Improve light resolution
// id: 29
// var d3d_lightres = 1;

// enable: Monochrome?
// help: Disable color lights
// id: 30
// var d3d_monochrome = 1;

// entry: Video mem reserve
// help: (Advanced) Set the amount of video memory reserved for non-managed textures.
// help:Use a negative value to let 3DGS set the memory reserve for you (recommended).
// id: 31
define display00_texture_reserve_const = -1;

// entry: Detail pixel num.
// help: Set the number of detail pixels per terrain surface pixel.
// id: 32
var detail_size = 4;




// An array of bit-encoded fields which tell which, if any, camera is
//currently assigned to update a particular camera.
// Index: 0:main view, 1-4: sub views 1-4
var display_active_camera_vec[5];

// Count of the number of active views
// default to just the main view (1)
var display_active_views = 1;




//----------------------------------------------------------------------
// section: Clip Ranges

// entry: Clip Factor
// help: Multiplier for the clipping range or world (BSP) polygons.
// help: Example: A value of 2 would clip world polygons at twice
// help:the distance as object polygons.
// id: 40
var clip_factor = 2.0;

// entry: Clip Particles
// help: Multiplier for the clipping range of particles.
// help: Example: A value of 0.5 would clip particles at half the
// help:distance as object polygons.
// id: 41
var clip_particles = 0.5;

// entry: Clip Size
// help: Minimum number of pixels a polygon must cover before being clipped.
// help: Example: a value of 0.5 would clip polygons whose size is less
// help:than half a pixel.
// id: 42
var clip_size = 0.5;




// function_help: Init display values
// Init values
// Update views using assigned update functions
starter Display00_Init()
{
diag("\nWDL-Loaded:display00.wdl");
// Init display

// entry: Near Camera clip
// help: Reduce this value if you can see through near objects
// cntl: spin 1 x 1
// id: 43
camera.clip_near = 10;

// entry: Far Camera clip
// help: Increase this value if objects vanish too soon.
// cntl: spin 1 x 1
// id: 44
camera.clip_far =50000;

// force a switch on the video modes if display00_force_window_full_const is set
if(display00_force_window_full_const != 0) { video_switch(0,0,display00_force_window_full_const); }

//----------------------------------------------------------------------
// section: Background Color

// entry: Red
// help: Set background color's red component.
// help: Note: if all three components are set to 0, no background color is drawn.
// cntl: spin 0 255 1
// id: 45
bg_color.red = 1;
// entry: Green
// help: Set background color's green component.
// help: Note: if all three components are set to 0, no background color is drawn.
// cntl: spin 0 255 1
// id: 46
bg_color.green = 1;
// entry: Blue
// help: Set background color's blue component.
// help: note: if all three components are set to 0, no background color is drawn.
// cntl: spin 0 255 1
// id: 47
bg_color.blue = 1;

// force texture reserve if display00_texture_reserve_const is set
if(display00_texture_reserve_const >= 0)
{
if (d3d_texreserved )
{
// reserve the amount asked for or half the amount available (whichever is less)
d3d_texreserved = min(display00_texture_reserve_const,d3d_texfree/2);
}
}

//----------------------------------------------------------------------
// section: Fog Settings

// entry: Fog color Index
// entry_help: Select the fog color from the Map Prop panel in WED.
// cntl: spin 0 5 1
// id: 52
fog_color = 2;

// entry: Fog Start
// help: Percent of clip_range until fog start
// help: There won't be any fog closer than fog_start
// id: 50
camera.fog_start = 50;
camera.fog_start /= 100;
if(camera.fog_start < 0) { camera.fog_start = 0; }


// entry: Fog End
// help: Percent of clip_range until fog end
// help: The world will be all foggy beyond fog_end
// id: 51
camera.fog_end = 80;
camera.fog_end /= 100;
if(camera.fog_end < 0) { camera.fog_end = 0; }

camera.fog_start = camera.fog_start * camera.clip_far; // fog at 80% of clip_range
camera.fog_end = camera.fog_end * camera.clip_far; // fog till 90% of clip_range
}


endif;

//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////

Re: Had a Skycube once, but now is a No-Show [Re: David] #89247
09/10/06 03:54
09/10/06 03:54
Joined: Sep 2006
Posts: 94
Sunbury Victoria, AU
Shaque Offline
Junior Member
Shaque  Offline
Junior Member

Joined: Sep 2006
Posts: 94
Sunbury Victoria, AU
Maybe the sky map is too low to see. Try adding a negative tilt to the sky map and adding the overlay flag:


sky cube5
{
type=<skycube5+6.tga>;
flags=cube,visible,overlay;
tilt=-10;
layer=2;
z=0;
}


I don't claim to be an expert, so I don't know what the z means, but that's how mine works. I hope that helps.


Knowledge is a right, wisdom is a choice.
Re: Had a Skycube once, but now is a No-Show [Re: Shaque] #89248
09/10/06 06:01
09/10/06 06:01
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
I would guess it's either not in the folder of the level, or its differnt then the name what you have in the define

or mabey you didn't place a skybox in your level

-------------------------------------

you shouldn't need to set tilt

z= sets the Z elevation, useful if you need to scoot your skycube up or down

Re: Had a Skycube once, but now is a No-Show [Re: Grimber] #89249
09/10/06 12:36
09/10/06 12:36
Joined: Aug 2003
Posts: 73
Newport, N.C.
D
David Offline OP
Junior Member
David  Offline OP
Junior Member
D

Joined: Aug 2003
Posts: 73
Newport, N.C.
GRIMBER,
You are correct, the Z is for elevation, but what exactly do you mean by not placing a skybox? I have a box that encompasses my entire level and I put a low count texture on it. The skycube texture is in the folder with my level and it is in the "Images" folder and I even added it to my TEXTURES WAD.
At first I thought you meant a "skybox" was a SPRITE or PREFAB or Something under Objects Tab, but that can't be, no such thing there.
So, what do you mean by "skybox", if it is not the hollow box I have my level enclosed in?

Re: Had a Skycube once, but now is a No-Show [Re: David] #89250
09/10/06 15:08
09/10/06 15:08
Joined: Mar 2006
Posts: 724
the Netherlands
Frits Offline
User
Frits  Offline
User

Joined: Mar 2006
Posts: 724
the Netherlands
Have you set Sky in Properties --> tab <blocks> from the surrounding box?

Regards,
Frits


I like to keep scripting simple, life is hard enough as it is.
Regards,
Frits
Re: Had a Skycube once, but now is a No-Show [Re: Frits] #89251
09/10/06 18:31
09/10/06 18:31
Joined: Aug 2003
Posts: 73
Newport, N.C.
D
David Offline OP
Junior Member
David  Offline OP
Junior Member
D

Joined: Aug 2003
Posts: 73
Newport, N.C.
DERRR !!!
I overlooked the simple. When deleting and rebuilding I neglected to change the property to SKY. THAT WAS IT !!!
Thank you Frits for the help
It works now !!

This is what I believe Grimber called a "skybox" in the level.
I made a hollow box, but left the property to Shaded...bad error,,been chasing this a couple days.

Thanks all
This is solved

Re: Had a Skycube once, but now is a No-Show [Re: David] #89252
09/11/06 07:26
09/11/06 07:26
Joined: Mar 2006
Posts: 724
the Netherlands
Frits Offline
User
Frits  Offline
User

Joined: Mar 2006
Posts: 724
the Netherlands
Glad I could help.

Regards,
Frits


I like to keep scripting simple, life is hard enough as it is.
Regards,
Frits

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1