What is Nostr?
jleger2023
npub1t9a…h4uw
2023-03-17 16:34:01

jleger2023 on Nostr: GPT-4 CREATED BITCOIN SNAKE GAME UPDATE: I've continued working with GPT-4 to improve ...

GPT-4 CREATED BITCOIN SNAKE GAME UPDATE:

I've continued working with GPT-4 to improve the Bitcoin Snake game. See blow the image for all of the included features it now has!

Play the game at https://nostrgram.co/gpt4/btcsnake.html



After 59 revisions it now contains the following features:

* Light Mode / Dark Mode
* Mobile support (swipes move the snake on mobile).
* High scores (saved to the server -- the server PHP script was also written by GPT4)
* Better movement handling (it uses a keystroke queue now so you don't run into yourself if you press multiple arrow keys too quickly).
* It uses animation frames at 10 fps instead of setTimeout() for consistent performance across devices (also suggested by GPT-4 based on a performance issue I reported to it).

With the exception of a couple of tiny changes of my own, all of the code was written by GPT-4 based on requests I made of it. I didn't tell it what to do or suggest how it should do it. I just presented it with the request or problem and used the code it generated to update the game. If there were issues with the update, I reported them back to GPT-4 and had it suggest fixes or improvements, which I then implemented.

A few things I've learned about GPT-4 in doing this:

* It feels like interacting with a real programmer. It makes some of the same kind of human oversights that it later realizes it made and goes back and fixes them. It's both cool and a little spooky.
* Sometimes it loses track of all its changes, so every now and then I present it with the full code it's written before asking for a new update.
* Once the HTML/CSS/JavaScript code got too long for a single request to GPT-4, I started breaking it up into the pertinent parts so it could process the requests. That is, if you're going to ask for its help with a complex app, break the app up into smaller segments or modules and let GPT-4 know what each module does while only asking it to analyze the specific module you're working with.

I'll be creating more games and apps going forward to continue and press the limits of what it's capable of.

Bottom line: Holy shit GPT-4 is amazing!

Developing https://nostrgram.co/ #Bitcoin
Author Public Key
npub1t9a59hjk48svr8hz6rx727ta6kx53n5d6fw8x26vsua0zytpl87sa6h4uw