Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Loading Problem #255450
03/10/09 15:46
03/10/09 15:46
Joined: Dec 2008
Posts: 16
H
HansCzech Offline OP
Newbie
HansCzech  Offline OP
Newbie
H

Joined: Dec 2008
Posts: 16
Hey,
When I start the test run it works... at first, but the screen stays black and nothing happen... Does anyone know what the problem is?
My friend made the level and the size of that is 19mb! Is that maybe the problem?

Last edited by HansCzech; 03/10/09 16:13.
Re: Loading Problem [Re: HansCzech] #255482
03/10/09 18:56
03/10/09 18:56
Joined: Mar 2009
Posts: 112
Germany
K
KDuke Offline
Member
KDuke  Offline
Member
K

Joined: Mar 2009
Posts: 112
Germany
Hi HansCzech!

It would be usefull to see how this level is loaded.
Maybe you are missing a wait(1) or you accidently put a level_load into a loop?

Well we only can guess the problem if you don't provide some more information.
The source-code would be a start for this.

greetings

KDuke


Using A7 Free
Click and join the 3dgs irc community!
Room: #3dgs
Re: Loading Problem [Re: KDuke] #255493
03/10/09 21:04
03/10/09 21:04
Joined: Dec 2008
Posts: 16
H
HansCzech Offline OP
Newbie
HansCzech  Offline OP
Newbie
H

Joined: Dec 2008
Posts: 16
function main()
{
fps_max = 240;
level_load ("NEWGBirion12.wmb");
car = ent_create ("füürauto.mdl", vector(300, -3400, 30), my_car);
var snd_carhandle = ent_playloop (car, snd_car, 100);
while (1)
//and then there is a long function but nothing to do with the loading//
wait(1);
}

Re: Loading Problem [Re: HansCzech] #255497
03/10/09 21:20
03/10/09 21:20
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Ralph Offline
Senior Member
Ralph  Offline
Senior Member

Joined: Feb 2006
Posts: 385
Oldenburg,Germany
1. Put a wait(3); after the level_load... get a other result?
2. Do you save it as *.c file?
3. Do you have the free version of lite-c?

Re: Loading Problem [Re: Ralph] #255639
03/11/09 16:36
03/11/09 16:36
Joined: Dec 2008
Posts: 16
H
HansCzech Offline OP
Newbie
HansCzech  Offline OP
Newbie
H

Joined: Dec 2008
Posts: 16
Thanks now it works...the map/level is loading.
But the camera isn`t there where it was before (behind the car). It is in the ground and doesn`t react on my tasks.
Do you know what happened wrong now?

Re: Loading Problem [Re: HansCzech] #255647
03/11/09 18:05
03/11/09 18:05
Joined: Dec 2008
Posts: 16
H
HansCzech Offline OP
Newbie
HansCzech  Offline OP
Newbie
H

