-
-
Notifications
You must be signed in to change notification settings - Fork 826
Pyxel Q&A
Which version should I install, the packaged version or the standalone version?
If you already have Python installed and have used the pip command to install Python packages, then the packaged version is recommended. If you have never installed Python before, I recommend that you start with the standalone version.
Is it possible to import the standalone version as an extension module from Python?
You can do this by setting the environment variable PYTHONPATH to the path output by pyxel module_search_path
. If you don't know what this means, I recommend that you uninstall the standalone version and install the packaged version.
What should I change to make my previous Pyxel code compatible with version 1.5+?
Please make the following changes:
- Rename the
caption
option ofinit
totitle
- Rename the
scale
option ofinit
todisplay_scale
- Remove the
palette
option ofinit
. You can modify the palette colors with thecolors
array after initialization. - Remove the
fullscreen
option ofinit
. You can toggle fullscreen with thefullscreen
function after initialization. - Rename the key name according to this if an undefined error occurs
- Rename the
get
andset
of theImage
andTilemap
classes topget
andpset
, respectively - Multiply the
u
,v
,w
, andh
ofbltm
by 8. Becausebltm
can operate in pixel units now. - Renamed the members and methods of the
Sound
andMusic
classes according to the new names
I can't use the pyxeleditor command in version 1.5+.
From version 1.5, Pyxel's tools are integrated into the pyxel
command. You can use the resource editor with pyxel edit [PYXEL_RESOURCE_FILE]
.
Where do I start to learn Pyxel?
I suggest you try to understand it by playing around with Pyxel's example code. Try 01, 05, 03, 04, 02 in that order.
Are there any books on Pyxel?
There are two books in Japanese, though not written by the developer of Pyxel. There is no English version. I'm sure there will be more Pyxel books in the future, including English versions!
Is it possible to convert a Pyxel app into a standalone exe file?
For Windows, you can do it with Nuitka.
First, install required tools:
pip install nuitka zstandard
Then, make an exe file with nuitka command:
nuitka --standalone --onefile --windows-disable-console --include-data-dir=path/to/assets=assets pyxel_app.py
See the Nuitka manual for more details.
What is the difference between the update and draw functions?
Pyxel calls the update function every frame, but the draw function may be skipped if the processing grace time is not sufficient. By doing this, Pyxel achieves smooth animation regardless of the rendering load and interrupt handling.
What features do you plan to add to Pyxel in the future?
For now, I am planning to add the following features:
- Web browser version support
- Official support for ARM Linux, including Raspberry Pi
- Additional expandability of tone and number of simultaneous sounds
- Enhancements to the resource editor, especially the sound editor
- Python and Pyxel tutorials for kids
Can I use Pyxel for commercial purposes without asking for permission?
Yes, you can use it without the developer's permission, as long as you follow the MIT License and indicate the copyright somewhere. However, I would be grateful if you would consider sponsoring Pyxel!