https://github.com/marcometer/pokemon_replay_recorder
Just a simple replay recorder
https://github.com/marcometer/pokemon_replay_recorder
Last synced: 3 months ago
JSON representation
Just a simple replay recorder
- Host: GitHub
- URL: https://github.com/marcometer/pokemon_replay_recorder
- Owner: MarcoMeter
- License: mit
- Created: 2024-12-04T18:45:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-19T08:45:55.000Z (over 1 year ago)
- Last Synced: 2025-03-25T22:41:26.154Z (about 1 year ago)
- Language: Python
- Size: 756 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Install
`conda create -n poke_replay python=3.11 --yes`
`conda activate poke_replay`
`pip install -r requirements.txt`
# Known Issues
On MacOS, you might need to uninstall pysdl2-dll.
`pip uninstall pysdl2-dll`
# Add ROM
The Pokémon Red Rom should be located at the path `./PokemonRed.gb`. Otherwise specify the path using `--rom my_rom.gb`.
# Record playthrough
`python play.py --name my_replay.json`
Controls:
```
action_mapping = {
pygame.K_UP: 3,
pygame.K_DOWN: 0,
pygame.K_LEFT: 1,
pygame.K_RIGHT: 2,
pygame.K_a: 4, # A
pygame.K_s: 5, # B
pygame.K_RETURN: 6,
}
```
Note that the key A is used for `A` and the key S is used for `B`. Change this to your likings. I did this because of the different local keyboard layouts.
When done recording, press `ESC`, `Ctrl + C`, or just quit.
You may also resume a saved playthrough as follows:
`python play.py --name my_replay_resume.json --resume my_replay.json`
During the playthrough, you can press `P` to capture a screenshot or press `O` to save the state.
# Replay
`python replay.py --name example_replay.json`
or headless
`python replay.py --name example_replay.json --headless`
# Recording Instructions
- Play untill receiving TM Dig (ensure to beat Misty and get Badge 2 as well)
- No need to speed run
- No need to play absolutely precise
- Your strategy can be pretty free after all
- Out of scope:
- Completing the pokedex
- Using the storage system
- (Optional: You can proceed further in the main story if you want to keep recording.)