New games every week!
More AI Silliness Blog
14th February 2023
Yesterday I guided Bing through some GotoJSE coding.
Much like how ChatGPT figured it out, Bing took to it like a duck to water.

-=-=-

A couple of UI quibbles.
1. You can't post multi-line requests, so a chunk of code gets somewhat messy when you try to post it, all being squished into a single giant line of code.
2. The output doesn't have a "Copy the code box's contents" option like ChatGPT has. The entire chat bubble has a copy button, though, so you have to copy the bubble, then clean up the mess afterwards.



Anyway, we started with this..

Graphics 512,512,1 Repeat CLS x=256+Sin(Mills()*0.2)*200 y=256-Cos(Mills()*0.2)*200 Line 256,256,x,y Flip Forever


A simple enough example that shows variables, sin/cos/mills, a basic loop, that you need CLS and Flip, and then a line being drawn.

Without any request for code, Bing immediately jumped into action and provided me with this.
Graphics 512,512,1 Radius=200 Repeat CLS Circle 256,256,Radius x=256+Sin(Mills()*0.2)*Radius y=256-Cos(Mills()*0.2)*Radius Circle x,y,10 Flip Forever


Which replaces the lines with circles, even though I didn't tell it that we had the ability to draw circles.

I then guided Bing through a few ideas, like "What if it's a solar system, colour it in", and "How about more planets" and "why not use arrays", and things like that.
After about 20 or so back'n'forths, we eventually arrived at the following.



Graphics 800,600,1 DIM orb(10,40) //changed from 10,30 to 10,40 dstnce=50 For planet=0 To 7 orb(planet,0)=Rnd(3,20) //size orb(planet,1)=Rnd(0.01,0.08) //speed orb(planet,2)=Rnd(0,255) //red orb(planet,3)=Rnd(0,255) //green orb(planet,4)=Rnd(0,255) //blue dstnce=dstnce+Rnd(10,50) //distance orb(planet,5)=dstnce orb(planet,6)=Rnd(0,5) //number of moons For moon=0 To orb(planet,6)-1 orb(planet,7+moon*5)=Rnd(1,5) //moon size orb(planet,8+moon*5)=Rnd(0.01,0.08) //moon speed orb(planet,9+moon*5)=Rnd(0,255) //moon red orb(planet,10+moon*5)=Rnd(0,255) //moon green orb(planet,11+moon*5)=Rnd(0,255) //moon blue orb(planet,12+moon*5)=Rnd(1,3) //moon distance Next Next Repeat CLS SetColor(255,255,0) Circle 400,300,50 For planet=0 To 7 SetColor(orb(planet,2),orb(planet,3),orb(planet,4)) size=orb(planet,0) speed=orb(planet,1) x=400+Sin(Mills()*speed)*orb(planet,5) y=300-Cos(Mills()*speed)*orb(planet,5) Circle x,y,size For moon=0 To orb(planet,6)-1 SetColor(orb(planet,9+moon*5),orb(planet,10+moon*5),orb(planet,11+moon*5)) moon_size=orb(planet,7+moon*5) moon_speed=orb(planet,8+moon*5) moon_distance=orb(planet,12+moon*5) moon_x=x+Sin(Mills()*moon_speed)*size*moon_distance moon_y=y-Cos(Mills()*moon_speed)*size*moon_distance Circle moon_x,moon_y,moon_size Next Next Flip Forever


A simple enough looking planetary system with a sun, multiple planets, and multiple moons, all spinning around and looking nice and swirly!

You can read the entire conversation over on SoCoder, just click the reveal button.

It's really quite amazing how well it coped, especially considering it didn't know the language from the get-go.
Amazingly powerful, and we're still only at the start of this journey.

I'm going to be out of a non-existent job, much sooner than I thought!!
Views 18, Upvotes 6  
Daily Blog , Ai
New games every week!
Site credits : Jayenkai made this.
(c) Jayenkai 2023 and onwards, RSS feed

Blog - More AI Silliness - AGameAWeek