Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tynab/pool-game
Pool Game
https://github.com/tynab/pool-game
game game-pool game-python game-wasm pip pip3 pool pool-game py pygame pygbag pymunk python python-game python-wasm tynab wasm wasm-game wasm-python yan
Last synced: 16 days ago
JSON representation
Pool Game
- Host: GitHub
- URL: https://github.com/tynab/pool-game
- Owner: Tynab
- Created: 2023-10-31T15:48:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-21T19:18:24.000Z (10 months ago)
- Last Synced: 2024-12-02T08:59:04.271Z (20 days ago)
- Topics: game, game-pool, game-python, game-wasm, pip, pip3, pool, pool-game, py, pygame, pygbag, pymunk, python, python-game, python-wasm, tynab, wasm, wasm-game, wasm-python, yan
- Language: Python
- Homepage:
- Size: 10.5 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# POOL GAME
The Pool Game project is a Python-based endeavor utilizing libraries such as pygame and pymunk. This project aims to create a virtual representation of the classic game of pool, implementing realistic physics and interactive gameplay features for an engaging user experience.## IMAGE DEMO
## CODE DEMO
```python
# create pool cue
class Cue:
def __init__(self, pos):
self.original_image = cue_image
self.angle = 0
self.image = pygame.transform.rotate(self.original_image, self.angle)
self.rect = self.image.get_rect()
self.rect.center = posdef update(self, angle):
self.angle = angledef draw(self, surface):
self.image = pygame.transform.rotate(self.original_image, self.angle)
surface.blit(
self.image,
(
self.rect.centerx - self.image.get_width() / 2,
self.rect.centery - self.image.get_height() / 2,
),
)
```