Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 2.93 KB

FAQ.md

File metadata and controls

51 lines (37 loc) · 2.93 KB

FAQ

How to install PySDL2?

To install Pysdl2 and sdl2 library, open a sell and run: pip install pysdl2 pysdl2-dll. If doesn't work, follow steps here.

How to install this module?

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. =)

Why convert colors?

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

Why use external fonts?

To be as identical as possible to a result on the Numworks.
You can find the fonts used here.

Why recreate the Numworks interface?

This can be useful, to help drawing or immersion.

Why the library works differently than MacOS?

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.

Why segfault on MacOS?

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:
error1

And the BackTrace from lldb:
error2

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.

Are you French ?

Yes, I'm French and my English is bad, that's why I use a translator XD.