Pyxel is a retro game engine for Python.

Overview

[ English | 中文 | Español | Français | Italiano | 日本語 | 한국어 | Português | Русский ]

Pyxel is a retro game engine for Python.

Thanks to its simple specifications inspired by retro gaming consoles, such as only 16 colors can be displayed and only 4 sounds can be played back at the same time, you can feel free to enjoy making pixel art style games.

The specifications of the gaming console and APIs for Pyxel are referring to awesome PICO-8 and TIC-80.

Pyxel is open source and free to use. Let's start making a retro game with Pyxel!

Specifications

  • Run on Windows, Mac, and Linux
  • Code writing with Python3
  • Fixed 16 color palette
  • 256x256 sized 3 image banks
  • 256x256 sized 8 tilemaps
  • 4 channels with 64 definable sounds
  • 8 musics which can combine arbitrary sounds
  • Keyboard, mouse, and gamepad inputs
  • Image and sound editor

Color Palette



How to Install

Windows

First, install Python3 (version 3.6.8 or higher).

When you install Python with the official installer, add Python to PATH by checking the button below:

Next, install Pyxel with the following pip command from the command prompt:

pip install -U pyxel

Mac

First, in the environment where Homebrew package manager is installed, install Python3 (version 3.6.8 or higher) and the required packages with the following command:

brew install python3 gcc sdl2 sdl2_image gifsicle

You can install Python3 in other ways, but be aware that you must install other libraries.

Next, restart the terminal and install Pyxel with the pip3 command:

pip3 install -U pyxel

Linux

Install Python3 (version 3.6.8 or higher) and the required packages in a way appropriate for each distribution.

Ubuntu:

sudo apt install python3 python3-pip libsdl2-dev libsdl2-image-dev gifsicle
sudo -H pip3 install -U pyxel

Other environment

To install Pyxel in an environment other than the above (32-bit Linux, Raspberry PI, etc.), follow the steps below for building:

Install necessary tools and packages

  • C++ build toolchain (should include gcc and make command)
  • libsdl2-dev and libsdl2-image-dev
  • Python3 (version 3.6.8 or highter) and pip command

Execute the following command in any folder

git clone https://github.com/kitao/pyxel.git
cd pyxel
make -C pyxel/core clean all
pip3 install .

Install examples

After installing Pyxel, the examples of Pyxel will be copied to the current directory with the following command:

install_pyxel_examples

The examples to be copied are as follows:

The examples can be executed like normal Python code:

Windows:

cd pyxel_examples
python 01_hello_pyxel.py

Mac / Linux:

cd pyxel_examples
python3 01_hello_pyxel.py

How to Use

Create a Pyxel Application

After importing the Pyxel module in your python code, specify the window size with init function first, then starts the Pyxel application with run function.

import pyxel

pyxel.init(160, 120)

def update():
    if pyxel.btnp(pyxel.KEY_Q):
        pyxel.quit()

def draw():
    pyxel.cls(0)
    pyxel.rect(10, 10, 20, 20, 11)

pyxel.run(update, draw)

The arguments of run function are update function to update each frame and draw function to draw screen when necessary.

In an actual application, it is recommended to wrap pyxel code in a class as below:

import pyxel

class App:
    def __init__(self):
        pyxel.init(160, 120)
        self.x = 0
        pyxel.run(self.update, self.draw)

    def update(self):
        self.x = (self.x + 1) % pyxel.width

    def draw(self):
        pyxel.cls(0)
        pyxel.rect(self.x, 0, 8, 8, 9)

App()

It is also possible to write simple code using show and flip functions to draw simple graphics and animations.

The show function displays the screen and waits until the ESC key is pressed.

import pyxel

pyxel.init(120, 120)
pyxel.cls(1)
pyxel.circb(60, 60, 40, 7)
pyxel.show()

The flip function updates the screen once.

import pyxel

pyxel.init(120, 80)

while True:
    pyxel.cls(3)
    pyxel.rectb(pyxel.frame_count % 160 - 40, 20, 40, 40, 7)
    pyxel.flip()

Special Controls

