smogon/pokemon-showdown

Ideas for new developers

Zarel opened this issue · 40 comments

Zarel commented

We're often asked, "Hi, I want to help develop for PS, where do I start?"

This issue is basically our answer to that: a list of suggestions for things people who want to start contributing to Pokémon Showdown can work on.

First, the Development room is the right place to discuss working on new features: http://psim.us/dev

You definitely want to talk in Dev before working on things – we'd like to get to know you and make sure you're doing things the right way before you spend (and hopefully not waste) too much time on a contribution.

Make sure you read CONTRIBUTING.md.

  • Fix mechanics bugs – #2367 tracks the mechanics bugs we're aware of.
  • The Suggestions forum on Smogon contains user suggestions - threads tagged with 'Approved' are suitable for implementation (though may be blocked on other work, check the specific thread to find out). Simple bugs will have [Easy] in their title to make it obvious to new developers where a good play to start might be. The old suggestions thread also contains a few possible features , the "More common Suggestions" list in the first post contains a host of user requested features (as does the rest of the thread), several which would be fairly straightforward to implement for a new developer. Reach out on http://psim.us/dev before starting work on any of them to determine if the suggested feature is actually a good fit.
  • Add a command for custom avatars – On side servers, it's possible to set custom avatars, but it's a lot of work. A command might make it easier. Some work exists in #6666.
  • Bug reports from Smogon – Not necessarily all valid (be sure to confirm with a researcher or on the cartridge whether any reported mechanics issues are actually issues), but often the first place recent regressions are reported.
  • Teambuilder import folder – A way to import a single folder from the teambuilder.
  • Improvements to Teambuilder folder management – Some way to quickly move a large list of teams from one folder to another would be nice. WARNING: if you work on this, work on this in the Preact rewrite – smogon/pokemon-showdown-client#1156

Whats the current status on the Golang rewrite? I'm a Javascript dev looking to get into Golang. If possible id like to assist whoever is leading that.

Zarel commented

@robotmayo No one's started on that yet. Feel free to try it yourself. In addition to golang, you'll need to be able to do IPC between Node and Go, which shouldn't be too difficult. You may be interested in https://github.com/jgranstrom/gonode

