A user friendly (I guess) Lib for games
Project description
pyGL is an Python Graphical Librairy for python You can do anything you want with it
DOCUMENTATION
- Import the lib
- After do this method :
app = Window("App name", width, height)
- Do a while loop
- After use the method
app.clearScreen()
- You can set your max FPS by doing
app.setMaxFPS(maxFPS)
- You can add a background color, you need todo
app.setBackgroundColor(color)
- At the end you need todo an app.loop()
DRAWING/Position
- In this Engine you have Vector2 and Transform; contains two Vector2 Object, One is Position and the other is Scale
- Drawing a basic line is Simple :
app.DrawLine(pos1 : Vector2, pos 2 : Vector2, color, linewidth, outline)
- Drawing a you have two methods; fast and slow
- SLOW :
app.drawRect(Transform, color)
- FAST :
app.fdr(x,y,w,h,c)
MOVING A TRANSFORM/SCALING
- you can use Transfom for Moving and Scaling or just Moving by a presise axis
- Moving
transform.Translate(movX,movY)
//Recommended : do an transform.Update()
- Scaling
transform.Scale(scaleX,scaleY)
//Recommended : do an transform.Update()
- Fixed Movement / Scaling
transform.x or y = VALUE OR tranform.position.x or y = VAULE
transform.w or h = VALUE OR transform.scale.x or y = VALUE
Constant usefull
Object -> an array stock all of the transform of the objects (width, height, x, y)
#Drawing Images
- To print images you need to get them / load
- Loading
Image = app.LoadImage(Path)
- Print the Image
app.DisplayImage(Image, x, y)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyGL_SukyLaplante-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22bd6cc3a0960d4c8f853e3c0fdddcbee3d0a8844ec28027230189d4dff9d304 |
|
MD5 | 605d8e5f9bed18a212919949fa17e02c |
|
BLAKE2b-256 | ddec413f000656f7070131262c602d6fc3208675735a9a39c8f66ddd3a8f1ccf |