|
Post by (X) on Feb 22, 2023 2:56:48 GMT 1
ChatGPT on Sjouke Hamstra...
|
|
|
Post by (X) on Feb 22, 2023 3:56:48 GMT 1
I asked ChatGPT: "Do you know what a hash type is in "GFA-BASIC 32"?"
I'd say that's pretty good!
|
|
|
Post by rogercabo on Feb 23, 2023 19:06:18 GMT 1
Can we create a new forum entry with ChatGPT and GFA BASIC 32?I was able to let write the first simple code in gb32. Of a gravity falling rectangle and damping back by 80%. Yes you can learn chatGPT to code in real GB32. Give him some examples and tell him to learn the syntax..  Here is the result. Dim x(4) As Double, y(4) As Double x(1) = 100 : y(1) = 100 x(2) = 200 : y(2) = 100 x(3) = 200 : y(3) = 200 x(4) = 100 : y(4) = 200
Dim cx As Double, cy As Double cx = (x(1) + x(2) + x(3) + x(4)) / 4 cy = (y(1) + y(2) + y(3) + y(4)) / 4
Dim i As Integer Dim vy As Double vy = 0
Do Cls cx = (x(1) + x(2) + x(3) + x(4)) / 4 cy = (y(1) + y(2) + y(3) + y(4)) / 4 For i = 1 To 4 Line x(i), y(i), x(i Mod 4 + 1), y(i Mod 4 + 1) Dim xtemp As Double, ytemp As Double xtemp = x(i) ytemp = y(i) RotatePoint xtemp, ytemp, cx, cy, 1 x(i) = xtemp y(i) = ytemp Next i 'Berechne neue Positionen und Geschwindigkeit aufgrund der Gravitation vy = vy + 0.1 For i = 1 To 4 y(i) = y(i) + vy If y(i) > 500 Then y(i) = 500 vy = -vy * 0.8 'Elastischer Stoß mit dem Boden End If Next i Line 0, 500, 1000, 500 DoEvents Pause 0.5 Loop Until MouseK
Sub RotatePoint(ByRef x As Double, ByRef y As Double, cx As Double, cy As Double, angle As Double) Dim rad_ As Double rad_ = angle * PI / 180 Dim xnew As Double, ynew As Double xnew = (x - cx) * Cos(rad_) - (y - cy) * Sin(rad_) + cx ynew = (x - cx) * Sin(rad_) + (y - cy) * Cos(rad_) + cy x = xnew y = ynew EndSub
|
|
|
Post by rogercabo on Jun 2, 2023 19:05:31 GMT 1
Unfortunately, I had to abort the attempt to teach ChatGPT GFABasic. The quasi long-term memory was shrunk. Strangely, after one day, some things were forgotten, and what was forgotten varied in different chats. VB6 is the only equivalent works closest.
|
|