To install Pysdl2 and sdl2 library, open a sell and run: pip install pysdl2 pysdl2-dll
. If doesn't work, follow steps here.
To install this module, it's simple: open a shell and run pip install kandinsky
.
And if you want to run the module demo, run python -m kandinsky
. Normally a Snake game will launch and you could play it. =)
Numworks works differently in color management, as its screen can only display 65,536 (256/8*256/4*256/8, 16 bits) colors compared to 16,777,216 (24 bits) colors for a regular screen.
It is therefore necessary to make a conversion. To convert a color, you can use the function color()
but you don't have to, by default the all methods does the conversions directly.
Example: color(255, 255, 255) [White color] --> Return (248, 252, 248)
Note for 'Numworks' mode: Numworks added a feature to artificially expand color values, to make it look more natural. This feature has also been added, but the calculator screen can't show more colors, it's just a visual. Also feature not added for Omega and Upsilon
To be as identical as possible to a result on the Numworks.
You can find the fonts used here.
This can be useful, to help drawing or immersion.
Because MacOS doesn't allow management of GUI by another Thread than the main Thread of program.
Except precisely I need, not to occupy it, because otherwise that would block the program during importation of library, which thus does not have any more great interest. (¬_¬")
So for people on macOS, the display()
function will have to be called regularly on operations not using library functions, to keep the window alive.
Note: ignore that, it's solved! (the problem came from tkinter which gave false pointers)
....Dude, idk....(*  ̄︿ ̄)
The error occurs when creating the SDL window from identifier of frame where it will be placed.
So for the moment no MacOS support, even if I prepared the library for it ...
More details about error
The error occurs at line 154/155 in gui.py:
So here is the information about the error for those who would like to help me fix it.
You can offer me your fixs by creating a Pull Request.
Yes, I'm French and my English is bad, that's why I use a translator XD.