The following special controls can be performed while a Pyxel application is running:

  • Esc
    Quit the application
  • Alt(Option)+1
    Save the screenshot to the desktop
  • Alt(Option)+2
    Reset the recording start time of the screen capture video
  • Alt(Option)+3
    Save the screen capture video (gif) to the desktop (up to 30 seconds)
  • Alt(Option)+0
    Toggle the performance monitor (fps, update time, and draw time)
  • Alt(Option)+Enter
    Toggle full screen

How to Create a Resource

The attached Pyxel Editor can create images and sounds used in a Pyxel application.

Pyxel Editor starts with the following command:

pyxeleditor [pyxel_resource_file]

If the specified Pyxel resource file (.pyxres) exists, the file is loaded, and if it does not exist, a new file is created with the specified name. If the resource file is omitted, the name is my_resource.pyxres.

After starting Pyxel Editor, the file can be switched by dragging and dropping another resource file. If the resource file is dragged and dropped while holding down Ctrl(Cmd) key, only the resource type (image/tilemap/sound/music) that is currently being edited will be loaded. This operation enables to combine multiple resource file into one.

The created resource file can be loaded with the load function.

Pyxel Editor has the following edit modes.

Image Editor:

The mode to edit the image banks.

By dragging and dropping a png file onto the Image Editor screen, the image can be loaded into the currently selected image bank.

Tilemap Editor:

The mode to edit tilemaps in which images of the image banks are arranged in a tile pattern.

Sound Editor:

The mode to edit sounds.

Music Editor:

The mode to edit musics in which the sounds are arranged in order of playback.

Other resource creation methods

Pyxel images and tilemaps can also be created in the following way:

  • Create an image from a list of strings with Image.set or Tilemap.set function
  • Load a png file in Pyxel palette with Image.load function

Pyxel sounds can also be created in the following way:

  • Create a sound from strings with Sound.set or Music.set function

Please refer to the API reference for usage of these functions.

How to Create a Stand-Alone Executable

By using the attached Pyxel Packager, a stand-alone executable that will work even in environments where Python is not installed can be created.

To create a stand-alone executable, in the environment where PyInstaller is installed, specify the Python file to be used to launch the application with the pyxelpackager command as follows:

pyxelpackager python_file

When the process is completed, a stand-alone executable is created in the dist folder.

If resources such as .pyxres and .png files are also necessary, put them under the assets folder and they will be included.

It is also possible to specify an icon with the -i icon_file option.

API Reference

System

  • width, height
    The width and height of the screen

  • frame_count
    The number of the elapsed frames

  • init(width, height, [caption], [scale], [palette], [fps], [quit_key], [fullscreen])
    Initialize the Pyxel application with screen size (width, height). The maximum width and height of the screen is 256
    It is also possible to specify the window title with caption, the display magnification with scale, the palette color with palette, the frame rate with fps, the key to quit the application with quit_key, and whether to start in full screen with fullscreen. palette is specified as a list of 16 elements of 24 bit color.
    e.g. pyxel.init(160, 120, caption="Pyxel with PICO-8 palette", palette=[0x000000, 0x1D2B53, 0x7E2553, 0x008751, 0xAB5236, 0x5F574F, 0xC2C3C7, 0xFFF1E8, 0xFF004D, 0xFFA300, 0xFFEC27, 0x00E436, 0x29ADFF, 0x83769C, 0xFF77A8, 0xFFCCAA], quit_key=pyxel.KEY_NONE, fullscreen=True)

  • run(update, draw)
    Start the Pyxel application and call update function for frame update and draw function for drawing

  • quit()
    Quit the Pyxel application at the end of the current frame

  • flip()
    Force drawing the screen (do not use in normal applications)

  • show()
    Draw the screen and wait forever (do not use in normal applications)

Resource

  • save(filename)
    Save the resource file (.pyxres) to the directory of the execution script

  • load(filename, [image], [tilemap], [sound], [music])
    Read the resource file (.pyxres) from the directory of the execution script. If False is specified for the resource type (image/tilemap/sound/music), the resource will not be loaded.

