Python pixel game engine that uses only native python.
A simple tools to make basics shape and more in your terminal. It also give you basics controls over your terminal behaviour, like the window size.
temp.mp4
import nsii
nsii = nsii.Nsii()
- retrieve and set values of any parameter
values = nsii.parameter
nsii.parameter = values
Parameter |
Type |
Description |
name |
str |
window name |
size |
(int, int) |
window size |
pos |
(int, int) |
window position |
fps |
float |
current frame rate |
fps_target |
int or 'max" |
frame rate target |
m_pos |
(int, int) |
cursor coordinates |
p_size |
int |
pixel size |
Function |
Description |
nsii.draw() |
displays all changes |
nsii.dot(x, y, f_col=(r, g, b), b_col=(r, g, b)) |
draw dot |
nsii.line(x0, y0, x1, y1, f_col=(r, g, b), b_col=(r, g, b)) |
draw line |
nsii.circle(x, y, radius, f_col=(r, g, b), b_col=(r, g, b)) |
draw circle |
nsii.rect(x, y, width, height, f_col=(r, g, b), b_col=(r, g, b)) |
draw rectangle |
nsii.input((x, y)) |
retrieve user input |
nsii.print((x, y), text) |
print text |
nsii.key_pressed(key) |
retrieve status of given key code see: https://bit.ly/3RtrWua |
image = nsii.new_image('example.ppm')
Parameter |
Type |
Description |
image.size |
(int, int) |
image size |
image.pos |
(int, int) |
image position |
Function |
Description |
image.show(hide=(r, g, b)) |
displays the image |