Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Martin_HH, TipmyPip), 1,279 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
scripting "Racing" rules #98197
11/10/06 06:15
11/10/06 06:15
Joined: Sep 2006
Posts: 106
FairyLand!!!
RruthH Offline OP
Member
RruthH  Offline OP
Member

Joined: Sep 2006
Posts: 106
FairyLand!!!
Hi again!

Currently making a racing game;

I have a question: How do i code it so i know if the player is going
in the "wrong direction", so i can display "REVERSE!" on the screen?

And for the other cars (neutral), are paths a better option for them
or those "robby the robot" AIs?

if you know some racing tutorials, it would really help me if u posted them.

Thanx for ur time!

Re: scripting "Racing" rules [Re: RruthH] #98198
11/10/06 09:02
11/10/06 09:02
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
The first thing that comes to my mind is to separate the track on parts defined in a file (or maby arrays if you cant use databases yet )Check to see where on the track the player is , and you defined the needed pan on that part(min_x,min_y,min_z and max_x,max_y,max_z) and if it is > player.pan + 90 or player.pan - 90 then display that the player is going in the wrong direction.
As for the AI , I would suggest something like robby. But it will need a lot of scripting to make it for cars and effective. With paths the cars will go every time on the same path and if you make the paths on the shortest fastest way cutting corners...etc. the player wont be able to beat them and also every time it'll be the same.


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: scripting "Racing" rules [Re: EpsiloN] #98199
11/10/06 13:45
11/10/06 13:45
Joined: Sep 2006
Posts: 106
FairyLand!!!
RruthH Offline OP
Member
RruthH  Offline OP
Member

Joined: Sep 2006
Posts: 106
FairyLand!!!
Wow.

That sounds like a LOT of coding.

Thanks for the idea! I will try to code it.

(If i can,im a newbie!)

If some other idea comes up, let me know ok? Thnxz!

Re: scripting "Racing" rules [Re: RruthH] #98200
11/10/06 18:32
11/10/06 18:32
Joined: Dec 2005
Posts: 252
MyOwnKingdom
nipx Offline
Member
nipx  Offline
Member

Joined: Dec 2005
Posts: 252
MyOwnKingdom
Have a look at the AUM no 32 - 35.
They script a racing game there. Think that would be helpful


nipx

Re: scripting "Racing" rules [Re: RruthH] #98201
11/11/06 00:20
11/11/06 00:20
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
Btw , except for the AI , its not a lot of coding only 2-3 functions max , the problem is that those functions are a little complicated. I suggest you (if you want to do this) look at str_cpy,str_cat,str_for_var,execute and file_var_read/write and file_str_read/write.(Plus the ang function) Those are almost all the things you'll need for this script.(Database with .txt files entirely in C-Script)

PS.: And dont forget to write the concept on paper first. To remember how everything should work exactly.(Example , when the car is moving check the possition in the database with the 2-3 functions , then compare the 2 angles (one stored in the db the other is the player pan) and then display or hide the "Turn around" panel)
EDIT: And dont give up yet,just because it sounds hard I'm shure if you try people will help you create the script(or fix it)

Last edited by EpsiloN; 11/11/06 00:22.

Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: scripting "Racing" rules [Re: nipx] #98202
11/11/06 00:25
11/11/06 00:25
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
Hi, RruthH!
More simplier is to code path code + some ai to select one path from number of available, depending on situation on the road (you have to place some pathes into the track level), i think. But this is a subject to discuss, as usual.
about "Wrong way". it depends from your game "core code" and level design. You can split road for parts; you can place "checkpoint" models with ordered numbers in skill along the road; you can check node numbers of nearest path; and so on. Your mind is the limit only. Well, lets sit and think.

Re: scripting "Racing" rules [Re: Lion_Ts] #98203
11/15/06 04:51
11/15/06 04:51
Joined: Sep 2006
Posts: 106
FairyLand!!!
RruthH Offline OP
Member
RruthH  Offline OP
Member

Joined: Sep 2006
Posts: 106
FairyLand!!!
OK, thanks for the replies!

My mind hurts. Coding easily overwhelms me.
Need more practice.

Abt the Robby Robot AI, how do i set its "DIRECTION" according
to the road but still manage to avoid obstacles?

I think this is where the nodes (not from the path) come in
handy, but i just don't know how to apply it to the AI.

Re: scripting "Racing" rules [Re: RruthH] #98204
11/15/06 05:08
11/15/06 05:08
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904


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