Skip to content

Chipdelmal/AWBWReplayRecorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWBW Replay Recorder

AWBW Logo

These scripts were created to save replays from the awesome website Advance Wars by Web to gif or movie files. The code works by taking snapshots of the replays at each turn (through Selenium) and compiling the snapshots into gif files through ImageMagick.

map

Instructions

First time setup and use are still a bit clunky but I'm making improvements in usability as time allows.

Installation and Setup

  1. Download the contents of the repository to your computer.
  2. Download the Selenium driver for Chrome.
  3. Place the file in a folder (ideally ./chromedriver/chromedriver relative to the scripts folder).
  4. Install ImageMagick for gif export.
  5. Install the conda environment or the required python packages independently (see Dependencies).

Use

  1. Upload the replay file if needed (in case it has already been deleted from the server).
  2. Get the match ID and number of turns as detailed in my blog post.
  3. Launch the bash script from the terminal as: ./awbw.sh ID DESIRED_MATCH_NAME TURNS_NUMBER ZOOM_LEVEL EXPORT_PATH (for more info on these variables, look at the awbw.sh file or my blog post.
  4. Wait until the whole script has finished (might take a while).
  5. Two GIFs and an MP4 file should show up in the provided path.

Debugging note

If something's not working correctly, try modifying the HEADLESS variable in the constants file. This will make the chromedriver visible if it's launching correctly.

More information

I've documented the code a bit over on my blog post. It's not comprehensive, but it might be handy if something is nor working correctly. The explanations on why the script takes so long and avenues for possible modifications are also detailed in it.

Dependencies

AWBW Logo

Author


Héctor M. Sánchez C.

Releases

No releases published

Packages

No packages published