Page 1 of 1

AI on Love 0.10.2

Posted: Sun Jun 07, 2020 6:19 pm
by cost265
Hey guys so I'm quite new to the scene of Game Development as I'm taking an online course.
For my first assignment I have to create an AI code on Lua in order for the pong game to be played solo as well as duo.
I have come up with a code for that, but in order to make my game a bit more original I was planning on adding levels (Easy, Hard and Impossible!) which is where the problem lies. I have no idea how to do this on LOVE.
Any suggestions?
Many thanks :)

Re: AI on Love 0.10.2

Posted: Sun Jun 07, 2020 9:20 pm
by pgimeno
Maybe vary the speed at which the AI can move?

Re: AI on Love 0.10.2

Posted: Mon Jun 08, 2020 10:19 pm
by Jeeper
It is very difficult to help you out with so little information. But if you just want ideas on how to vary the AI, the answer can be to change the speed like pgimeno suggested, or adding a "reaction time", basically a delay to the AI that tries to simulate a human. So any change the AI "wants to do" is delayed by a varying time depending on the difficulty.

Re: AI on Love 0.10.2

Posted: Mon Jun 15, 2020 6:03 pm
by milon
pgimeno wrote: Sun Jun 07, 2020 9:20 pm Maybe vary the speed at which the AI can move?
That's how I did it for a school project a *long* time ago. I set a speed for the AI paddle based on the difficulty. The harder the AI, the faster its paddle moved, and the harder it was to score against it.