@robotmayo Maybe @xfix Would be interested in that (sorry if you aren't, xfix :)). If you start the project, I'd like to follow it, as I'd like to get more into Golang as well.

@Zarel, I see the list randomly growing with no notification.
Each item should probably be its own issue.

Zarel commented

I think that's unnecessary, but I guess I can comment every time I add something.

quick folder export implementation at smogon/pokemon-showdown-client#756

I'm working on the sockets.js Golang rewrite.

Is "Give battles a user list like chatrooms" done?

Zarel commented

Nope. iirc Bumba was investigating it but no code's been written yet?

panpawn made it so /userlist displays those in a battle room but not an actual list (which would look bad anyways imo)

^

Teambuilder import folder – A way to import a single folder from the teambuilder.

can't we just Ctrl-V?

Fixes to text hiding... iii. To support users who change usernames multiple times, scan the roomlog for the user's entire prevNames list.

Incidentally enough, this is actually kind of being worked on in #3750

The sockets.go rewrite description should probably be updated:

Fortunately, PS's architecture is multi-process which makes it possible to change language for one process without having to rewrite the entire thing from scratch. We'll need to figure out exactly how child_process's IPC works, though.

It uses TCP connections by default. On the Node end, some manual buffering is needed for messages received upstream from the child process because of an internal buffer cap for incoming messages in net.Connection. cluster IPC messages use objects with a message type and data values, but that's not an option for IPC with Go child processes since Node and Go cannot parse objects/structs sent by each other. Instead they stringify/parse messages as JSON and delimit them with characters that are escaped to hexadecimal/unicode escape codes as JSON to avoid exploits with message parsing.

Anything else to do with IPC is roughly the same between Node and Go child processes

Is anyone working on the userlist for battles? I can give that a try if no one is already

Is anyone working on the userlist for battles? I can give that a try if no one is already

Pretty sure no one is working on that right now, feel free! It should be minimized by default like the userlist in chat rooms are on mobile.

Zarel commented

Also now is probably a bad time for client changes; we have a pending React rewrite for the client...

Is anyone working on refactoring the old tests to use makeChoices? I'd like to try that if not.

Zarel commented

Not currently; please feel free to do that.

Anyone working on the advanced search for teambuilding? If not I would like to give it a shot.

Anyone working on the import of a teambuilding folder? I'd like to attempt it nobody is.

took a shot at Advanced search in Teambuilder

smogon/pokemon-showdown-client#1133

Added:

Support other mods in commands such as /weak – Other examples include /coverage, /effectiveness, and /statcalc. Should mostly be as simple as supporting an optional argument (/weak pokemon/types, mod). When used in a battle they should default to the format's mod, otherwise default to the current generation. See /data for a current implementation.

Zarel commented
  • Migrate tests to Jest – Jest (https://jestjs.io/) supports parallel test-running, which would be nice to have over Mocha. Most of its API surface is similar, so this shouldn't take too long.

Removed: Jest turned out to be much slower

  • Rewrite sockets.js in Go (Morfent is working on this) – You'll probably need https://github.com/igm/sockjs-go – this is a pretty hard task but doesn't need anyone particularly familiar with the codebase. Node.js's support for WebSocket seems to have multiple bugs which are very hard to fix (see nodejs/node#3072 and nodejs/node#5469) so changing languages may be easier. Fortunately, PS's architecture is multi-process which makes it possible to change language for one process without having to rewrite the entire thing from scratch. We'll need to figure out exactly how child_process's IPC works, though.

Removed: SockJS no longer has the perf issues that were plaguing us when I suggested this, making this migration overall no longer worth it.

Hi, I am a TypeScript developer, and I noticed the point Migrate additional files to Typescript. Is there any issue related to Typescript i could work on?

Zarel commented

@asingh04 yes, you can just migrate files in server/ from .js to .ts. It'll require some screwing around; feel free to ask for help if you need it.

@Zarel do i need to create an issue/ticket on GitHub first, or can i start working on it and raise the PR?

@Zarel I have made a ticket as #5528 for migration of a file

Zarel commented
  • Advanced search in Teambuilder – Some users want to be able to filter teams by what pokemon they have. Just searching for IDs in the packed team should be enough to support filtering by pokemon, ability, move, and item. WARNING: if you work on this, work on this in the Preact rewrite – smogon/pokemon-showdown-client#1156

Removed: Done thanks to @littlefoot22 in smogon/pokemon-showdown-client#1133

Support renaming chatrooms – Now that we have a |rename| message type, the server-side is relatively straightforward: make sure there's no roomgame running, move the entry in Rooms.rooms, move the entry in every user.inRooms, move the entry in every connection.inRooms, move the modlog, move the roomlog, check polls, and I think that's it? Test to make sure.

This is done in 34e215c and smogon/pokemon-showdown-client@e7c6456.

This is done in 34e215c and smogon/pokemon-showdown-client@e7c6456.

Removed, thanks.

Hey everyone, Im a UI/UX Designer looking to contribute. Is there any interest in doing a full UI redesign? If so, how should I go about doing that?

Zarel commented

Hey everyone, Im a UI/UX Designer looking to contribute. Is there any interest in doing a full UI redesign? If so, how should I go about doing that?

Join us on Discord! https://spo.ink/dev

We'd probably want to start by seeing mockups/sketches.

You Have to Work on CSS of PS!

Hi, I notice that the showdown website only support English, and there are many lovers around the world that do not familiar with English. I am from China, and I know lots of people in China have to use translation tool to enjoy the battles. Do add other language support possible? I have an idea that can add Chinese support easily (also works for other language I think). wiki.52poke.com is a Pokémon wiki website, it contains lots of information both in Chinese and English (such as Pokémons, items, moves). We can scrap the website then 'translate' the showdown website into Chinese. I think only some scripts is needed to do this job. Although the result isn't perfect, the experience will be improved greatly.

Hello guys, i would like to make an SRS document for the website and its software. Is there any previous kind of documentation of this sort? I don't know if i have to post it here or the dev chat since it's not about developing or fixing bugs.

Bug reports from Smogon – Not necessarily all valid (be sure to confirm with a researcher or on the cartridge whether any reported mechanics issues are actually issues), but often the first place recent regressions are reported.

The link here is outdated

Bug reports have been moved to their own forum located here: https://www.smogon.com/forums/forums/ps-bug-reports.876/ It should be easier to see what still needs work and what doesn't.