Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 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
Car Physics Demo Script Problems #36481
11/18/04 19:08
11/18/04 19:08
Joined: Sep 2004
Posts: 40
I
iprogramgames2 Offline OP
Newbie
iprogramgames2  Offline OP
Newbie
I

Joined: Sep 2004
Posts: 40
I have several problems with the demo SCRIPT (not the compiled demo):

I must make this clear. I have played the compiled demo and it runs great. I expected the same from compiling the script but this is not the case.

1. Am I the only person that had to change the scripts to get the car demo to work? I really appreciate the free (for pro users) script but it doesn't work as is. Certain functions required a vector and had values set to 0 (zero). I had to change these to nullvector.

2. Am I the only person that is having problems with the car breaking (stopping) when I try to accelerate? This happens with the keyboard and joystick. I have narrowed it down to this piece of code located within the SpeedControl() function located within physics_car.wdl:

// if we drive in one direction and want to change direction, apply brakes
// (angSpeed>0 checks if rear wheel is turning forward
// direction<0 checks if user hits reverse key
if ((angSpeed>5 && direction<0) || (angSpeed<-5 && direction>0))
{
targetSpeed=0; // brake
// press brakes quarter down when rolling at high speed
if (abs(angSpeed)>0.25*maxAngSpeed)
{
phcon_setmotor(wheelRL, nullvector, vector(angSpeed*0.5, 0.5*maxTorqueBrake,0), nullvector);
phcon_setmotor(wheelRR, nullvector, vector(angSpeed*0.5, 0.5*maxTorqueBrake,0), nullvector);

if (abs(angSpeed)>0.50*maxAngSpeed)
{
EventBrake(); // braking sound
}

}

Why in the world is this code automatically breaking for me with that EventBrake(); call?

Someone please give me some good code.

Re: Car Physics Demo Script Problems [Re: iprogramgames2] #36482
11/18/04 21:39
11/18/04 21:39
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline
Serious User
indiGLOW  Offline
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Why dont you create a debug panel to display all the variables, maybe the equation is always true? At least this way you might spot the problem.

Im no expert, but I can't see anything wrong with the script


The Art of Conversation is dead : Discuss
Re: Car Physics Demo Script Problems [Re: indiGLOW] #36483
11/19/04 03:54
11/19/04 03:54
Joined: Dec 2002
Posts: 1,866
B
b_102373 Offline
Senior Developer
b_102373  Offline
Senior Developer
B

Joined: Dec 2002
Posts: 1,866
Obviosly you have the PRO Version. It should run fine with no problems. What version of PRO are you using and if not then how did you get the scripts?

Cheers

Re: Car Physics Demo Script Problems [Re: b_102373] #36484
11/19/04 05:07
11/19/04 05:07
Joined: Sep 2004
Posts: 40
I
iprogramgames2 Offline OP
Newbie
iprogramgames2  Offline OP
Newbie
I

Joined: Sep 2004
Posts: 40
Yes, I have pro version 6.22. Just to make sure it wasn't my version I updated (after copying my original gstudio verrsion 6.22 folder) to 6.31.3. It still does the same thing. Why doesn't the scrip work like the compiled demo?

One of my main reasons for choosing Game Studio to develop on is the resources and community. Am I the only one who has noticed that even though Game Studio has many great contributions more than half seem to be buggy and one must fix these problems by his/herself. For example, why can't I simply run this script as opposed to having to correct the errors first? And with the NewtonCar action (3rd party product) why all the problems with adding tires to a vehicle. Even when one such as myself follows each and every direction things just don't work as stated. I've been using this engine since the A4 in 1998 and have seen it become what it is today. Just a little effort on ensuring free contributions WORK would be VERY nice. It's like saying: "Here, use this great tool." And when you try to use the tool as shown it simply doesn't work. Hey, I'll even volunteer to be a tester prior to the release of these extras. I believe it's VERY important as the "easier" Game Studio is to use the more successful it will be.

Sincerely,

Iprogramgames

Re: Car Physics Demo Script Problems [Re: iprogramgames2] #36485
11/19/04 06:02
11/19/04 06:02
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Quote:

1. Am I the only person that had to change the scripts to get the car demo to work? I really appreciate the free (for pro users) script but it doesn't work as is. Certain functions required a vector and had values set to 0 (zero). I had to change these to nullvector.


Not with more recent versions, phFunctions support 0 for nullvector.

Quote:

2. Am I the only person that is having problems with the car breaking (stopping) when I try to accelerate?


Unplug your joysticks to make sure it's not stopping the car.

If anyone else encounters this problem please confirm. I just tested it with 6.31.3 and there was a problem with a panel definition but everything else worked fine.

Re: Car Physics Demo Script Problems [Re: Marco_Grubert] #36486
11/19/04 09:02
11/19/04 09:02
Joined: Sep 2004
Posts: 40
I
iprogramgames2 Offline OP
Newbie
iprogramgames2  Offline OP
Newbie
I

Joined: Sep 2004
Posts: 40
WooHoo it works as is with version 6.31.3. I looked around and never found a reference to requirements for running it (another commonality I experience). Anyway, while I have your attention have you ever created that phent_clearvelocity() function? The original thread is here:

http://www.conitecserver.com/ubbthreads/showflat.php?Cat=&Number=309750&page=1&view=collapsed&sb=5&o=&fpart=1#309750

Thanks

Re: Car Physics Demo Script Problems [Re: iprogramgames2] #36487
11/23/04 05:59
11/23/04 05:59
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Yes, phent_clearvelocity(phent) is part of 6.31.3

Re: Car Physics Demo Script Problems [Re: Marco_Grubert] #36488
11/23/04 19:34
11/23/04 19:34
Joined: Sep 2004
Posts: 40
I
iprogramgames2 Offline OP
Newbie
iprogramgames2  Offline OP
Newbie
I

Joined: Sep 2004
Posts: 40
Freekin sweet!!! Thanks Marco.


Moderated by  HeelX, Spirit 

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