AI on Love 0.10.2

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
cost265
Prole
Posts: 1
Joined: Sun Jun 07, 2020 6:13 pm

AI on Love 0.10.2

Post 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 :)
User avatar
pgimeno
Party member
Posts: 3548
Joined: Sun Oct 18, 2015 2:58 pm

Re: AI on Love 0.10.2

Post by pgimeno »

Maybe vary the speed at which the AI can move?
User avatar
Jeeper
Party member
Posts: 611
Joined: Tue Mar 12, 2013 7:11 pm
Contact:

Re: AI on Love 0.10.2

Post 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.
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: AI on Love 0.10.2

Post 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.
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 102 guests