Input

  • mouse_x, mouse_y
    The current position of the mouse cursor

  • mouse_wheel
    The current value of the mouse wheel

  • btn(key)
    Return True if key is pressed, otherwise return False (key definition list)

  • btnp(key, [hold], [period])
    Return True if key is pressed at that frame, otherwise return False. When hold and period are specified, True will be returned at the period frame interval when the key is held down for more than hold frames

  • btnr(key)
    Return True if key is released at that frame, otherwise return False

  • mouse(visible)
    If visible is True, show the mouse cursor. If False, hide it. Even if the mouse cursor is not displayed, its position is updated.

Graphics

  • image(img, [system])
    Operate the image bank img(0-2) (see the Image class). If system is True, the image bank for system can be accessed. 3 is for the font and resource editor. 4 is for the display screen
    e.g. pyxel.image(0).load(0, 0, "title.png")

  • tilemap(tm)
    Operate the tilemap tm(0-7) (see the Tilemap class)

  • clip(x, y, w, h)
    Set the drawing area of the screen from (x, y) to width w and height h. Reset the drawing area to full screen with clip()

  • pal(col1, col2)
    Replace color col1 with col2 at drawing. pal() to reset to the initial palette

  • cls(col)
    Clear screen with color col

  • pget(x, y)
    Get the color of the pixel at (x, y)

  • pset(x, y, col)
    Draw a pixel of color col at (x, y)

  • line(x1, y1, x2, y2, col)
    Draw a line of color col from (x1, y1) to (x2, y2)

  • rect(x, y, w, h, col)
    Draw a rectangle of width w, height h and color col from (x, y)

  • rectb(x, y, w, h, col)
    Draw the outline of a rectangle of width w, height h and color col from (x, y)

  • circ(x, y, r, col)
    Draw a circle of radius r and color col at (x, y)

  • circb(x, y, r, col)
    Draw the outline of a circle of radius r and color col at (x, y)

  • tri(x1, y1, x2, y2, x3, y3, col)
    Draw a triangle with vertices (x1, y1), (x2, y2), (x3, y3) and color col

  • trib(x1, y1, x2, y2, x3, y3, col)
    Draw the outline of a triangle with vertices (x1, y1), (x2, y2), (x3, y3) and color col

  • blt(x, y, img, u, v, w, h, [colkey])
    Copy the region of size (w, h) from (u, v) of the image bank img(0-2) to (x, y). If negative value is set for w and/or h, it will reverse horizontally and/or vertically. If colkey is specified, treated as transparent color

  • bltm(x, y, tm, u, v, w, h, [colkey])
    Draw the tilemap tm(0-7) to (x, y) according to the tile information of size (w, h) from (u, v). If colkey is specified, treated as transparent color. A tile of the tilemap is drawn with a size of 8x8, and if the tile number is 0, indicates the region (0, 0)-(7, 7) of the image bank, if 1, indicates (8, 0)-(15, 0)

  • text(x, y, s, col)
    Draw a string s of color col at (x, y)

Audio

  • sound(snd, [system])
    Operate the sound snd(0-63) (see the Sound class). If system is True, the sound 64 for system can be accessed
    e.g. pyxel.sound(0).speed = 60

  • music(msc)
    Operate the music msc(0-7) (see the Music class)

  • play_pos(ch)
    Get the sound playback position of channel ch. The 100's and 1000's indicate the sound number and the 1's and 10's indicate the note number. When playback is stopped, return -1

  • play(ch, snd, loop=False)
    Play the sound snd(0-63) on channel ch(0-3). Play in order when snd is a list

  • playm(msc, loop=False)
    Play the music msc(0-7)

  • stop([ch])
    Stop playback of all channels. If ch(0-3) is specified, stop the corresponding channel only

Image Class

  • width, height
    The width and height of the image

  • data
    The data of the image (256x256 two-dimentional list)

  • get(x, y)
    Retrieve the data of the image at (x, y)

  • set(x, y, data)
    Set the data of the image at (x, y) by a value or a list of strings
    e.g. pyxel.image(0).set(10, 10, ["1234", "5678", "9abc", "defg"])

  • load(x, y, filename)
    Read the png image from the directory of the execution script at (x, y)

  • copy(x, y, img, u, v, w, h)
    Copy the region of size (w, h) from (u, v) of the image bank img(0-2) to (x, y)

