Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
speed #158581
10/04/07 01:10
10/04/07 01:10
Joined: Apr 2006
Posts: 28
S
sky Offline OP
Newbie
sky  Offline OP
Newbie
S

Joined: Apr 2006
Posts: 28
I have a level consisting of 2 large rooms. When I run this the camera moves very slowly. Is there a way of speeding it up. fps should be ok as I get 85 fps with another engine in a level with 30 rooms.( geforce 7600 card)

Re: speed [Re: sky] #158582
10/04/07 09:49
10/04/07 09:49
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
u could shrink the whole level, hold down shift while moving (i don't know if that still works) or write a simple fly-through script which allows u to move the camera faster.

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: speed [Re: sky] #158583
10/04/07 11:38
10/04/07 11:38
Joined: Aug 2006
Posts: 152
vector(200,45,338)
Marwan Offline
Member
Marwan  Offline
Member

Joined: Aug 2006
Posts: 152
vector(200,45,338)
Or try to modify the free camera script in the templates folder, play with the values


age:16 game design and programming experience:2 years
Re: speed [Re: Marwan] #158584
10/04/07 12:44
10/04/07 12:44
Joined: Apr 2006
Posts: 28
S
sky Offline OP
Newbie
sky  Offline OP
Newbie
S

Joined: Apr 2006
Posts: 28
I forgot to mention that I did the level in 3dws and imported it into wed. When I design level in wed it does move faster. But I would like to increase camera speed.

Re: speed [Re: sky] #158585
10/05/07 17:11
10/05/07 17:11
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
You can increase camera speed in both WED 3D view and the unscripted engine call by setting 'walk_speed' in File, Preferences, Main, Walk_speed.

If you want full control within the 'Run' parameter (run with the engine), you need a main script and camera or player action.

Example//--->George Pirvu
Code:
 
path ".\\scripts";
path ".\\models";
path ".\\models\\sky";
path ".\\models\\environment";
path ".\\sounds";
path ".\\images";
path ".\\maps";
////////////////////////////////////////////////////////////////////////////////////includes

//include "cameras.wdl";

////////////////////////////////////////////////////////////////////////////////////vars

//var d3d_antialias = 1;
//var shadow_stencil = on;
var gv_mouse_caged = off;//--->mercuryus
var camera_max_distance;
var camera_distance = 200;
var camera_height = 80;
var movement_speed; // player's movement speed
var gravity_force; // external forces (gravity)
var jumping = 0;
var game_started = 0;

////////////////////////////////////////////////////////////////////////////////////strings

string testLevel = "Your level name HERE.wmb";

////////////////////////////////////////////////////////////////////////////////////
//fonts
font arial = "arial", 0, 15;
//////////////////////////////////////////////////////////////////////////
//defines
define health skill40;

////////////////////////////////////////////////////////////////////////////
//bmaps



////////////////////////////////////////////////////////////////////////////
//functions
function player_jumps();
function start_game();
/////////////////////////////////////////////////////////////////////////
sky cube
{
type=<canyons+6.tga>;
layer=2; /// default
flags=cube,visible;
}


panel debug_pl// FPS counter
{
pos_x = 10;
pos_y = 10;
layer = 10;
digits = 5, 5, 3, arial, 16, time_fac;
flags = visible, refresh;
}

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

function main()
{
d3d_lightres = 1;
var d3d_mipmapping = 1;
var disable_z_glide = 1;
video_switch(7, 32, 0);
d3d_entsort = 3;//examples

fps_max = 60;//stop fps issues with FPS over 100

game_started = 1;
start_game();
}

function start_game()
{
wait(1);

me = null;
camera.clip_near = 0;
level_load (testLevel);

wait (3);
camera.clip_far = 45000;//or whatever your clipping dist is

}

action players_code
{
player = my; // I'm the player
wait(1); // wait 1 frame after creation
c_setminmax(me);
while (1)
{

camera.x = player.x - camera_distance * cos(player.pan);
camera.y = player.y - camera_distance * sin(player.pan);
camera.z = player.z + camera_height;

camera.pan = player.pan;
camera.tilt += 4 * mouse_force.y * time;


movement_speed.x = 15 * (key_w - key_s) * time_step; // move the player using "W" and "S"
movement_speed.y = 15 * (key_a - key_d) * time_step; // move the player using "A" and "D"

vec_set(temp.x, my.x);
temp.z = my.z - 30000;
gravity_force.z = max(-35*time_step, -(c_trace(my.x, temp.x, ignore_me|use_box)-1));

if ((key_w == 1) || (key_s == 1)) // the player is walking
{
ent_cycle("walk", my.skill20); // play walk frames animation
my.skill20 += 10 * time_step; // "walk" animation speed
if (my.skill20 > 100) {my.skill20 = 0;} // loop animation
if (my.skill30 >50)
{
ent_cycle("crouch", my.skill21);

}
}
else // the player is standing
{
ent_cycle("stand", my.skill21); // play stand frames animation
my.skill21 += 2 * time_step; // "stand" animation speed
if (my.skill21 > 100) {my.skill21 = 0;} // loop animation
}
if (key_a== 1) // strafe
{
ent_cycle("walk", my.skill24);
my.skill24 += 8 * time_step; // "walk" animation speed

}
if (key_d== 1) // strafe
{
ent_cycle("walk", my.skill24);
my.skill24 += 5 * time_step; // "walk" animation speed

}

if (key_r ==1 && key_w==1 )
{
movement_speed.x += 35 * time_step;
ent_cycle("run", my.skill20); // play run frames animation
my.skill20 += 6 * time_step; // "run" animation speed
if (my.skill20 > 100) {my.skill20 = 0;} // loop animation
if (my.skill30 <50)
{
ent_cycle("crouch", my.skill23);

}
else // the player is standing
{
ent_cycle("stand", my.skill21); // play stand frames animation
my.skill21 += 2 * time_step; // "stand" animation speed
if (my.skill21 > 100) {my.skill21 = 0;} // loop animation
}
}

if (jumping == 0)
{
vec_set(temp.x, my.x);
temp.z = my.z - 30000;
gravity_force.z = max(-35*time_step, -(c_trace(my.x, temp.x, ignore_me|use_box)-2));


my.skill30 = gravity_force;


if (my.skill30 < 20) // fall on the ground when closer than 50 quants to the surface
{
movement_speed.z = -my.skill30* time_step;
}
else // way up in the air?
{
movement_speed.z -= 20 * time_step; // then decrease player's z slowly
}
my.skill30 = gravity_force;

}

if (key_space == 1) // space to jump
{
player_jumps();
}

c_rotate(my, vector(6*(-mouse_force.x)*time_step, 0, 0), ignore_you);
c_move(my, movement_speed.x, gravity_force.x, glide); // move the player

wait(1);
}
}

function player_jumps()
{
proc_kill(4);
my.skill20 = 0;
jumping = 1;

while (my.skill20 < 50) //'hang' duration
{
ent_cycle("jump", my.skill20);
my.skill20 += 3 * time_step; // "jump" animation speed

if (my.skill20 < 50)
{
movement_speed.z += 0.1 * time_step;
}
else
{
movement_speed.z -= 0.1 * time_step;
}
wait (1);
}
jumping = 0;
}



Ive used this a few times in A6 but it needs some tweaking for A7 as the jump part fails sometimes but its enough to get you going.


Moderated by  HeelX, rvL_eXile 

Gamestudio download | 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