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
0 registered members (), 18,435 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
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 | 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