# DiamondGameKit
DiamondGameKit is a tiny helper toolkit for building simple Pygame-based games.
It provides lightweight building blocks so you can focus on gameplay instead of boilerplate.
## Features
- Game wrapper (screen + clock + FPS)
- Player rectangle entity
- Enemy spawner with downward movement
- Simple keyboard input helpers
- Score HUD
- Internal plugin system
## Installation
pip install diamondgamekit
## Quick Example
import pygame
import diamondgamekit as dgk
pygame.init()
screen = pygame.display.set\_mode((800, 600))
clock = pygame.time.Clock()
game = dgk.Game(screen, clock, title="Dodge The Blocks")
player = dgk.PlayerRect(x=400, y=550, w=40, h=40, speed=5)
spawner = dgk.EnemySpawnerRect(
  width=40, height=40,
  spawn\_y\_range=(-600, -40),
  count=10,
  speed=5,
  screen\_width=800,
)
score = dgk.Score(font\_size=32, color=(255, 255, 255))
running = True
while running:
  for event in pygame.event.get():
  if event.type == pygame.QUIT:
  running = False
  keys = pygame.key.get\_pressed()
  dgk.handle\_basic\_horizontal\_input(
  player,
  keys,
  left=pygame.K\_a,
  right=pygame.K\_d,
  bounds=(0, 800 - player.rect.width),
  )
  spawner.update\_all()
  for e in spawner.enemies:
  if e.y > 600:
  spawner.reset\_enemy(e)
  score.add(1)
  if player.rect.colliderect(e):
  running = False
  screen.fill((20, 20, 20))
  pygame.draw.rect(screen, (0, 255, 0), player.rect)
  for e in spawner.enemies:
  pygame.draw.rect(screen, (255, 0, 0), e)
  score.draw(screen, x=10, y=10)
  pygame.display.flip()
  game.tick(60)
pygame.quit()
Metadata
Release files for diamondgamekit 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diamondgamekit-1.0.0.tar.gz | 4.5 kB | Without provenance | Details for diamondgamekit-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| diamondgamekit-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for diamondgamekit-1.0.0-py3-none-any.whl |
Total release size: 10.7 kB
Release files / diamondgamekit-1.0.0.tar.gz
| Download URL | diamondgamekit-1.0.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb74601a7cb562640b3760ff80b93c7bb2249423e9f14a3f5391e1d4753ecc15
|
|
BLAKE2b-256 checksum How to use checksums |
5da575e1e1dd0907e0f2adb3f2c0761b027095d3c8ef5bca2934b89f1fa9a041
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|
Release files / diamondgamekit-1.0.0-py3-none-any.whl
| Download URL | diamondgamekit-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca6a09ee57ebd0accb2f188b1b4b3bcb718e52d3f702efe4fe2195140194be25
|
|
BLAKE2b-256 checksum How to use checksums |
b2786a104d384d4cb0892a133a4049070514c4742fad440fa3c3d40cfb035a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|
Security for diamondgamekit 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.