Gamestudio Links
Zorro Links
Newest Posts
zorro license, IB connection
by miwok. 12/06/23 16:32
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (miwok, AndrewAMD, TipmyPip, 3run, Quad, 1 invisible), 645 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
race #298409
11/14/09 19:43
11/14/09 19:43
Joined: Nov 2009
Posts: 8
E
ery Offline OP
Newbie
ery  Offline OP
Newbie
E

Joined: Nov 2009
Posts: 8
How should I write a code which shows me current positions of the cars during their
racing?

Re: race [Re: ery] #298448
11/15/09 04:11
11/15/09 04:11
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
That's just basic panels. Have them display the X and Y of the cars.

Check
http://www.conitec.net/litec/

and go to the functions tab for a quick reference.

Last edited by FoxHound; 11/15/09 04:11.

---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: race [Re: FoxHound] #298450
11/15/09 04:17
11/15/09 04:17
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
I think he means these positions: 1st place, 2nd place, and so on.

Depending on how open your track is, you could have check points (they don't have to be visible to the player) at each corner and turn, and based on which checkpoints they've passed and how close they are to the next one, cars can figure out their place.

For a more complex race with tons of different paths you could resort to A* pathfinding, if you can set it up so that paths can't go back over the finish line (if it's a lap race).

Whoever has the shortest path is leading. You'd only need to re-calculate the paths every few frames or so.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!

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