How to migrate code to version 1.5
To make your code compatible with version 1.5, follow these steps:
- Rename the
caption
option ininit
totitle
- Rename the
scale
option ininit
todisplay_scale
- Remove the
palette
option frominit
(you can modify the palette colors with thecolors
array after initialization) - Remove the
fullscreen
option frominit
(you can toggle fullscreen mode using thefullscreen
function after initialization) - If an undefined key name error occurs, rename the key according to the key definitions
- Change
get
andset
in theImage
andTilemap
classes topget
andpset
, respectively - Multiply the
u
,v
,w
, andh
parameters ofbltm
by 8 (asbltm
now operates in pixel units) - Update the members and methods of the
Sound
andMusic
classes to their new names
I can’t use the pyxeleditor
command in version 1.5+.
Starting from version 1.5, Pyxel's tools have been integrated into the pyxel
command. To access the resource editor, use the following command: pyxel edit [PYXEL_RESOURCE_FILE]
.
Where do I start to learn Pyxel?
It is recommended to try Pyxel's example code in the following order: 01, 05, 03, 04, 02.
Are there any books on Pyxel?
The official book is available in Japanese only.
What is the difference between the update
and draw
functions?
The update
function is called every frame, but the draw
function may be skipped if the processing time exceeds the allowable limit. This design in Pyxel reduces the impact of rendering load and OS interruptions, enabling smooth animation.
What are the types and usage of Pyxel's MML commands?
The following are the types of commands available for use with the mml
method of the Sound class:
T
(1-900)
Specifies the tempo. The default is 100.
Note that there may be discrepancies in the specified tempo because it is converted using the formulaSound.speed = 900/T
.
The tempo applies to the entire sound, and if specified multiple times, the last value will be used.@
(0-3)
Specifies the tone. The default is 0.O
(0-4)
Specifies the octave. The default is 2.>
Increases the octave by 1.<
Decreases the octave by 1.Q
(1-8)
Specifies the quantization (length of the sound). At 8, there is no gap between notes; at 4, it is halved. The default is 7.V
(0-7)
Specifies the volume. The default is 7.X
(0-7)
Defines and specifies the volume envelope. This is an advanced command used instead ofV
.
For example, specifyingX2:345
switches to envelope 2 and changes the volume of each note to something like 34555... The unit of volume change is a sixteenth of a quarter note.
SpecifyingX2
switches to envelope 2 and uses the volume envelope set for that number.L
(1/2/4/8/16/32)
Specifies the length of notes and rests.L8
is an eighth note. The default is 4.CDEFGAB
Plays the note for the specified pitch.
You can specify a length (1/2/4/8/16/32) after the note, likeF16
, to temporarily change the note's length.R
Plays a rest.
You can specify a length (1/2/4/8/16/32) after the rest, likeR8
, to temporarily change the rest's length.#
or+
Written after a note, raises the pitch by a semitone.-
Written after a note, lowers the pitch by a semitone..
Dotted note. Written after a note, extends its length by half.~
Written after a note, plays it with vibrato.&
Ties the next note if it has the same pitch, or slurs it if the pitch is different.
Can I change the palette colors in Pyxel Editor?
By placing a Pyxel palette file (.pyxpal) in the same directory as the Pyxel resource file (.pyxres), you can match the palette colors used in Pyxel Editor to those in the resource file. For instructions on creating a Pyxel palette file, please refer to the README.
What features are planned for future releases?
The following features and improvements are planned:
- Add a Pyxel app launcher
- Overhaul of sound functions and MML support
- Improve usability of Pyxel Editor
- Add Pyxel tutorials for children
Can I use Pyxel for commercial purposes without the author's permission?
As long as you comply with the MIT License and clearly display the full text of the copyright and license in the source code or license file, you are free to sell or distribute it without the author’s permission. However, since Pyxel is developed by a single individual, it would be appreciated if you could contact the author or consider sponsoring their work if possible.