OK so I've been using ChatGPT to tweak lyrics to a few of my songs which it's pretty good at, but a thought struck me and I wondered if it could create a working fruit machine.
I therefore gave it the challenge of writing one, not in the usual coding languages like C++, Python etc. I wanted to see if it could generate it in pure HTML. Initial results were extremely basic but functional. It started off as a mini 3 reel, one winline sort of affair with proper fruits generated by ChatGPT which TBH looked terrible. Bit by bit I tweaked it into a kind of Megabars which actually wasn't my first intention but though what the hell, let's try it. It's taken hours of fine tuning to the point where I reckon it's reached its limit as far as HTML goes, but at least it works-ish!
Now this might look like Megabars but it doesn't play exactly like the real one. For a start the winlines are different and freespins work in a different way as you'll see. I've also increased the freespins frequency as to make it a bit more interesting. You can also gain more freespins during a freespin session. It's £1 play but if you click the button it'll change to £2. I asked ChatGPT to set this at 90% RTP but it seems to pay out a little more. I don't care though it's just a bit of fun. It runs a tad slow for me but to get the timing balanced between reel stops and playing the .wav sounds was tricky. Those of you proficient in HTML might want to tweak this section of code to find a better balance.....
// sequentially decelerate each reel with spacing
const delayBeforeFirst = 600; // when to start stopping first reel
const stopStagger = 400; // spacing between starting each reel's decel
const decelDuration = 700; // how long each reel decelerates visually
I've run the program in several browsers - Firefox, Edge and Chrome which work OK so hopefully you shouldn't have any issues.
Cheers all, and have fun for 5 minutes ;)