Forum > Other

ChatGPT and algorithms

(1/1)

TBMan:
The other night my youngest son mentioned he put ChatGpt on his phone. He thought it was interesting. So I downloaded it to my PC and because I was thinking about coding a pinball machine game I just said, what the heck and asked ChatGPT what is a ball bouncing algorithm in Pascal? I got a textmode version that was very simple and then I asked again and then received a graphic mode version.  I then twisted the code to my own evil designs and came up with this as of last night. I used a matrix that contains the bumper information and had to add code that launched the ball and detected the bumpers. I have some ideas for flippers and other ways to influence the ball's motion to rack up points.

https://www.youtube.com/watch?v=rt3BJU1x_U4

Today I tweaked collision detection and the graphics for the ball using 4 sprites to show a bit of a rotation effect.

Navigation

[0] Message Index

Go to full version