pysick


Namepysick JSON
Version 2.68 PyPI version JSON
download
home_pagehttps://github.com/CowZik/pysick/
SummaryAn Bypass for learning Graphics Development
upload_time2025-08-09 07:40:58
maintainerNone
docs_urlNone
authorCowZik
requires_pythonNone
licenseMIT
keywords graphics graphics development learning graphics development pysick pysick graphics pysick engine
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PySick - Getting Started

PySick is a simple graphics library built on top of Tkinter.  
It makes creating shapes, windows, input handling, and basic games super easy!

---

## Getting Started

Here’s how to open a window, draw a rectangle, and start the main loop.

```python
import pysick

# Create a window (800 x 600 pixels)
pysick.ingine.init(800, 600)

# Create a rectangle shape
rect = pysick.graphics.Rect(
    x=100,
    y=100,
    width=200,
    height=100,
    fill=(255, 0, 0)  # Red color
)

# Fill the entire screen with dark gray
pysick.graphics.fill_screen((30, 30, 30))

# Draw the rectangle shape
pysick.graphics.draw(rect)

# Start the main loop
pysick.ingine.run()
```

---

## Running Without mainloop()

PySick can also work in a `while` loop for more game-like programs:

```python
import pysick

pysick.ingine.init(800, 600)

rect = pysick.graphics.Rect(100, 100, 200, 100, fill=(0, 255, 0))

while not pysick.QUIT:
    pysick.graphics.fill_screen((0, 0, 0))
    pysick.graphics.draw(rect)
    pysick.ingine.slap()
```

---

## Colors

You can use:

- Named colors, like `"red"`
- RGB tuples, like `(255, 0, 0)`
- RGBA tuples (alpha is ignored in Tkinter)

Example:

```python
rect = pysick.graphics.Rect(
    x=50,
    y=50,
    width=100,
    height=50,
    fill="blue"
)
```

Or with RGB:

```python
rect = pysick.graphics.Rect(
    x=50,
    y=50,
    width=100,
    height=50,
    fill=(0, 128, 255)
)
```

---

## Shapes

PySick supports:

- Rectangle
- Oval
- Circle
- Line
- Polygon
- Text

Example:

```python
oval = pysick.graphics.Oval(200, 150, 80, 40, fill="purple")
pysick.graphics.draw(oval)

line = pysick.graphics.Line(50, 50, 200, 200, fill=(255, 255, 0))
pysick.graphics.draw(line)

polygon_points = [(50, 50), (100, 150), (150, 50)]
pysick.graphics.draw_polygon(polygon_points, fill=(0, 255, 255))

text = "Hello, PySick!"
pysick.graphics.draw_text(300, 300, text, fill=(255, 255, 255))
```

---

## Input Handling

### Keyboard

```python
pysick.keys.init()

if pysick.keys.is_pressed(pysick.keys.KEY_LEFT):
    print("Left arrow is held!")

if pysick.keys.was_pressed(pysick.keys.KEY_SPACE):
    print("Space was pressed!")
```

---

### Mouse

```python
pysick.mouse.init()

if pysick.mouse.is_pressed(pysick.mouse.LEFT):
    print("Left mouse button pressed.")

x, y = pysick.mouse.get_pos()
print(f"Mouse is at {x},{y}")
```

---

## GUI Widgets

```python
pysick.gui.add_label("Hello!", 100, 100)
pysick.gui.add_button("Click Me", 200, 200, lambda: print("Clicked!"))
entry = pysick.gui.add_entry(300, 300)

# Checkbuttons and radiobuttons:
check, var = pysick.gui.add_checkbutton("Enable", 400, 400)
radio_var = tk.StringVar()
radio = pysick.gui.add_radiobutton("Option A", 500, 500, radio_var, value="A")
```

---

## Videos and Images

Show an image:

```python
pysick.image.show(pysick.ingine, "my_picture.png")
```

Play a video:

```python
pysick.image.play("my_video.mp4")
```

---

## Ticking

Replace time.sleep() with pysick’s tick helper:

```python
pysick.clock.tick(ms=16)   # wait ~16ms
```
For efficient FPS handling, use `ep.py`'s epBaseDt variable:
```python
from pysick.ep import *
pysick.clock.tick(CODE=epBaseDt)
```

---

## QUIT Flag

Inside your while-loop game:

```python
while not pysick.QUIT:
    # game logic
    pysick.ingine.slap()
```

---
##  Entity & Player System (`ep.py`)

