Help with racing game (mostly AI)

Get help using Construct 2

Post » Mon Jul 21, 2014 6:45 pm

I'm about to start making a racing game, which will look like the image below.
Image
I'm probably going to use 8 directions movement behaviour for the player, direction relative animations, but I'm not sure about what would be the best approach to opponents AI, there will be 4 karts on the track (player+3ai).
Does anyone have any experience on this? Should I use waypoints and have the AI following a pre-set path? That would result in really poor gameplay in my opinion, straight line of karts and I'm not aiming for a nascar like game. Having a different path for each opponent is a better solution but would take a lot of time depending on the number of tracks I'll have (5 at least).
I'm also not aiming for a complex AI (my first thought was something like raycasting line of sight from the car and checking for collisions and simulating acceleration and steer control for each AI, that would take longer time than I have scheduled), it's a game for childrens, so it only needs to look fine, there won't be any pro racers playing it as training for formula 1.
Also about the track, how should I set it up? Has anyone done a system to track player position and laps in a racing game (needs to prevent cheating), know if the player is going wrongway.
This topic is already pretty big, so in fewer words, I'm looking for tips, plugins and behaviours, anything that can help making the development phase faster/easier.
(Yes, I've checked the racing template, I'm looking for something more related to gameplay, not the player's car controls).
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Mon Jul 21, 2014 7:40 pm

The AI can be as simple or as complicated as you make it, but I find it likely that the best simple solution to use a checkpoint system, then 1 step better then that is to use it in combination with ray casting to make sure the cars don't run into any walls or potholes.
B
11
S
3
G
1
Posts: 98
Reputation: 1,062

Post » Tue Jul 22, 2014 2:07 pm

Thanks @Robsta
Has anyone used either pathfinding or the MoveTo behaviour by rexrainbow?
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Tue Jul 22, 2014 2:23 pm

I use MoveTo by Rex it's a really useful plugin and would be a great addition to Construct as an official type behaviour.

About the AI I made a basic game prototype some years ago in Construct Classic using waypoints. I didn't get too far but my main plan was multiple waypoints for each "section" of track that the AI could choose. Each of these waypoints could also change the AI top speed, for example if a waypoint took the AI too wide on the track I would slow them down as if they needed to break hard.
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Tue Jul 22, 2014 2:37 pm

Thanks @Minor, that is a good idea, I might sub-divide the waypoints into 3 and have the AI to choose one of them to follow, the speed idea is also really good.
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Wed Jul 23, 2014 2:48 pm

*bump*

Does anyone have something else to add?
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643


Return to How do I....?

Who is online

Users browsing this forum: Semoreh and 8 guests