Based on PyGame. Recording uses system call ffmpeg
for stitching frames into video, but it's not needed for rendering .png
images.
py -m venv venv
venv/Scripts/activate
pip install -r requirements.txt
py -m VXTool examples/color
To build the package make sure you also have build
installed. Config is written in pyproject.toml
.
pip install build
py -m build
Building the package with build
tool creates a dist
directory containing files VXTool-0.1.tar.gz
, VXTool-0.1-py3-none-any.whl
. Install using pip specyfing .whl
file.
Template directory presents minimal project structure. Its settings file contains all settings needed for launch. Callback file is your sandbox.
To create a new project from this template use:
py -m VXTool ./path/to_the_new/project/ --create
A font file UniVGA16.ttf
is provided in the template project.
You may add your *.ttf
font into the project directory and specify its information in settings.py
.
Template project and examples contain UniVGA16.ttf
font file. The file originally can be accessed here under attached license. Originally created by Dmitry Bolkhovityanov. The font is also a part of reactOS.
CTRL + Q
- quitCTRL + S
- screenshot, saves into out/*.png files
Not all examples aren't basic or concise. Some of them act as a documentation :)
- colors - Use text with colors to draw a static picture.
- animation - Simple animated dot.Letter changing, moving.
- stress - Primitive system level benchmark.
- Main spawns App and Callback
- Callback doesn't send whole buffer, only pos and hash list
- Hash to Dot dict being held by TextRender.
- Callback holds its own hash to dot and sends updates
- Slow.
- TextRender has internal Buffer.
- Callback submits a diff to the queue, TextRender blits needed dots.
- App gathers events every window frame, while displaying last available TextRender surface.
- TextRender font lookup by fontname and size.
- Dots do not need to be immutable
- Changing dot's position requires removing from the buffer and putting again after change
- variant / creation, duplication of animated dots is important
- reminder: this doesn't need to be turing complete
- how to spawn the falling star
- Main process
-
- App
-
- TextRender
- Callback (process)
App | TextRender | Callback |
---|---|---|
Create window, font preload | ||
Create TextRender object | ||
Create render queue | ||
Create event queue | ||
Spawn and start Callback | ||
Gives Callback access to TextRender's render queue | Has access to render queue | |
Start Callback Loop |
App | TextRender |
---|---|
Capture events from pygame | |
Execute any shortcuts pressed | |
Put events on event queue | |
Get entry from render queue | |
Process entry |
- screenshot with renderer setup
- handle window attribute in mouseevents properly
- backcolor transparency isn't transparent
- implement properly, document and test sync variants
- a difference between clear and backcolor
- Loading png tilesets
- Position as (pygame.math.Vector2)
- cleaning up util ( constistency, remember about pygame Vector and Rect)
- (didnt try not waiting) Callback chooses to wait or not for new InputFrame.
- widget discards callback frames up to the last one if their counters don't match
- Moving the window causes to crash because of some blocking timeout?
- Interface:
-
- pause/play/reload
- Live music performance:
-
- spectral analysis
-
- midi input