Skip to content

Commit

Permalink
Latest
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbrianhall committed Jan 2, 2025
1 parent 4882289 commit 649c858
Show file tree
Hide file tree
Showing 3 changed files with 209 additions and 144 deletions.
66 changes: 49 additions & 17 deletions hd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,39 @@ Transform your favorite retro worm into glorious high definition! This tool lets

## 🎯 Quick Start

### Extract the original sprites:
```bash
python hd.py extract willy.chr sprites_folder/
```
### Command Line Interface

### Create a new HD character file:
```bash
python hd.py create sprites_folder/ willy_hd.chr
python hd.py <command> [options]
```

### View available character types:
Available commands:
- `extract`: Extract sprites from a chr file
- `create`: Create a new chr file from sprites
- `info`: Display available character types

Options:
- `--input`: Input chr file (for extract) or directory (for create)
- `--output`: Output directory (for extract) or chr file (for create)
- `--size`: Output size for extraction (8 or 128 pixels)
- `--classic`: Create classic 8x8 format chr file

Examples:

```bash
# Extract to 8x8 sprites
python hd.py extract --input willy.chr --output sprites/ --size 8

# Extract to 128x128 HD sprites
python hd.py extract --input willy.chr --output sprites/ --size 128

# Create classic 8x8 chr file
python hd.py create --input sprites/ --output willy.chr --classic

# Create HD 128x128 chr file
python hd.py create --input sprites/ --output willy.chr

# View available character types
python hd.py info
```

Expand All @@ -46,16 +67,27 @@ Each sprite can be edited in your favorite image editor as a 128x128 PNG file wi

## 🛠️ Technical Details

The tool supports two formats:
- Classic 8x8 bitmap format from the original game
- New HD format with 128x128 RGBA sprites and JSON metadata

The HD format includes:
- Version identifier
- Image dimensions
- RGBA channel support
- Character mapping data
- Raw pixel data for each sprite
The tool fully supports both sprite formats:
- Classic Format:
- 8x8 bitmap sprites
- 1-bit per pixel (black and white)
- Original game compatibility
- Compact file size

- HD Format:
- 128x128 RGBA sprites
- Full color and alpha channel support
- JSON metadata including:
- Version identifier
- Image dimensions
- Character mapping data
- Automatic format detection

You can freely convert between formats:
- Upscale classic 8x8 sprites to 128x128 HD versions
- Downscale HD sprites to classic 8x8 format
- Extract and modify sprites while preserving original format
- Mix and match sprite sizes in your workflow

## 🌟 Pro Tips

Expand Down
Loading

0 comments on commit 649c858

Please sign in to comment.