PySick includes a powerful, modular Entity-Player system (`ep.py`) that allows you to create full interactive characters and shapes using just 1 to 10 lines of code. It's ideal for beginners, prototypes, or even advanced game logic.
- it uses OpenGL for efficient 3D 
###  Quick Example

```python
import pysick
from pysick.ep import *

pysick.ingine.init(800, 600)
player = epBasePlayerController()
player.change_sprite(100, 100, 50, 50)
player.change_speed(5)

player.loop(30)  # runs the movement and draw loop
```

---

###  Available Classes

####  `epBasePlayerController`
- 2D rectangular player
- Arrow key (or WASD) movement
- Infinite loop built-in
- Easy color, speed, and position control

####  `epAdvancedPlayerController`
- Adds physics-like gravity, jumping, velocity
- Jumping only when on ground
- Movement clamped to screen size
- Customizable key mappings

####  `epBaseTwoPlayerController`
- 2 players, independent controls
- Draws both player sprites
- Designed for local multiplayer

####  `epBaseTwoPlayerShooter`
- Two-player shooting battle
- Shoots bullets, checks collision, tracks score
- Auto updates GUI labels for score

####  `epBaseSpaceShooter`
- Classic arcade-style top-down shooter
- Bullets, enemy spawning, collisions
- Auto score tracking and Game Over message

---

###  Drawing System

####  Base Shape Classes
Each has a `.draw()` method that you call per frame:

- `epBaseRect` (internal)
- `epBaseOval`
- `epBaseCircle`
- `epBasePolygon`
- `epBaseArc`
- `epBaseLine`
- `epBaseText`

You can use them as reusable objects, such as:

```python
arc = epBaseArc(200, 100, 80, 80, start=45, extent=270)
arc.set_color((255, 0, 255))
arc.draw()
```



###  `epBaseTerrain` - 2D Platform Terrain

A gravity-based terrain system in 2D using the `graphics` system.

```python
from pysick.ep import epBaseTerrain

terrain = epBaseTerrain()
terrain.loop()
```

- Auto player movement (WASD + Space for jump)
- Rectangular platforms
- Built-in collision
- Simple gravity + jump physics

---

##  Getting a step into 3 Dimensional using OpenGL

### Constants:
- There are many constants like epAdvanced who hold a string value like `'X_EP_ENABLE_ADVANED$TRUE%FALSE-valid'`
- they are reflected in if statements
---

###  `epAdvancedCube` and `epAdvancedCuboid`

Draws a cube or cuboid in 3D using OpenGL:

```python
from pysick.ep import epAdvancedCube, epAdvancedCuboid

cube = epAdvancedCube(x=0, y=0, z=0, size=5, color=(1, 1, 1))
cuboid = epAdvancedCuboid(x=10, y=5, z=10, width=5, height=10, depth=3)

cube.draw()
cuboid.draw()
```

- `color`: values between 0.0 - 1.0 (RGB)
- `rotation`: degrees (x, y, z)

---

###  `epAdvancedTerrain` - 3D Block Terrain

```python
from pysick.ep import epAdvancedTerrain

terrain = epAdvancedTerrain()
terrain.loop()
```

- Random block heights
- 3D cube-style terrain
- Gravity-enabled player physics

---

###  Enabling OpenGL

To enable advanced OpenGL rendering:

```python
from pysick.ep import epEnable, epAdvanced

epEnable(epAdvanced)
```

To disable:

```python
epDisable(epAdvanced)
```

---

###  `epAdvancedWindowInit` & `epAdvancedRun`, using raw GL

For running OpenGL-based 3D games:

```python
from pysick.ep import epAdvancedWindowInit, epAdvancedRun
from pysick.OpenGL.GL import *
from pysick.OpenGL.GLUT import *
epAdvancedWindowInit(800, 600)

def render_loop():
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
    terrain.loop()  # or your custom draw code
    glutSwapBuffers()

epAdvancedRun(render_loop)
```

- Uses GLUT backend (`PyOpenGL`)
- Handles depth and perspective
- Calls your loop as display and idle function



---

###  Full Integration Example

```python
from pysick.ep import *
from OpenGL.GL import *
from OpenGL.GLUT import *

terrain = epAdvancedTerrain()
epEnable(epAdvanced)
epAdvancedWindowInit()

def main_loop():
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
    terrain.loop()
    glutSwapBuffers()

epAdvancedRun(main_loop)
```



---

>  This system brings 2D & 3D development to PySick with physics, terrain, camera, OpenGL, and ECS logic.

---

###  Main Game Loop

All `ep` controllers come with a built-in infinite loop, but you can also run PySick in your own while-loop:

