How do I do auto-pathing, like for bot-car

Get help using Construct 2

Post » Thu Mar 03, 2016 1:27 pm

Hi, how I can do auto-pathing system for bot-car in my car game?

This is my "code" now;
Image

And the code that "helps" me, (contruct 2 example code):
Image
B
2
Posts: 2
Reputation: 154

Post » Thu Mar 03, 2016 2:28 pm

Auto-pathing as in over a predetermined path or does it have to find it's own path via al algorithm?
B
6
S
1
Posts: 50
Reputation: 517

Post » Fri Mar 04, 2016 6:48 am

horoblast wrote:Auto-pathing as in over a predetermined path or does it have to find it's own path via al algorithm?

Umm, In first place I'd like it to solve the way, just that I don't need to re-code always to new level/race/road-style
B
2
Posts: 2
Reputation: 154

Post » Tue Dec 06, 2016 12:49 pm

I know it's an older post, but some people are asking me how I did my racer game and to post it public I'm using this topic.

This was a long dialog on the forum to understand how the logic of a race game works.

First, the AI need some support to understand the path, like the actual Uber self-driving cars. So, you can do it by placing way-points (placeholders) with instance variables stored while giving the bot-driver some insights of how to drive to the next way-point.
Image

Each waypoint have two instance variables, one called ID and another called Rank.

The racer-bot should use the car-behavior to drive to the next way-point also, you should setup it to turn toward that direction, plus, give him some variable behavior.

Image
Image
B
108
S
24
G
18
Posts: 1,376
Reputation: 22,830


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests