Generated Lua code using AI ChatGPT for Pong game

Lua Code Generation Using Artificial Intelligence (ChatGPT)

I’ve been telling people that #ChatGPT is good for programming purposes, but I have doubts about other uses.

I have tried to generate Pong game in Lua using LÖVE engine (Love2D).

It didn’t work out of the box due to:

  • not using new() to
    instantiate Classes it created
  • prepending local to variables that are used globally in all classes

After fixing that it worked. It also added scoring system when I asked afterwards.


Have a comment? Join discussion on Mastodon as a reply to: @dusoft@fosstodon.org