Tilemap Class

  • width, height
    The width and height of the tilemap

  • data
    The data of the tilemap (256x256 two-dimentional list)

  • refimg
    The image bank referenced by the tilemap

  • get(x, y)
    Retrieve the data of the tilemap at (x, y)

  • set(x, y, data)
    Set the data of the tilemap at (x, y) by a value or a list of strings.
    e.g. pyxel.tilemap(0).set(0, 0, ["000102", "202122", "a0a1a2", "b0b1b2"])

  • copy(x, y, tm, u, v, w, h)
    Copy the region of size (w, h) from (u, v) of the tilemap tm(0-7) to (x, y)

Sound Class

  • note
    List of note(0-127) (33 = 'A2' = 440Hz)

  • tone
    List of tone(0:Triangle / 1:Square / 2:Pulse / 3:Noise)

  • volume
    List of volume(0-7)

  • effect
    List of effects(0:None / 1:Slide / 2:Vibrato / 3:FadeOut)

  • speed
    The length of one note(120 = 1 second per tone)

  • set(note, tone, volume, effect, speed)
    Set a note, tone, volume, and effect with a string. If the tone, volume, and effect length are shorter than the note, it is repeated from the beginning

  • set_note(note)
    Set the note with a string made of 'CDEFGAB'+'#-'+'0123' or 'R'. Case-insensitive and whitespace is ignored
    e.g. pyxel.sound(0).set_note("G2B-2D3R RF3F3F3")

  • set_tone(tone)
    Set the tone with a string made of 'TSPN'. Case-insensitive and whitespace is ignored
    e.g. pyxel.sound(0).set_tone("TTSS PPPN")

  • set_volume(volume)
    Set the volume with a string made of '01234567'. Case-insensitive and whitespace is ignored
    e.g. pyxel.sound(0).set_volume("7777 7531")

  • set_effect(effect)
    Set the effect with a string made of 'NSVF'. Case-insensitive and whitespace is ignored
    e.g. pyxel.sound(0).set_effect("NFNF NVVS")

Music Class

  • ch0
    List of sound(0-63) play on channel 0. If an empty list is specified, the channel is not used for playback

  • ch1
    List of sound(0-63) play on channel 1. If an empty list is specified, the channel is not used for playback

  • ch2
    List of sound(0-63) play on channel 2. If an empty list is specified, the channel is not used for playback

  • ch3
    List of sound(0-63) play on channel 3. If an empty list is specified, the channel is not used for playback

  • set(ch0, ch1, ch2, ch3)
    Set the list of sound(0-63) of all channels. If an empty list is specified, that channel is not used for playback
    e.g. pyxel.music(0).set([0, 1], [2, 3], [4], [])

  • set_ch0(data)
    Set the list of sound(0-63) of channel 0

  • set_ch1(data)
    Set the list of sound(0-63) of channel 1

  • set_ch2(data)
    Set the list of sound(0-63) of channel 2

  • set_ch3(data)
    Set the list of sound(0-63) of channel 3

How to Contribute

Submitting an issue

Use the issue tracker to submit bug reports and feature/enhancement requests. Before submitting a new issue, search the issue tracker to ensure that there is no similar open issue.

When submitting a report, select the appropriate template from this link.

Manual testing

Anyone manually testing the code and reporting bugs or suggestions for enhancements in the issue tracker are very welcome!

Submitting a pull request

Patches/fixes are accepted in form of pull requests (PRs). Make sure the issue the pull request addresses is open in the issue tracker.

Submitted pull request is deemed to have agreed to publish under MIT license.

Other Information

License

Pyxel is under MIT license. It can be reused within proprietary software provided that all copies of the licensed software include a copy of the MIT License terms and the copyright notice.

Pyxel uses the following software:

