Skip to content

Dudly01/pkmn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

110 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pkmn

pkmn is an app for Pokémon RBY and GSC. It can simplify calculating DVs and finding learnsets, evolutions and the details of known moves. No need insert data into calculators or to search online: pkmn shows you the info for the Pokémon you have on the screen. Try the webapp here.

Getting started

This section describes the steps of using the project from its source on Linux. User experience on Windows may vary.

Pokémon data

This project would not have been possible without data from other sources. The learnsets and evolutions originate from Bulbapedia. The moves, items and Pokémon originate from Smogon. The list of in-game item names originates from Serebii.net. Read more here.

Dependencies

Certain crates may require the installation of additional libraries. These are the ones I had to get for my system:

# For scrap
sudo apt-get install libx11-dev libxcb-shm0-dev libxcb-randr0-dev

# For show-image
sudo apt-get install pkg-config libfontconfig1-dev

Build desktop app

The desktop example located in the core package is the desktop version of the webapp. It locates the Game Boy on the primary display and prints the results to the terminal. To run the app, navigate to the core directory and run:

cargo run --example desktop --release

Make sure the terminal is large enough for the text to fit! The usage instructions are bundled with the webapp.

Other examples

The other apps in core/examples were primarily used for development. From the core directory, they can be listed with:

cargo run --example

To run one, use:

cargo run --example <example_name> --release

However, there is likely little use of them to others.

Build WASM and test webapp locally

The projects uses wasm-pack to build the WebAssembly (WASM) package. To install it, use cargo:

cargo install wasm-pack

To build the package, navigate to the net directory and run:

wasm-pack build --target web --out-dir static/pkg

Afterwards, start a local webserver from net/static with:

python -m http.server

The webapp can be accessed by visiting http://localhost:8000/ (8000 is the port selected by default). Visiting http://0.0.0.0:8000/ may prevent the screen-sharing from working. If changes do not show up, try to hard-refresh the page (Ctrl + F5 in Firefox).

The index.html is updated by the script create_index_html.py located in net/scripts. It combines the index.md and the index_frame.html files located in the same directory.

Benchmarks

The project uses Criterion.rs.

# Runs benchmarks
cargo bench

# Filters benchmark IDs with <filter> regular expression
cargo bench -- <filter>

# Saves baseline
cargo bench -- --save-baseline <name>

# Compares against baseline
cargo bench -- --baseline <name>

The benchmarks are not exhaustive.

Debug visualization

No longer seems to work: lldb.process is None when reading from memory.

The VS Code extension called CodeLLDB enables users to run Python scripts during a debugging session. With this, it is possible to plot images and to inspect them visually. For more info, visit core/scripts/debug_vis.py.

Troubleshooting

This section provides information on issues encountered during the development.

Cargo version conflict

As this comment mentions, update the crates:

cargo update

References

This project would not have been possible without Bulbapedia, Smogon and Serebii.net. The website aesthetics were borrowed from the MDN Blog.

Other sources include Neoseeker, a screen capture tutorial and CSS-TRICKS' Flexbox and Grid guides.

Pokémon is a trademark of Nintendo.

About

A tool for estimating the DVs of a Pokémon.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors