Create and enemy on a racing game


#1

Hello, i am creating a racing game like Hill climb racing but i want to add an enemy that his goal is to beat the player. How can i create It?


#2

What exactly do you need help with?
Create the enemy in Piskel or other graphics software, then add a new object and drag it on the scene.


#3

Like Hill Climb Racing 2


#4

Yeah, you said that part already…


#5

I mean a competitor with the aim of getting to the finish before the player (me)


#6

Do you want a human competitor or a computer (AI)?


#7

Computer (bot) competitor


#8

You have to figure out the AI then.
When it should accelerate, when it should slow down, when it should rotate one way or another, and how fast it should do all that.
It’s a lot of work, and nobody will do it for you. :slight_smile:
One you have figured out the logic, it’s just a matter of conditions and actions.
For instance:
If AI.angle > 80, change AI.angle -5.
If AI.grounddetector is in collision with ground, add force to AI.
etc.


#9

Ok thank you for the help


closed #10