You are browsing as a guest. Sign up (or log in) to start making projects!

23m logged

I added the /potatonator-explore command, which is the first real gameplay feature for Potatonator.
The idea is that users can send their potato on a random adventure. Each adventure gives the potato XP and coins.
I created a new /explore endpoint in the Cloudflare Worker and added several random events, such as finding treasure, discovering golden potatoes, finding coins, or fighting a carrot.
At first, the API only returned the XP and coins without saving them. I then added a coins column to the D1 database and updated the endpoint so the rewards are permanently saved.
There were a few small issues along the way, including accidentally trying to add the coins column twice, which resulted in a duplicate-column error. Since the first command had already worked, the second one wasn’t needed.
After testing the API locally, I connected /explore to Slack and deployed the updated Cloudflare Worker.
I also updated /potatonator-profile so it displays the coins earned from exploring.

0
7

Comments 0

No comments yet. Be the first!