Guangcong Luo c590a0c370 Add new BattleScene animation engine
battle.js is probably PS's oldest code. It's received minor touch-ups:
a refactor to prototypes early on, and then a refactor to TypeScript
and classes recently, but otherwise it's had basically zero maintenance
until now.

That's probably why this refactor took me over a week.

The biggest change is that the animation engine strewn around
Pokemon, Side, and Battle has been broken out into a new class named
BattleScene.

Pokemon, Side, and Battle now only track state; all animation is now
done in BattleScene and PokemonSprite.

The fates of major classes:

battle.ts:Pokemon - animation has been moved, mostly to PokemonSprite
battle.ts:Side - animation has been moved, to PokemonSprite/BattleScene
battle.ts:Battle - animation has been moved, mostly to BattleScene

Major changes:

- Many many variables have been renamed to be much clearer about what
  they mean. For instance, `animationDelay` is now `timeOffset`, and
  `activityDelay` is now `minWait`. A few bugs relating to me mixing
  up these two variables have also been fixed. jQuery variables named
  like `fooElem` have been renamed like `$foo`.

- The unnecessarily complicated queue1/queue2/activeQueue system,
  previously used for telling the animation engine to stop after Pause
  was pressed, has been replaced with a simple `interruptionCount`
  counter.

- The entire scene can now be reconstructed from scratch, which means
  that the `fastForward` system no longer needs to touch the DOM
  outside of the battle log. "Prev turn" and "Skip to turn" should be
  faster in 1000-turn battles now.

- The animation engine now supports displaying weather and terrain
  simultaneously.

- During a replay, Team Preview is shown for a second (instead of
  immediately skipping to the battle).

- Various aspects of the animation engine should be much less brittle
  now.

- Many bugs were fixed (and new ones were introduced).
2018-06-07 02:22:36 -07:00
2018-05-17 11:52:32 -05:00
2018-05-18 17:10:58 -05:00
2016-02-02 19:44:24 -05:00
2018-04-01 09:11:28 +01:00
2016-04-08 05:25:25 -07:00
2018-06-07 02:22:36 -07:00
2018-05-19 19:30:51 -04:00
2018-06-07 02:22:36 -07:00
2014-01-12 01:26:57 -06:00
2017-11-23 01:39:06 -06:00
2018-05-18 17:10:58 -05:00
2018-01-19 13:27:20 -06:00
2018-05-18 17:10:58 -05:00
2018-05-19 19:16:01 -04:00
2018-05-14 17:14:27 -05:00
2017-11-30 19:07:11 -05:00
2017-11-14 19:26:16 -05:00
2016-02-02 19:44:24 -05:00
2018-05-19 23:24:38 -04:00
2018-05-14 16:50:56 -05:00
2017-06-21 23:13:16 -04:00
2016-02-02 19:44:24 -05:00
2016-04-08 05:25:25 -07:00
2016-04-08 05:25:25 -07:00
2016-04-08 05:25:25 -07:00
2017-11-21 07:50:32 -05:00
2016-02-02 19:44:24 -05:00
2016-04-08 05:25:25 -07:00
2016-01-02 16:14:18 +01:00
2017-12-21 05:05:22 -06:00
2018-02-16 04:55:01 -05:00
2017-03-08 12:29:33 -06:00
2017-11-21 07:50:32 -05:00
2013-09-20 16:48:31 -05:00
2016-02-02 19:44:24 -05:00
2013-04-27 01:51:38 -07:00
2016-02-02 19:44:24 -05:00
2018-05-17 11:52:32 -05:00
2017-11-21 07:50:32 -05:00
2016-02-22 15:24:26 -05:00
2017-11-21 07:50:32 -05:00
2018-05-14 12:53:34 -05:00

Pokémon Showdown Client

Navigation: Website | Server repository | Client repository | Dex repository

Introduction

This is a repository for most of the client code for Pokémon Showdown.

This is what runs play.pokemonshowdown.com.

WARNING: You probably want the Pokémon Showdown server, if you're setting up a server.

Testing

Client testing now requires a build step! Install the latest Node.js (we require v9 or later), and run node build (on Windows) or ./build (on other OSes) to build.

You can make and test client changes simply by building after each change, and opening testclient.html. This will allow you to test changes to the client without setting up your own login server.

You can connect to an arbitrary server by navigating to testclient.html?~~host:port. For example, to connect to a server running locally on port 8000, you can navigate to testclient.html?~~localhost:8000.

The following things will fail in testclient.html:

  • Registering
  • Changing name to a registered name other than the one you are currently logged in with (however, changing to an unregistered name will work, and you can even change back to your original registered name afterward)

Everything else can be tested, though.

Warning

This repository is not "batteries included". It does NOT include instructions to run a full Pokémon Showdown client, and we will not provide them. Please do not ask for help on this; you will be turned away.

It also doesn't include several resource files (namely, the /audio/ and /sprites/ directories) for size reasons.

In other words, this repository is incomplete and NOT intended for people who wish to serve their own Pokémon Showdown client (you can, but it'll require you figure it out yourself). Rather, it's intended for people who wish to contribute and submit pull requests to Pokémon Showdown's client.

License

Pokémon Showdown's client is distributed under the terms of the AGPLv3.

WARNING: This is NOT the same license as Pokémon Showdown's server.

Description
The client for Pokémon Showdown
Readme AGPL-3.0 3.9 GiB
Languages
TypeScript 42.1%
PHP 29.1%
JavaScript 21.5%
CSS 5.2%
HTML 1.9%
Other 0.2%