Issues
  • Pyxel's text(x, y, string, color) function silently fails to print text to the screen.

    Pyxel's text(x, y, string, color) function silently fails to print text to the screen.

    On my Debian buster machine I added a single call to Pyxel's text() function to the introductory example code in the README:

    import pyxel
    
    pyxel.init(160, 120)
    
    def update():
        if pyxel.btnp(pyxel.KEY_Q):
            pyxel.quit()
    
    def draw():
        pyxel.cls(0)
        pyxel.rect(10, 10, 20, 20, 11)
        pyxel.text(10, 10, "This is a sentence.", 11)
    
    pyxel.run(update, draw)
    

    and ran it, resulting in the following screenshot, which has the specified rectangle but the text is nowhere to be found:

    2018-08-03-120320_1600x900_scrot

    All apt packages installed successfully as required in the README:

    Reading package lists...
    Building dependency tree...
    Reading state information...
    libasound2-dev is already the newest version (1.1.6-1).
    libglfw3 is already the newest version (3.2.1-1).
    libportaudio2 is already the newest version (19.6.0-1).
    python3-pip is already the newest version (9.0.1-2.3).
    python3 is already the newest version (3.6.6-1).
    0 upgraded, 0 newly installed, 0 to remove and 908 not upgraded.
    

    and pip3 also had no errors installing required packages:

    Collecting pyxel
      Using cached https://files.pythonhosted.org/packages/3d/2f/25879681cf00bc1d607322b4c59a3cfd768fa9b092910fde72194332ed34/pyxel-0.7.4-py3-none-any.whl
    Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from pyxel)
    Collecting PyOpenGL (from pyxel)
    Collecting sounddevice (from pyxel)
      Using cached https://files.pythonhosted.org/packages/fb/5d/0e6cf5ce99b99e76a24b573b94f9009d9d2f5cd13a73825d7e681c9a7a96/sounddevice-0.3.11-py2.py3-none-any.whl
    Requirement already satisfied: Pillow in /usr/lib/python3/dist-packages (from pyxel)
    Collecting glfw (from pyxel)
    Collecting CFFI>=1.0 (from sounddevice->pyxel)
      Using cached https://files.pythonhosted.org/packages/6d/c0/47db8f624f3e4e2f3f27be03a93379d1ba16a1450a7b1aacfa0366e2c0dd/cffi-1.11.5-cp36-cp36m-manylinux1_x86_64.whl
    Collecting pycparser (from CFFI>=1.0->sounddevice->pyxel)
    Installing collected packages: PyOpenGL, pycparser, CFFI, sounddevice, glfw, pyxel
    Successfully installed CFFI-1.11.5 PyOpenGL-3.1.0 glfw-1.7.0 pycparser-2.18 pyxel-0.7.4 sounddevice-0.3.11
    

    OS info is as follows:

    PRETTY_NAME="Debian GNU/Linux buster/sid"
    NAME="Debian GNU/Linux"
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"
    

    I gave the text() function a look in the codebase but nothing stuck out at me as a potential issue, and no errors are printed to stdout/stderr when I run the above program.

    bug 
    opened by mattjquinn 23
  • Please help with translating READMEs for Pyxel 1.5.0

    Please help with translating READMEs for Pyxel 1.5.0

    Hi all,

    I released Pyxel 1.5.0 but its READMEs are not translated perfectly and some parts are written in English. It would be appreciated if some volunteers help with translation.

    Especially volunteer members who translated READMEs before, please consider it. Thank you. @YifangSun @humrochagf @gamwe6 @grewn0uille @Nadpher @dora-0 @KoschenkoVlad @Koshchanka

    help wanted 
    opened by kitao 23
  • Installation instructions for Debian do not work

    Installation instructions for Debian do not work

    Not sure about the causes, but following the installation instructions for Debian do not lead to a working installation. The glfw Python module is not able to find the library that is installed via apt. Failing with "failed to load glfw3 shared library". Compiling and installing the GLFW library from source solves this. Of course this is a bug in the glfw wrapper and not in pyxel, but it leads to instructions that do not work.

    help wanted 
    opened by doxanthropos 23
  • Pyxel packager with PyInstaller

    Pyxel packager with PyInstaller

    Hi! I would like to make new utility command in Pyxel 1.2.0, which can make a standalone executable file.

    It seems that it can be realized with PyInstaller, but I'm not familiar with it.

    Could you give me some information about how to realize it by using Pyxel 1.1.x which uses SDL2?

    enhancement help wanted 
    opened by kitao 18
  • Exporting your game?

    Exporting your game?

    this could be labeled as an enhancement. I don't see anywhere in the docs that talks about exporting your game and what platforms you can target?

    duplicate enhancement 
    opened by jamesjsewell 18
  • not pixel perfect

    not pixel perfect

    plz see screenshots. this rectb and circb, looks not good. I use win10, python3.6.2, 1920x1080 display resolusion. no change in fullscreen(alt+enter).

    pyxel-180730-233528 pyxel-180730-233740

    help wanted 
    opened by 99p 14
  • I started developing the native version of Pyxel with SDL2. Is there any hints or comments?

    I started developing the native version of Pyxel with SDL2. Is there any hints or comments?

    Hi, everyone.

    The current Pyxel implementation is using OpenGL's point sprite and GLFW for Python. Those libraries are very useful and has great flexibility, but as a result, the overhead of speed comes out, and the operation becomes strange depending on the environment.

    So I started developing the native (maybe c-lang) version of Pyxel graphics/sound engine with SDL2 to get performance improvement and stability, and support for many environments including smartphones.

    But actually I never used SDL2 before and don't know the standard way and folder structure to include native libraries (so) for Python package.

    So please tell me if there's some good python or SDL2 project for reference.

    Comments about the features which should be supported by new native runtime engine are also welcome!

    enhancement help wanted 
    opened by kitao 13
  • PyxelEditor broken ui

    PyxelEditor broken ui

    Here is screenshot:

    obraz EDIT:

    • Desktop: PC: Windows 10 Pro x64 RAM: 8GB GPU: AMD R9 380 4GB PYTHON: 3.6, 3.7.1 GLFW: 1.7.0 PyOpenGL: 3.1.1a1
    bug 
    opened by GitRenhl 13
  • Taking screenshot or recording crashes the game

    Taking screenshot or recording crashes the game

    My Ubuntu is in Portuguese and when I try to take a screenshot or record a gif, the game crashes trying to create a file: File "/home/jean/Documentos/pyxel-debug/lib/python3.6/site-packages/PIL/Image.py", line 1947, in save fp = builtins.open(filename, "w+b") FileNotFoundError: [Errno 2] No such file or directory: '/home/jean/Desktop/pyxel-180731-095749.gif'

    If I create a Desktop folder on my home directory the problem is solved, but I don't that's a good solution. An alternative would be creating a subfolder inside the game's current directory. I would do a pull request, but even that being pretty simple, I think that's more like a design decision, so it's up to you :relaxed:

    opened by JeanAraujo 13
  • Update the translations of the README

    Update the translations of the README

    This is a post for communicating with the translators of the documents.

    opened by kitao 12
  • load custom palette in editor automatically

    load custom palette in editor automatically

    Fixes #315 Rework of #321

    todo:

    • document
    • add constant for pyxpal extension
    opened by merwok 11
  • Please tell me your work with Pyxel

    Please tell me your work with Pyxel

    Hi Pyxel users,

    I would like to create a page that introduces Pyxel user examples like this. So could you tell me your work with Pyxel by replying this issue?

    The information I want is below:

    • Your work's title
    • URL of the work only for those who want to publish
    • Your name
    • Your contact only for those who want to publish (Email address, GitHub account, or Twitter account)
    • Brief description of your work (E.g. side-scrolling platform game)
    • Captured screen GIF

    I look forward to many interesting works!

    help wanted question 
    opened by kitao 29
  • Why don't you try some CI?

    Why don't you try some CI?

    GitHub has the ability of having CI (Continous Integration) to run things on each commit. It can be also useful for checking PRs, running linters, etc. A good start would be GitHub Actions, but you can try other things.

    If you like the idea, and would need help, please ping me.

    enhancement help wanted 
    opened by DiddiLeija 10
  • Any tips on compiling Pyxel's Rust codebase into web assembly?

    Any tips on compiling Pyxel's Rust codebase into web assembly?

    I don't have much experience with compiling Rust projects but I have learnt about Pyodide it allows running Python code in your browser & powers sites like Iodide.

    Pyodide is Python compiled into Web Assembly (a fast, low-level language that runs in the browser). With Pyodide a user can edit & run Python (with pip installed modules) in their browser instantly.

    I tried this with Pyxel but Emscripten (the platform for web assembly) isn't supported.

    By compiling Pyxel's Rust library info web assembly, Pyxel games would be runnable & editable all in the browser!

    I think that could create an awesome site for people to make & share games, (like PICO-8 but with the much more powerful Python language & live editing the game's code in the browser).


    My question is... does anyone have some tips for adding Emscripten support?

    I've done a bit of work on converting pyxel to a Pyodide package (tutorial) but I'm still learning the basics of Rust builds.

    enhancement help wanted 
    opened by Fraser-Greenlee 0
  • What educational institutions are using Pyxel?

    What educational institutions are using Pyxel?

    Hi, Pyxel users. Thank you for enjoying Pyxel. Let me ask you one question.

    From time to time, I get reports that Pyxel is used in school and cram school classes, so I would like to know exactly what kind of place and grade it is actually used in. If you don't mind, could you please tell me the school name and country, (and if possible, the content of the lesson) by replying to this issue?

    [Japanese] 時折Pyxelを学校や塾の授業で活用していると教えていただくのですが、実際にどんな場所や学年で使われているか知りたく思っております。差し支えなければ、教育機関名・国(さらに可能であれば簡単な授業内容)について、本Issueに返信する形で教えていただけないでしょうか。日本語でも結構です。よろしくお願いします!

    help wanted question 
    opened by kitao 8
  • Support custom palette in editor and resource files

    Support custom palette in editor and resource files

    Is your feature request related to a problem? Please describe. We can run a pyxel game with a custom palette, but we can’t use it in the editor.

    Describe the solution you'd like Idea 1: add a command-line parameter to the editor like --palette 1a1c2c,5d275d,b13e53,ef7d57 This could be a little unconvenient to use though.

    Idea 2: add a param like --palette path/to/file that reads the palette from a file. Could use a text file format (lospec for example has multiple text formats for each palette) for easy parsing, or a PNG file with 1px per colour but that would require PIL or pypng to analyse. I have a clone of the repo and added this option for my own usage, so I can send a PR.

    Idea 3: update resource file format to store palette in the resource file. Load automatically when opening a resource file with a custom palette. To save a custom palette, either keep it a secret feature (people have to add palette file to the zip) or add a palette tool in editor. I probably can’t make a PR for this, and you’re doing the rust rewrite so probably better to wait for that.

    Describe alternatives you've considered See above

    Additional context

    enhancement 
    opened by merwok 3
  • I want to set the playback position of the music

    I want to set the playback position of the music

    Is your feature request related to a problem? Please describe. I'm currently making a composition tool with Pyxel. So I noticed that the playback position of the music can be obtained by API, but the playback position cannot be set. It's inefficient because the user playing the song from the beginning every time when preview of music. I think this problem is the same when writing songs with the official pyxel editor.

    Even now, it's possible for Pyxel users to generate and play their own dedicated music each time to specify the playback start position, but the loop of the song complicates the problem. Even if you start playing from the middle of the song, you may want to return to the beginning of the song when the song is over. In that case, you have to make music that is packed with sounds endlessly without using loops. But it's not elegant.

    Describe the solution you'd like I'd be happy if I could specify playing position of the music :) (In units of sound and notes(tick)) Ex.)

    • set_play_pos(ch, pos)
    • playm(msc, loop=False, play_pos=0)
    enhancement 
    opened by doc1oo 0
