Metadata-Version: 2.5
Name: gamex-lib
Version: 0.1.0
Summary: Beginner-friendly 2D game helpers built on pygame.
Project-URL: Homepage, https://github.com/your-username/gamex-lib
Project-URL: Repository, https://github.com/your-username/gamex-lib
Project-URL: Issues, https://github.com/your-username/gamex-lib/issues
Author: Gamex Lib Contributors
License: MIT
License-File: LICENSE
Keywords: 2d,game,gamedev,pygame,utilities
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: pygame>=2.5
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Requires-Dist: twine>=5; extra == 'dev'
Description-Content-Type: text/markdown

# gamex-lib

`gamex-lib` is a friendly 2D game toolkit built on [pygame](https://www.pygame.org/). It includes a tiny rendering layer plus standalone geometry, tile-grid, and timing helpers.

## Install

```bash
pip install gamex-lib
```

For local development:

```bash
pip install -e ".[dev]"
```

## Quick start

```python
from gamex_lib import Game, Cooldown
from gamex_lib.motion import wasd

game = Game(800, 600, "My game")
player = game.circle(400, 300, 20, "#4da6ff")
wasd(player, speed=320)
shot = Cooldown(0.3)

def update(game, dt):
    shot.tick(dt)
    if game.key_down("space") and shot.use():
        game.shoot(player)

game.run(update)
```

## Useful helpers

```python
from gamex_lib import Vec2, clamp, distance, neighbors, point_to_tile

speed = clamp(120, 0, 100)
direction = Vec2(3, 4).normalized()
nearby_tiles = list(neighbors(point_to_tile(73, 40, 32)))
```

## Publishing to PyPI

1. Replace the placeholder project links and author in `pyproject.toml`.
2. Pick a new version in `pyproject.toml` for every release.
3. Build and validate the package:

   ```bash
   python -m pip install --upgrade build twine
   python -m build
   python -m twine check dist/*
   ```

4. Upload to TestPyPI first, then PyPI:

   ```bash
   python -m twine upload --repository testpypi dist/*
   python -m twine upload dist/*
   ```

Use a PyPI API token as the password rather than your account password.

## License

MIT. See [LICENSE](LICENSE).