```python
while not pysick.QUIT:
    pysick.graphics.fill_screen((20, 20, 20))
    player.update()  # call custom or controller update
    pysick.ingine.slap()
    pysick.clock.tick(30)
```

---

> To stop a loop or quit the game, use `pysick.ingine.quit()` or handle `pysick.QUIT`.

---

###  Summary

| Class                        | Purpose                | Key Features                     |
|-----------------------------|------------------------|----------------------------------|
| `epBasePlayerController`     | Basic player           | 2D movement                      |
| `epAdvancedPlayerController` | Physics-based player   | Gravity, jump, ground logic      |
| `epBaseTwoPlayerController`  | 2-player local control | Custom controls                  |
| `epBaseTwoPlayerShooter`     | 2-player shooter       | Bullets, scoring, hit detection  |
| `epBaseSpaceShooter`         | Space shooter          | Enemies, bullets, collisions     |
| `epBaseArc`, `Circle`, etc.  | Reusable shape objects | Clean `.draw()` usage            |
| `epAdvancedCube`             |  3D cube               | Rotation, projection             |

Explore the `pysick.ep` module to accelerate your game development with powerful, beginner-friendly systems!
At core, ep provides you easy functions of 50 lines of code to 2 - 5 lines of code, how simple is it?

---
## About

```python
pysick.version.about()
```

Displays PySick version info.

# PySick EPP Module — Detailed Overview

The **EPP (Extra Advanced)** module is a  Python game engine component designed for fast 2D graphics rendering and input handling.  
It leverages **NumPy** for efficient framebuffer manipulation, **Pillow (PIL)** for drawing operations, and **Tkinter** for windowing and GUI widgets.

---

## Features

- SuperSonic speed, use this if you are tired with `pysick.ingine`
- Compiled with C, PIL, NumPy
- High-performance framebuffer using NumPy arrays  
- Drawing primitives: rectangles, circles, ovals, points, lines, polygons, and text  
- Image blitting from PIL images or file paths  
- Keyboard and mouse input support with key/mouse state tracking  
- Simple GUI widget wrappers for labels, buttons, entries, checkboxes, radio buttons, sliders, and textboxes  
- Easy game loop management with frame rate control  
- Window creation and management via Tkinter with direct framebuffer display  

---

## Installation

Make sure you have these installed:

```bash
pip install numpy
```
---
### Window and Framebuffer

- **`eppWindowInit(width=800, height=600, title="EPP Window")`**  
  Initialize the window and framebuffer. Must be called before any drawing.

- **`eppSlap()`**  
  Update the Tkinter window by blitting the current framebuffer.

- **`eppRun(update_fn=None, fps=60)`**  
  Runs the main game loop. Calls `update_fn` every frame, then updates the display.

- **`eppQuit()`**  
  Closes the window and stops the loop.

---
### Drawing Primitives

- **`eppFillColor(r, g, b)`**  
  Fill the entire screen with a solid color.

- **`eppDrawRect(x, y, w, h, color)`**  
  Draw a filled rectangle.

- **`eppDrawCircle(cx, cy, r, color)`**  
  Draw a filled circle.

- **`eppDrawOval(x, y, w, h, color)`**  
  Draw a filled ellipse.

- **`eppDrawPoint(x, y, color)`**  
  Draw a single pixel point.

- **`eppDrawLine(x1, y1, x2, y2, color, width=1)`**  
  Draw a line between two points.

- **`eppDrawPolygon(points, color)`**  
  Draw a filled polygon from a list of (x, y) points.

- **`eppDrawText(x, y, text, color, font=None)`**  
  Draw text at the specified position.

- **`eppDrawImage(x, y, src)`**  
  Draw an image from a PIL Image object or file path.

---
### Input Handling

- **`eppInput(key)`**  
  Check if a keyboard key is currently pressed. Keys use Tkinter key symbols (e.g., `'a'`, `'Left'`, `'Escape'`).

- **`eppMousePos()`**  
  Get current mouse position `(x, y)`.

- **`eppMouseButton(button)`**  
  Check if a mouse button (1=left, 2=middle, 3=right) is pressed.

---
### GUI Widgets

*Call* `eppGuiSetRoot(root)` *after window initialization to use GUI widgets.*

- **`eppGuiLabel(text, x, y, font, color)`** — Text label  
- **`eppGuiButton(text, x, y, func, width, height)`** — Button with callback  
- **`eppGuiEntry(x, y, width)`** — Text entry field  
- **`eppGuiCheckButton(text, x, y, variable)`** — Checkbox  
- **`eppGuiRadioButton(text, x, y, variable, value)`** — Radio button  
- **`eppGuiSlider(x, y, from_, to, orient, length)`** — Slider/scale  
- **`eppGuiTextBox(x, y, width, height)`** — Multi-line text box  
- **`eppGuiClear()`** — Remove all GUI widgets  