Releases(v1.6.5)
Owner
Takashi Kitao
Takashi Kitao
Blender Game Engine Game Type Templates Logic Bricks (and Python script) based Game Templates for Blender

Blender-Game-Engine-Templates Blender Game Engine Game Type Templates Logic Bric

null 2 Jan 8, 2022
learn and have fun developing 2D retro games using python and pygame

Retro 2D Game Development Using Python + PyGame Skill up your programming skills with a walk down the memory lane. Learn how to create a retro 2D game

Marvin Trilles 0 Aug 15, 2021
Mandaw 2 Jan 7, 2022
Lint game data metafiles against GTA5.xsd for Rockstar's game engine (RAGE)

rage-lint Lint RAGE (only GTA5 at the moment) meta/XML files for validity based off of the GTA5.xsd generated from game code. This script accepts a se

GoatGeek 9 Dec 13, 2021
Minecraft clone using Python Ursina game engine!

Minecraft clone using Python Ursina game engine!

Taehee Lee 27 Nov 21, 2021
An easy to use game engine/framework for python.

A game engine powered by python and panda3d.

Petter Amland 1.2k Jan 12, 2022
A python game engine.

PursuedPyBear, also known as ppb, exists to be an educational resource. Most obviously used to teach computer science, it can be a useful tool for any topic that a simulation can be helpful.

