Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Meijer,L. (Lucas) committed May 27, 2024
2 parents a345222 + d88c843 commit f45a045
Show file tree
Hide file tree
Showing 300 changed files with 267,390 additions and 58,850 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/config/*
!/config/formats.ts
/logs/*
/logs/**/*
/test/modlogs
/test/replays/*.html
/node_modules
Expand Down
21 changes: 9 additions & 12 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ Pokemon Showdown architecture

At the highest level, PS is split into three parts:

- Client
- Login server
- Game server

The game server is in this repository, **[smogon/pokemon-showdown](https://github.com/smogon/pokemon-showdown)**, while the client and login server are in **[smogon/pokemon-showdown-client](https://github.com/smogon/pokemon-showdown-client)**. All three communicate directly with each other.
- Game server (**[smogon/pokemon-showdown](https://github.com/smogon/pokemon-showdown)**)
- Client (**[smogon/pokemon-showdown-client](https://github.com/smogon/pokemon-showdown-client)**)
- Login server (**[smogon/pokemon-showdown-loginserver](https://github.com/smogon/pokemon-showdown-loginserver)**)

All three communicate directly with each other.

Game server
-----------
Expand All @@ -25,22 +24,20 @@ Its entry point is [server/index.ts](./server/index.ts), which launches several

- [server/chat.ts](./server/chat.ts) sets up `Chat`, which handles chat commands and messages coming in from users (all client-to-server commands are routed through there)

`Rooms` also includes support for battle rooms, which is where the game simulation itself is done. Game simulation code is in [sim/](./sim/).

`Rooms` also includes support for battle rooms, which is where the server connects to the game simulator itself. Game simulation code is in [sim/](./sim/).

Client
------

The client is built in a mix of TypeScript and JavaScript, with a mostly hand-rolled framework built on Backbone. There’s a rewrite to migrate it to Preact but it’s very stalled.

Its entry point is [index.template.html](https://github.com/smogon/pokemon-showdown-client/blob/master/index.template.html).

It was written long ago, so instead of a single JS entry point, it includes a lot of JS files. Everything important is launched from [js/client.js](https://github.com/smogon/pokemon-showdown-client/blob/master/js/client.js).
Its entry point is [index.template.html](https://github.com/smogon/pokemon-showdown-client/blob/master/play.pokemonshowdown.com/index.template.html)

It was written long ago, so instead of a single JS entry point, it includes a lot of JS files. Everything important is launched from [js/client.js](https://github.com/smogon/pokemon-showdown-client/blob/master/play.pokemonshowdown.com/js/client.js)

Login server
------------

The client’s login server, which handles logins and most database interaction, is written in PHP, with a rewrite to TypeScript in progress. The backend is split between a MySQL InnoDB database and a Percona database, with a migration to Postgres planned.
The client’s login server, which handles logins and most database interaction, is written in TypeScript in progress. The backend is split between a MySQL InnoDB database (for most things) and a Postgres database (for Replays).

Its entry point is [action.php](https://github.com/smogon/pokemon-showdown-client/blob/master/action.php).
Its entry point is [server.ts](https://github.com/smogon/pokemon-showdown-loginserver/blob/master/src/server.ts).
3 changes: 1 addition & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config/formats.ts @KrisXV @Marty-D
data/mods/*/random-teams.ts @AnnikaCodes
data/mods/ssb/ @HoeenCoder @KrisXV
data/mods/gen9ssb/ @HoeenCoder @HisuianZoroark @KrisXV
data/random-sets.json @MathyFurret @ACakeWearingAHat @livid-washed @adrivrie
data/random-teams.ts @AnnikaCodes @KrisXV @MathyFurret @ACakeWearingAHat @livid-washed @adrivrie
data/text/ @Marty-D
Expand All @@ -24,7 +24,6 @@ server/chat-plugins/sample-teams.ts @KrisXV
server/chat-plugins/scavenger*.ts @xfix @sparkychildcharlie @PartMan7
sever/chat-plugins/teams.ts @mia-pi-git
server/chat-plugins/the-studio.ts @KrisXV
server/chat-plugins/trivia/ @AnnikaCodes
server/friends.ts @mia-pi-git
server/private-messages/* @mia-pi-git
server/chat-plugins/username-prefixes.ts @AnnikaCodes
Expand Down
2 changes: 1 addition & 1 deletion COMMANDLINE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Note: Commands that ask for a team want the team in [packed team format](./sim/T
- Simulates a battle, taking input to stdin and writing output to stdout

Using Pokémon Showdown as a command-line simulator is documented at:
[sim/README.md](./README.md)
[sim/README.md](./sim/README.md)

`./pokemon-showdown json-team`

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2011-2022 Guangcong Luo and other contributors http://pokemonshowdown.com/
Copyright (c) 2011-2024 Guangcong Luo and other contributors http://pokemonshowdown.com/

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
Loading

0 comments on commit f45a045

Please sign in to comment.