---
## Example Usage

```python
from epp import *

def update():
    eppFillColor(0, 0, 0)  # Clear screen black
    eppDrawRect(100, 100, 200, 150, (255, 0, 0))  # Red rectangle
    eppDrawCircle(400, 300, 75, (0, 255, 0))      # Green circle
    eppDrawText(10, 10, "Hello PySick!", (255, 255, 255))

eppWindowInit(640, 480, "epp!")
eppRun(update)
eppQuit()
```
---

That’s it — you’re ready to build cool stuff!



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/CowZik/pysick/",
    "name": "pysick",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "graphics, graphics development, learning graphics development, pysick, pysick graphics, pysick engine",
    "author": "CowZik",
    "author_email": "cowzik@email.com",
    "download_url": "https://files.pythonhosted.org/packages/a0/ca/0fa340d0a0766c2d7aa4530319963d90fb6b7679e13d17f5e93e7a4c365f/pysick-2.68.tar.gz",
    "platform": null,
    "description": "# PySick - Getting Started\r\n\r\nPySick is a simple graphics library built on top of Tkinter.  \r\nIt makes creating shapes, windows, input handling, and basic games super easy!\r\n\r\n---\r\n\r\n## Getting Started\r\n\r\nHere\u00e2\u20ac\u2122s how to open a window, draw a rectangle, and start the main loop.\r\n\r\n```python\r\nimport pysick\r\n\r\n# Create a window (800 x 600 pixels)\r\npysick.ingine.init(800, 600)\r\n\r\n# Create a rectangle shape\r\nrect = pysick.graphics.Rect(\r\n    x=100,\r\n    y=100,\r\n    width=200,\r\n    height=100,\r\n    fill=(255, 0, 0)  # Red color\r\n)\r\n\r\n# Fill the entire screen with dark gray\r\npysick.graphics.fill_screen((30, 30, 30))\r\n\r\n# Draw the rectangle shape\r\npysick.graphics.draw(rect)\r\n\r\n# Start the main loop\r\npysick.ingine.run()\r\n```\r\n\r\n---\r\n\r\n## Running Without mainloop()\r\n\r\nPySick can also work in a `while` loop for more game-like programs:\r\n\r\n```python\r\nimport pysick\r\n\r\npysick.ingine.init(800, 600)\r\n\r\nrect = pysick.graphics.Rect(100, 100, 200, 100, fill=(0, 255, 0))\r\n\r\nwhile not pysick.QUIT:\r\n    pysick.graphics.fill_screen((0, 0, 0))\r\n    pysick.graphics.draw(rect)\r\n    pysick.ingine.slap()\r\n```\r\n\r\n---\r\n\r\n## Colors\r\n\r\nYou can use:\r\n\r\n- Named colors, like `\"red\"`\r\n- RGB tuples, like `(255, 0, 0)`\r\n- RGBA tuples (alpha is ignored in Tkinter)\r\n\r\nExample:\r\n\r\n```python\r\nrect = pysick.graphics.Rect(\r\n    x=50,\r\n    y=50,\r\n    width=100,\r\n    height=50,\r\n    fill=\"blue\"\r\n)\r\n```\r\n\r\nOr with RGB:\r\n\r\n```python\r\nrect = pysick.graphics.Rect(\r\n    x=50,\r\n    y=50,\r\n    width=100,\r\n    height=50,\r\n    fill=(0, 128, 255)\r\n)\r\n```\r\n\r\n---\r\n\r\n## Shapes\r\n\r\nPySick supports:\r\n\r\n- Rectangle\r\n- Oval\r\n- Circle\r\n- Line\r\n- Polygon\r\n- Text\r\n\r\nExample:\r\n\r\n```python\r\noval = pysick.graphics.Oval(200, 150, 80, 40, fill=\"purple\")\r\npysick.graphics.draw(oval)\r\n\r\nline = pysick.graphics.Line(50, 50, 200, 200, fill=(255, 255, 0))\r\npysick.graphics.draw(line)\r\n\r\npolygon_points = [(50, 50), (100, 150), (150, 50)]\r\npysick.graphics.draw_polygon(polygon_points, fill=(0, 255, 255))\r\n\r\ntext = \"Hello, PySick!\"\r\npysick.graphics.draw_text(300, 300, text, fill=(255, 255, 255))\r\n```\r\n\r\n---\r\n\r\n## Input Handling\r\n\r\n### Keyboard\r\n\r\n```python\r\npysick.keys.init()\r\n\r\nif pysick.keys.is_pressed(pysick.keys.KEY_LEFT):\r\n    print(\"Left arrow is held!\")\r\n\r\nif pysick.keys.was_pressed(pysick.keys.KEY_SPACE):\r\n    print(\"Space was pressed!\")\r\n```\r\n\r\n---\r\n\r\n### Mouse\r\n\r\n```python\r\npysick.mouse.init()\r\n\r\nif pysick.mouse.is_pressed(pysick.mouse.LEFT):\r\n    print(\"Left mouse button pressed.\")\r\n\r\nx, y = pysick.mouse.get_pos()\r\nprint(f\"Mouse is at {x},{y}\")\r\n```\r\n\r\n---\r\n\r\n## GUI Widgets\r\n\r\n```python\r\npysick.gui.add_label(\"Hello!\", 100, 100)\r\npysick.gui.add_button(\"Click Me\", 200, 200, lambda: print(\"Clicked!\"))\r\nentry = pysick.gui.add_entry(300, 300)\r\n\r\n# Checkbuttons and radiobuttons:\r\ncheck, var = pysick.gui.add_checkbutton(\"Enable\", 400, 400)\r\nradio_var = tk.StringVar()\r\nradio = pysick.gui.add_radiobutton(\"Option A\", 500, 500, radio_var, value=\"A\")\r\n```\r\n\r\n---\r\n\r\n## Videos and Images\r\n\r\nShow an image:\r\n\r\n```python\r\npysick.image.show(pysick.ingine, \"my_picture.png\")\r\n```\r\n\r\nPlay a video:\r\n\r\n```python\r\npysick.image.play(\"my_video.mp4\")\r\n```\r\n\r\n---\r\n\r\n## Ticking\r\n\r\nReplace time.sleep() with pysick\u00e2\u20ac\u2122s tick helper:\r\n\r\n```python\r\npysick.clock.tick(ms=16)   # wait ~16ms\r\n```\r\nFor efficient FPS handling, use `ep.py`'s epBaseDt variable:\r\n```python\r\nfrom pysick.ep import *\r\npysick.clock.tick(CODE=epBaseDt)\r\n```\r\n\r\n---\r\n\r\n## QUIT Flag\r\n\r\nInside your while-loop game:\r\n\r\n```python\r\nwhile not pysick.QUIT:\r\n    # game logic\r\n    pysick.ingine.slap()\r\n```\r\n\r\n---\r\n##  Entity & Player System (`ep.py`)\r\n\r\nPySick includes a powerful, modular Entity-Player system (`ep.py`) that allows you to create full interactive characters and shapes using just 1 to 10 lines of code. It's ideal for beginners, prototypes, or even advanced game logic.\r\n- it uses OpenGL for efficient 3D \r\n###  Quick Example\r\n\r\n```python\r\nimport pysick\r\nfrom pysick.ep import *\r\n\r\npysick.ingine.init(800, 600)\r\nplayer = epBasePlayerController()\r\nplayer.change_sprite(100, 100, 50, 50)\r\nplayer.change_speed(5)\r\n\r\nplayer.loop(30)  # runs the movement and draw loop\r\n```\r\n\r\n---\r\n\r\n###  Available Classes\r\n\r\n####  `epBasePlayerController`\r\n- 2D rectangular player\r\n- Arrow key (or WASD) movement\r\n- Infinite loop built-in\r\n- Easy color, speed, and position control\r\n\r\n####  `epAdvancedPlayerController`\r\n- Adds physics-like gravity, jumping, velocity\r\n- Jumping only when on ground\r\n- Movement clamped to screen size\r\n- Customizable key mappings\r\n\r\n####  `epBaseTwoPlayerController`\r\n- 2 players, independent controls\r\n- Draws both player sprites\r\n- Designed for local multiplayer\r\n\r\n####  `epBaseTwoPlayerShooter`\r\n- Two-player shooting battle\r\n- Shoots bullets, checks collision, tracks score\r\n- Auto updates GUI labels for score\r\n\r\n####  `epBaseSpaceShooter`\r\n- Classic arcade-style top-down shooter\r\n- Bullets, enemy spawning, collisions\r\n- Auto score tracking and Game Over message\r\n\r\n---\r\n\r\n###  Drawing System\r\n\r\n####  Base Shape Classes\r\nEach has a `.draw()` method that you call per frame:\r\n\r\n- `epBaseRect` (internal)\r\n- `epBaseOval`\r\n- `epBaseCircle`\r\n- `epBasePolygon`\r\n- `epBaseArc`\r\n- `epBaseLine`\r\n- `epBaseText`\r\n\r\nYou can use them as reusable objects, such as:\r\n\r\n```python\r\narc = epBaseArc(200, 100, 80, 80, start=45, extent=270)\r\narc.set_color((255, 0, 255))\r\narc.draw()\r\n```\r\n\r\n\r\n\r\n###  `epBaseTerrain` - 2D Platform Terrain\r\n\r\nA gravity-based terrain system in 2D using the `graphics` system.\r\n\r\n```python\r\nfrom pysick.ep import epBaseTerrain\r\n\r\nterrain = epBaseTerrain()\r\nterrain.loop()\r\n```\r\n\r\n- Auto player movement (WASD + Space for jump)\r\n- Rectangular platforms\r\n- Built-in collision\r\n- Simple gravity + jump physics\r\n\r\n---\r\n\r\n##  Getting a step into 3 Dimensional using OpenGL\r\n\r\n### Constants:\r\n- There are many constants like epAdvanced who hold a string value like `'X_EP_ENABLE_ADVANED$TRUE%FALSE-valid'`\r\n- they are reflected in if statements\r\n---\r\n\r\n###  `epAdvancedCube` and `epAdvancedCuboid`\r\n\r\nDraws a cube or cuboid in 3D using OpenGL:\r\n\r\n```python\r\nfrom pysick.ep import epAdvancedCube, epAdvancedCuboid\r\n\r\ncube = epAdvancedCube(x=0, y=0, z=0, size=5, color=(1, 1, 1))\r\ncuboid = epAdvancedCuboid(x=10, y=5, z=10, width=5, height=10, depth=3)\r\n\r\ncube.draw()\r\ncuboid.draw()\r\n```\r\n\r\n- `color`: values between 0.0 - 1.0 (RGB)\r\n- `rotation`: degrees (x, y, z)\r\n\r\n---\r\n\r\n###  `epAdvancedTerrain` - 3D Block Terrain\r\n\r\n```python\r\nfrom pysick.ep import epAdvancedTerrain\r\n\r\nterrain = epAdvancedTerrain()\r\nterrain.loop()\r\n```\r\n\r\n- Random block heights\r\n- 3D cube-style terrain\r\n- Gravity-enabled player physics\r\n\r\n---\r\n\r\n###  Enabling OpenGL\r\n\r\nTo enable advanced OpenGL rendering:\r\n\r\n```python\r\nfrom pysick.ep import epEnable, epAdvanced\r\n\r\nepEnable(epAdvanced)\r\n```\r\n\r\nTo disable:\r\n\r\n```python\r\nepDisable(epAdvanced)\r\n```\r\n\r\n---\r\n\r\n###  `epAdvancedWindowInit` & `epAdvancedRun`, using raw GL\r\n\r\nFor running OpenGL-based 3D games:\r\n\r\n```python\r\nfrom pysick.ep import epAdvancedWindowInit, epAdvancedRun\r\nfrom pysick.OpenGL.GL import *\r\nfrom pysick.OpenGL.GLUT import *\r\nepAdvancedWindowInit(800, 600)\r\n\r\ndef render_loop():\r\n    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)\r\n    terrain.loop()  # or your custom draw code\r\n    glutSwapBuffers()\r\n\r\nepAdvancedRun(render_loop)\r\n```\r\n\r\n- Uses GLUT backend (`PyOpenGL`)\r\n- Handles depth and perspective\r\n- Calls your loop as display and idle function\r\n\r\n\r\n\r\n---\r\n\r\n###  Full Integration Example\r\n\r\n```python\r\nfrom pysick.ep import *\r\nfrom OpenGL.GL import *\r\nfrom OpenGL.GLUT import *\r\n\r\nterrain = epAdvancedTerrain()\r\nepEnable(epAdvanced)\r\nepAdvancedWindowInit()\r\n\r\ndef main_loop():\r\n    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)\r\n    terrain.loop()\r\n    glutSwapBuffers()\r\n\r\nepAdvancedRun(main_loop)\r\n```\r\n\r\n\r\n\r\n---\r\n\r\n>  This system brings 2D & 3D development to PySick with physics, terrain, camera, OpenGL, and ECS logic.\r\n\r\n---\r\n\r\n###  Main Game Loop\r\n\r\nAll `ep` controllers come with a built-in infinite loop, but you can also run PySick in your own while-loop:\r\n\r\n```python\r\nwhile not pysick.QUIT:\r\n    pysick.graphics.fill_screen((20, 20, 20))\r\n    player.update()  # call custom or controller update\r\n    pysick.ingine.slap()\r\n    pysick.clock.tick(30)\r\n```\r\n\r\n---\r\n\r\n> To stop a loop or quit the game, use `pysick.ingine.quit()` or handle `pysick.QUIT`.\r\n\r\n---\r\n\r\n###  Summary\r\n\r\n| Class                        | Purpose                | Key Features                     |\r\n|-----------------------------|------------------------|----------------------------------|\r\n| `epBasePlayerController`     | Basic player           | 2D movement                      |\r\n| `epAdvancedPlayerController` | Physics-based player   | Gravity, jump, ground logic      |\r\n| `epBaseTwoPlayerController`  | 2-player local control | Custom controls                  |\r\n| `epBaseTwoPlayerShooter`     | 2-player shooter       | Bullets, scoring, hit detection  |\r\n| `epBaseSpaceShooter`         | Space shooter          | Enemies, bullets, collisions     |\r\n| `epBaseArc`, `Circle`, etc.  | Reusable shape objects | Clean `.draw()` usage            |\r\n| `epAdvancedCube`             |  3D cube               | Rotation, projection             |\r\n\r\nExplore the `pysick.ep` module to accelerate your game development with powerful, beginner-friendly systems!\r\nAt core, ep provides you easy functions of 50 lines of code to 2 - 5 lines of code, how simple is it?\r\n\r\n---\r\n## About\r\n\r\n```python\r\npysick.version.about()\r\n```\r\n\r\nDisplays PySick version info.\r\n\r\n# PySick EPP Module \u00e2\u20ac\u201d Detailed Overview\r\n\r\nThe **EPP (Extra Advanced)** module is a  Python game engine component designed for fast 2D graphics rendering and input handling.  \r\nIt leverages **NumPy** for efficient framebuffer manipulation, **Pillow (PIL)** for drawing operations, and **Tkinter** for windowing and GUI widgets.\r\n\r\n---\r\n\r\n## Features\r\n\r\n- SuperSonic speed, use this if you are tired with `pysick.ingine`\r\n- Compiled with C, PIL, NumPy\r\n- High-performance framebuffer using NumPy arrays  \r\n- Drawing primitives: rectangles, circles, ovals, points, lines, polygons, and text  \r\n- Image blitting from PIL images or file paths  \r\n- Keyboard and mouse input support with key/mouse state tracking  \r\n- Simple GUI widget wrappers for labels, buttons, entries, checkboxes, radio buttons, sliders, and textboxes  \r\n- Easy game loop management with frame rate control  \r\n- Window creation and management via Tkinter with direct framebuffer display  \r\n\r\n---\r\n\r\n## Installation\r\n\r\nMake sure you have these installed:\r\n\r\n```bash\r\npip install numpy\r\n```\r\n---\r\n### Window and Framebuffer\r\n\r\n- **`eppWindowInit(width=800, height=600, title=\"EPP Window\")`**  \r\n  Initialize the window and framebuffer. Must be called before any drawing.\r\n\r\n- **`eppSlap()`**  \r\n  Update the Tkinter window by blitting the current framebuffer.\r\n\r\n- **`eppRun(update_fn=None, fps=60)`**  \r\n  Runs the main game loop. Calls `update_fn` every frame, then updates the display.\r\n\r\n- **`eppQuit()`**  \r\n  Closes the window and stops the loop.\r\n\r\n---\r\n### Drawing Primitives\r\n\r\n- **`eppFillColor(r, g, b)`**  \r\n  Fill the entire screen with a solid color.\r\n\r\n- **`eppDrawRect(x, y, w, h, color)`**  \r\n  Draw a filled rectangle.\r\n\r\n- **`eppDrawCircle(cx, cy, r, color)`**  \r\n  Draw a filled circle.\r\n\r\n- **`eppDrawOval(x, y, w, h, color)`**  \r\n  Draw a filled ellipse.\r\n\r\n- **`eppDrawPoint(x, y, color)`**  \r\n  Draw a single pixel point.\r\n\r\n- **`eppDrawLine(x1, y1, x2, y2, color, width=1)`**  \r\n  Draw a line between two points.\r\n\r\n- **`eppDrawPolygon(points, color)`**  \r\n  Draw a filled polygon from a list of (x, y) points.\r\n\r\n- **`eppDrawText(x, y, text, color, font=None)`**  \r\n  Draw text at the specified position.\r\n\r\n- **`eppDrawImage(x, y, src)`**  \r\n  Draw an image from a PIL Image object or file path.\r\n\r\n---\r\n### Input Handling\r\n\r\n- **`eppInput(key)`**  \r\n  Check if a keyboard key is currently pressed. Keys use Tkinter key symbols (e.g., `'a'`, `'Left'`, `'Escape'`).\r\n\r\n- **`eppMousePos()`**  \r\n  Get current mouse position `(x, y)`.\r\n\r\n- **`eppMouseButton(button)`**  \r\n  Check if a mouse button (1=left, 2=middle, 3=right) is pressed.\r\n\r\n---\r\n### GUI Widgets\r\n\r\n*Call* `eppGuiSetRoot(root)` *after window initialization to use GUI widgets.*\r\n\r\n- **`eppGuiLabel(text, x, y, font, color)`** \u00e2\u20ac\u201d Text label  \r\n- **`eppGuiButton(text, x, y, func, width, height)`** \u00e2\u20ac\u201d Button with callback  \r\n- **`eppGuiEntry(x, y, width)`** \u00e2\u20ac\u201d Text entry field  \r\n- **`eppGuiCheckButton(text, x, y, variable)`** \u00e2\u20ac\u201d Checkbox  \r\n- **`eppGuiRadioButton(text, x, y, variable, value)`** \u00e2\u20ac\u201d Radio button  \r\n- **`eppGuiSlider(x, y, from_, to, orient, length)`** \u00e2\u20ac\u201d Slider/scale  \r\n- **`eppGuiTextBox(x, y, width, height)`** \u00e2\u20ac\u201d Multi-line text box  \r\n- **`eppGuiClear()`** \u00e2\u20ac\u201d Remove all GUI widgets  \r\n\r\n---\r\n## Example Usage\r\n\r\n```python\r\nfrom epp import *\r\n\r\ndef update():\r\n    eppFillColor(0, 0, 0)  # Clear screen black\r\n    eppDrawRect(100, 100, 200, 150, (255, 0, 0))  # Red rectangle\r\n    eppDrawCircle(400, 300, 75, (0, 255, 0))      # Green circle\r\n    eppDrawText(10, 10, \"Hello PySick!\", (255, 255, 255))\r\n\r\neppWindowInit(640, 480, \"epp!\")\r\neppRun(update)\r\neppQuit()\r\n```\r\n---\r\n\r\nThat\u00e2\u20ac\u2122s it \u00e2\u20ac\u201d you\u00e2\u20ac\u2122re ready to build cool stuff!\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An Bypass for learning Graphics Development",
    "version": "2.68",
    "project_urls": {
        "Homepage": "https://github.com/CowZik/pysick/"
    },
    "split_keywords": [
        "graphics",
        " graphics development",
        " learning graphics development",
        " pysick",
        " pysick graphics",
        " pysick engine"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e329aa0c81ed62aa788d847ed99bdfe9e29f21a51937800bba1785347eb6569b",
                "md5": "070e6057e48b2534995aa6c39b5e96d4",
                "sha256": "e8fca8a3c65c1bbb2a03b718e65a074f2852d18873a4284e511ec162b7664090"
            },
            "downloads": -1,
            "filename": "pysick-2.68-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "070e6057e48b2534995aa6c39b5e96d4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 14737671,
            "upload_time": "2025-08-09T07:40:50",
            "upload_time_iso_8601": "2025-08-09T07:40:50.555266Z",
            "url": "https://files.pythonhosted.org/packages/e3/29/aa0c81ed62aa788d847ed99bdfe9e29f21a51937800bba1785347eb6569b/pysick-2.68-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a0ca0fa340d0a0766c2d7aa4530319963d90fb6b7679e13d17f5e93e7a4c365f",
                "md5": "ccccdd75a40d87acbff902f6f25b8931",
                "sha256": "a1ab1c23e6f89669458c50cbf72ab52e2f4bc5e11c771cd4872bb442824f6712"
            },
            "downloads": -1,
            "filename": "pysick-2.68.tar.gz",
            "has_sig": false,
            "md5_digest": "ccccdd75a40d87acbff902f6f25b8931",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10935404,
            "upload_time": "2025-08-09T07:40:58",
            "upload_time_iso_8601": "2025-08-09T07:40:58.305323Z",
            "url": "https://files.pythonhosted.org/packages/a0/ca/0fa340d0a0766c2d7aa4530319963d90fb6b7679e13d17f5e93e7a4c365f/pysick-2.68.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-09 07:40:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CowZik",
    "github_project": "pysick",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pysick"
}
        
Elapsed time: 1.25268s