PPB 205 Dec 31, 2021
A Game Engine Made in Python with the Pygame Module

MandawEngine A Game Engine Made in Python with the Pygame Module Discord: https://discord.gg/MPPqj9PNt3 Installation To Get The Latest Version of Mand

Mandaw 9 Oct 26, 2021
Open-source project written in the ursina engine, simulating the popular game Minecraft.

Voxelcraft is an open-source project written in the ursina engine, simulating the popular game Minecraft.

Calinescu Mihai 21 Nov 20, 2021
AXI Combat is a networked multiplayer game built on the AXI Visualizer 3D engine.

AXI_Combat AXI Combat is a networked multiplayer game built on the AXI Visualizer 3D engine. https://axi.x10.mx/Combat AXI Combat is released under th

. 0 Aug 10, 2021
Average Clicker Game (AVG) is a Python made game using tkinter

Average-Clicker-Game Average Clicker Game (AVG) is a Python clicker game not made with pygame but with tkinter, it has worker, worker upgrades, times

Zacky2613 1 Dec 21, 2021
Ice-Walker-Game - This repository is about the Ice Walker game made in Python.

Ice-Walker-Game Ce dépot contient le jeu Ice Walker programmé en Python. Les différentes grilles du jeu sont contenues dans le sous-dossier datas. Vou

