
🎮 Baseplay
🎮 Baseplay: a JavaScript plugin to save achievements and scores for your players on the Base chain.
Project links
About this project
Why are you participating for Based India?
Based India is an incredible platform to share my work in front of people who are currently working on Base chain and experimenting to bring new capabilities.
Have been a fan of Jesse (head of Base) and how he has been leading the project. Grateful for this opportunity. I have been interested in crypto and decentralization since 2013. Only in the last few years have I started building services around enabling crypto and Base has created a great ecosystem to help devs achieve their imaginations on chain and not worry about gas.
As someone who has many ideas and builds many things, getting attention is probably the most difficult thing and Based India has provided a great platform to showcase our builds. Grateful once again.
What challenges are you focusing on?
One of my friends, Jon, recently built a game (thisispointless.fun). He was building in public, sharing the game mechanics and level progress.
He published level 1 of his game on X and received overwhelming response from everyone. Everyone was trying to finish the game. On day 1, I was on leaderboard and then everyone jumped in. Soon it became a headache to deal with if people had hacked the leaderboard or did they genuinely achieve that score. He is also not a dev, he's using gpt to hack together the code.
The database is running on mongodb on heroku, people were not sure if a player genuinely achieved their highscore or did they hack it.
How does your submission address this challenge?
One of the ways I felt to address this was to make a service that would save the scores and achievements to the Base chain.
This brings transparency for players, and the service saves time for Jon and other game devs to bring their games on chain and not worry about auth, security and other issues.
There is a similar service in android called google play games, it saves a ton of headache to make your leaderboard, save scores, create leaderboard, save achievements. Allows the game devs to focus on their game and not worry about other issues.
Challenges we ran into
1.Setting up the project locally was a bit of an issue, you have to spin your local evm and rpc and consume it on the browser. But it took a few hours. Used the hardhat n/w and was able to solve it.
2.When I ready to deploy on testnet, the first contract was highly unoptimized. The gas fees went to $200 to create a game on chain. Then after optimization (took me hours) went to $20 or so.
3.3rd challenge which is an important challenge which I haven't tackled yet, but I have an idea on how to solve is to prevent players from directly interacting with contract. Have a friend who worked on a similar problem and he recommended using ECDA signature for verification. Right now I don't know how to implement it, but it'll be on the contracts soon.
Additional Features
I didn't start the project before the Buildathon. Started working on it on Oct 7th or so.
About the founder
Building on Base from India