We love gaming and online communities appreciate Discord as a means to combine both of these two joys. Freshman, year I saw my classmates in HUM101 playing Pokemon Showdown with each other. And honestly, it looked like a lot of fun. I wanted to bring the idea of community to this game and expand it to a larger player-base, in hopes of communities forming.
What it does
This project uses Discord as a means to play Pokemon Showdown with your friends in your Discord server against another group of friends in a different Discord server. Servers can match with other servers by requesting a match with a guild_id . Users 'react' to different messages to vote for the next move to be played by their server in the Pokemon Showdown match. Whoever wins the match, wins! Matchmaking and leaderboard support is added.
How we built it
- Backend: ExpressJS
- Website (not finished/only put up a leaderboard because of time constraints :/): ReactJS/Redux
- Discord.py API library
- Selenium Python3 library with Chromedriver to 'drive' the game
- AIOHTTP, asyncio: Communication with our endpoints
Challenges we ran into
- Initially, we wanted to stream the game but Discord doesn't have a public API for streaming to servers. Therefore, we wanted to reverse-engineer the WebRTC connection for streaming on Discord, but we figured that this task would take too long to be done within 24-hours if it was even possible.
- Infrastructure: Lots of things to run on our not so good computers (my DigitalOcean dev server was rebooted serveral times)
- Error handling: The Selenium Webdriver left lots of room for error because of inconsistencies with the webpage. We (unfortunately) had to install an adblocker to ensure that the webpage was as consistent as possible.
- Testing: Testing Selenium instances and Discord functionality was inefficient due to rate limiting, slow runtime environments, etc.
Accomplishments that we're proud of
- It worked :^)
- We didn't lose our sanity and didn't give up after spending 2 hours fixing an indexing issue
What we learned
- Networking concepts (WebRTC, WSGI, etc).
- Project management and architecture.
- Learned how to make servers that communicate with each other.
- Work and collaborate unison.
What's next for Discord Plays Pokemon Showdown
- ReactJS/Redux website with OAuth2 for authentication to give users a dashboard (wanted to implement this but didn't have time)
- More detailed statistics
- More efficient gameplay
**NOTE: in the GitHub repo provided below, the branches aren't merged :/"