Mohamed Amine SABIL 1 Jan 2, 2022
Snake game mixed with Conway's Game of Life

SnakeOfLife Snake game mixed with Conway's Game of Life The rules are the same than a normal snake game but you have to avoid cells created by Conway'

Aidan 4 Jun 4, 2021
HTTP API for FGO game data. Transform the raw game data into something a bit more manageable.

FGO game data API HTTP API for FGO game data. Transform the raw game data into something a bit more manageable. View the API documentation here: https

Atlas Academy 33 Jan 6, 2022
A near-exact clone of google chrome's no internet game, or the "google dinosaur game", with some additions and extras.

dinoGame A near-exact clone of google chrome's no internet game, or the "google dinosaur game", with some additions and extras. Installation Download

null 1 Oct 26, 2021
Quantum version of the classical Nim game. An automatic opponent allows to game to not be as easy as it seems.

Nim game Running the game To run the program just launch : python3 game.py Rules This game is inspiring from the Nim game. You are 2 players face to f

Michaël 1 Jan 8, 2022
Deal Or No Deal was a very popular game show. Even now, for a family party, it's a fun game to pass time

Deal Or No Deal was a very popular game show. Even now, for a family party, it's a fun game to pass time. I made a code to play the game right in your terminal/console. This isn't made to be a game which can be installed by everyone and played, I just made it as a fun project as I just started out with python. So if you have python installed and wanna have some fun, or just curious to see how I did this, feel free to check the code out!

null 1 Jan 3, 2022
Mastermind-Game - A game to test programming and logical skills

Bem vindo ao jogo Mastermind! O jogo consiste em adivinhar uma senha que será ge

Marcelo Daros 1 Jan 6, 2022
Quiz Game: answering questions naturally with a friendly UI to enjoy the game

About Quiz Game : The Game is about answering questions naturally with a friendl

null 3 Jan 10, 2022