explaingit

smogon/pokemon-showdown

5,676TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

Pokemon Showdown is the open-source server powering pokemonshowdown.com, a fully playable Pokemon battle simulator supporting all generations that developers can also embed as a library or run as their own custom community server.

Mindmap

mindmap
  root((pokemon-showdown))
    What it does
      Battle simulation
      Pokedex data
      Custom servers
    Components
      Battle server
      JS library
      CLI tools
      Web API
    Generations
      Gen 1 through 9
      Singles
      Doubles
    Audience
      Developers
      Bot builders
      Community hosts
    License
      MIT open source
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Host your own Pokemon battle community server with custom game formats and chat

USE CASE 2

Use the JavaScript library to simulate Pokemon battles programmatically for a bot or analysis tool

USE CASE 3

Look up Pokedex data in code using the battle engine's built-in database

USE CASE 4

Build a battle bot that accepts challenges and plays using an automated strategy

Tech stack

TypeScriptJavaScriptNode.js

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Node.js, the full website experience also needs the separate client and Pokedex repositories.

Use freely for any purpose including commercial, modify and redistribute as long as you keep the MIT license notice.

In plain English

Pokemon Showdown is an open-source Pokemon battle simulator built primarily in TypeScript. The codebase powers the well-known website at pokemonshowdown.com, where players can simulate Pokemon battles against each other without needing a game console or cartridge. It supports all battle formats from Generation 1 through Generation 9, including singles, doubles, and triples matches. The project is more than just a website backend. It also ships as a standalone JavaScript library that other developers can import into their own projects to simulate battles or look up Pokedex data. There are command-line tools for running battle simulations outside of a browser, and a documented web API that the official client uses to talk to the server. If you want to host your own Pokemon Showdown community with custom game modes, the code supports that too. The repository specifically contains the server side of the system. A separate client repository handles the browser interface, and another handles the Pokedex data. The codebase has documentation for the communication protocol between client and server, an architecture overview, and a contributor guide for those who want to send pull requests. The project is maintained by a small core team under the Smogon organization and released under the MIT license, which means it can be freely used, modified, and redistributed. A community forum on Smogon and a built-in chat service on the main site provide places for users and developers to connect. If you are not a programmer, this codebase is the engine behind the Pokemon Showdown website you may already use to battle online. If you are a developer, it is a ready-to-run game server plus a reusable simulation library, with enough documentation to get started building bots or custom servers on top of it.

Copy-paste prompts

Prompt 1
Using the pokemon-showdown Node.js library, simulate a Gen 9 singles battle between two teams and print the full turn-by-turn move log.
Prompt 2
Set up a local Pokemon Showdown server from source and connect a test bot client that accepts any incoming challenge.
Prompt 3
Use pokemon-showdown's Pokedex data to find all Pokemon in Gen 8 that have a base stats total above 600 and print their names and types.
Prompt 4
Write a bot that connects to a Pokemon Showdown server and plays random legal moves each turn until the battle ends.
Prompt 5
Fork pokemon-showdown and add a custom battle format that restricts both players to a random selection of 6 Pokemon from a fixed pool.
Open on GitHub → Explain another repo

← smogon on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.