Joined: Dec 2008
Posts: 16
Ok that problem I killed myself ... :-D
But the game is now juddering all the time... I do not know why because that it hasn`t done before.

Re: Loading Problem [Re: HansCzech] #255836
03/12/09 22:33
03/12/09 22:33
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Ralph Offline
Senior Member
Ralph  Offline
Senior Member

Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Post the hole code (with all functions) here.
Than I can look at it.

Re: Loading Problem [Re: Ralph] #255935
03/13/09 18:25
03/13/09 18:25
Joined: Dec 2008
Posts: 16
H
HansCzech Offline OP
Newbie
HansCzech  Offline OP
Newbie
H

Joined: Dec 2008
Posts: 16
///////////////////////////////
#include <acknex.h>
#include <default.c>
#define v_mass 16
///////////////////////////////
var checkpoints_max = 8;
var checkpoints_x[8] = { 185, -1390, 1000, -2000, 500, -800, 700 ,1 };
var checkpoints_y[8] = { -1327, -1207, -1000, 2000, -500, 800, -700 ,-1 };
var checkpoint_number = 0;
var checkpoints_treshold = 150;
var checkpoint_distance;
var time;
var time2;
SOUND* snd_checkpoint = "mousesnd.wav";
SOUND* snd_car = "car_idle.wav";
var camera_max = 3;
var camera_number = 0;
var speed_max = 99;

BMAP* panelkmh_pcx = "panelkmh.pcx"; // meine erste bmap

PANEL* first_pan = //mein erstes panel
{
pos_x = 500;
pos_y = 420;
layer = 2;
bmap = panelkmh_pcx;
flags = OVERLAY | VISIBLE;
}

PANEL* first_pan =
{
digits (110, 10, 2, "Calibri#18bi", 1, checkpoint_number);
flags = VISIBLE;
}
PANEL* second_pan =
{
digits (135, 10, 2, "Calibri#18bi", 1, checkpoints_max);
flags = VISIBLE;
}
PANEL* third_pan =
{
digits (130, 10, "/", "Calibri#18bi", 1, 0);
flags = VISIBLE;
}
PANEL* fourth_pan =
{
digits (10, 10, "Checkpoints:", "Calibri#18bi", 1, 0);
flags = VISIBLE;
}
PANEL* time_pan =
{
digits (70, 30, "%.2f", "Calibri#24bi", 1, time);
flags = VISIBLE;
}
PANEL* time1_pan =
{
digits (10, 30, "Time:", "Calibri#24bi", 1, 0);
flags = VISIBLE;
}
PANEL* speed_pan =
{
digits (580, 450, 2, "Calibri#30bi", 1, car_v);
flags = VISIBLE;
layer = 10;
}

PANEL* speed_pan2 =
{
digits (500, 450, "km/h", "Calibri#30bi", 1, 0);
flags = OVERLAY | VISIBLE;
}


ENTITY* car_cam=
{
layer = 10;
x = 20;
y = -10;
z = -10;
}
var cameradistance = 300;
ENTITY* car;
var car_v = 0;
var car_a = 0;


action my_car()
{
car = my;
var c_down = 0;
while (1)
{ // move the car using relative_speed
car_a = 0;
if (key_cul){
if (car_v>=-1){
my.pan += 4*time_step; // increase the pan angle of the car
} else{
my.pan -= 4*time_step; // decrease the pan angle of the car
}
}
if (key_cur){
if (car_v>=-1){
my.pan -= 4*time_step; // increase the pan angle of the car
} else{
my.pan += 4*time_step; // decrease the pan angle of the car
}
}
if (key_cuu){// press and hold the "Space" key to move the car
car_a = 1.15;
}
if (key_cud){ // ruckwärts fahre
car_a = -1.75;
}
if (key_c && !c_down){
c_down=1;
camera_number++;
if (camera_number == camera_max){
camera_number = 0;
}
}
if (!key_c){
c_down = 0;
}
wait (1);
}

}
function main()
{
fps_max = 40;
level_load("NeedforSpeedGB.wmb");
car = ent_create ("car2.mdl", vector(300, -3400, 20), my_car); // erstelle den Ball
var snd_carhandle = ent_playloop (car, snd_car, 100);
screen_color.blue = 150;
video_mode = 7;
while (1)
{
if (camera_number == 0){
camera.z = 200; // and place it at z = 1000 quants
camera.tilt = -20; // make it look downwards
cameradistance = 300;
}
if (camera_number == 1){
camera.z = 80; //d place it at z = 1000 quants
camera.tilt = -10; // make it look downwards
cameradistance = 25;
}
if (camera_number ==2){
camera.z = 350; //d place it at z = 1000 quants
camera.tilt = -30; // make it look downwards
cameradistance = 300;
}
car_cam.pan -= (car_cam.pan-car.pan)/2.5*time_step;
car_cam.x -= (car_cam.x - car.x)/2.5*time_step;
car_cam.y -= (car_cam.y - car.y)/2.5*time_step;
camera.x = car_cam.x - cos(car_cam.pan)*cameradistance; // keep the camera 300 quants behind the ball
camera.y = car_cam.y - sin(car_cam.pan)*cameradistance; // using the same y with the ball

camera.pan = car_cam.pan;
if (car_a==0){
car_v*=50-(0.03*time_step);
}
wait(3);

car_v += car_a * time_step *3;

if (car_v>speed_max){
car_v=speed_max;
}
if (car_v<-15){
car_v=-15;
}
snd_tune(snd_carhandle, 40+abs(car_v)/speed_max*60, 100+abs(car_v)/speed_max*60, 0);
if (checkpoint_number>0){
time += timer()/1000000;
}
var car_distance = c_move(car, vector(car_v * time_step, 0, 0), nullvector, GLIDE);
var direction = 1;
if (abs(car_v)>0) { direction = car_v / abs(car_v); }
car_v = direction * car_distance / time_step;
checkpoint_distance = sqrt(pow(car.x - checkpoints_x[checkpoint_number], 2)+ pow(car.y - checkpoints_y[checkpoint_number], 2));
if (checkpoint_distance < checkpoints_treshold){
snd_play(snd_checkpoint,100,0);
if (checkpoint_number==0){
time = 0;
timer();
}
checkpoint_number++;
if (checkpoint_number == checkpoints_max){
checkpoint_number=0;
}

wait (1);
}
}

}

Re: Loading Problem [Re: HansCzech] #255937
03/13/09 18:29
03/13/09 18:29
Joined: Dec 2008
Posts: 16
H
HansCzech Offline OP
Newbie
HansCzech  Offline OP
Newbie
H

Joined: Dec 2008
Posts: 16
Thies is the what I have till now... But when I leaf the cur_up key the car makes an "mega-boost" and is on his highest speed. How can I change that?

Re: Loading Problem [Re: HansCzech] #255940
03/13/09 18:56
03/13/09 18:56
Joined: Mar 2009
Posts: 112
Germany
K
KDuke Offline
Member
KDuke  Offline
Member
K

Joined: Mar 2009
Posts: 112
Germany
If I get that right this piece of code
Code:
if (car_a==0)
{
   car_v*=50-(0.03*time_step);
}

constantly accellerates the car if you neither press the accellerator nor the break.

What is this part intended to do? Really I can't see what it is for X-D

greetings
KDuke


Using A7 Free
Click and join the 3dgs irc community!
Room: #3dgs

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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