Release notes of the Online Pokitto Python Editor

Here will be the release notes of each version of the Online Pokitto Python Editor at http://pyinsky.herokuapp.com

1 Like

The online Pokitto Python Editor release, v0.3, 26-March-2019

  • Sound effect support added

    • Audio files can be added by just dragging and dropping an audio file to the code editor (!)
    • Playing is very simple too. There is a new example “Sound Effect” to show that.
    • Note that the Pokitto emulator cannot play audio. You must have a real Pokitto HW to be able to hear the audio.
  • Tilemap class updated

    • Added the get_tile_id() and get_tile_ids() methods for getting the tile you are over. Handy for e.g. making some tiles blocking your way.
    • The “Tilemap” example was updated
  • Fixed: time_us() was renamed to time_ms()

  • Fixed: The “Frambuf” module was obsolete and removed. Remove any “import framebuf” lines from your code.

The Pokitto Python wiki and the reference was updated with the details of these changes.

2 Likes

The online Pokitto Python Editor release, v0.3, 23rd of April, 2019

Find the editor here: https://pyinsky.herokuapp.com/

New features

  • Bitmap mirroring
    You can draw the bitmap mirrored horizontally or vertically, with (practically) no performance penalty. That also saves the ROM memory as you do not have to make bitmaps of these positions. Look at the Surface.blit() method (and other new methods) in the reference: [Wiki] Reference: Pokitto gaming API for Python (uPyGame and umachine)
    Normal:
    image
    Mirrored horizontally:
    image
    Mirrored vertically:
    image

  • Drawing primitives
    There are now basic drawing primitives implemented to the new “draw” module in uPyGame:
    draw.rect(), draw.circle(), draw.line(), draw.pixel(), draw.text(), draw.set_foreground_color(), draw.set_background_color(), draw.set_transparent_color()
    The new example in the online editor demonstrates the usage: “Graphics Primitives”.
    image

  • Music streaming from SD
    This is a new exiting feature! You can put the music files in the SD card and start playing them in your python game :slight_smile: It is still under development in the editor, but the first version can be already used in HW. There is a new method for this purpose: play_from_sd(). The music is mixed with the sound effects, so you can use them simultaneously. The limitation is that it is working only in HW, but you can still make a rom image with the online editor. The music files should be in raw, mono, 8-bit, 8 kHz format (e.g. Audacity and probably ffmpeg also can convert to that format).

  • Here is a music streaming example: Music.zip (1.9 KB)
    Make a rom image and flash it to Pokitto. In addition, put these files to the root of your Pokitto’s SD card:
    https://pyinsky.herokuapp.com/intro44.snd
    https://pyinsky.herokuapp.com/scary.snd
    _
    Licensing:
    “scary.snd” by Tyops, https://freesound.org/people/tyops/sounds/393575/ . Licensed under CC-BY 3.0, https://creativecommons.org/licenses/by/3.0/
    “intro44.snd” by Tristan Lohengrin, https://freesound.org/people/Tristan_Lohengrin/sounds/273539/ . Licensed under CC-BY 3.0, https://creativecommons.org/licenses/by/3.0/

7 Likes

The online Pokitto Python Editor release, v0.3, 21st of November, 2019

Build statistics
  • The maximal amount of free ram: 20272 bytes
  • The minimal rom image size: 145 kb
  • Measured with this minimal program:
import gc
import upygame
import umachine

upygame.display.init(True)
gc.collect()
umachine.draw_text(5,5,"Free bytes:"+ str(gc.mem_free()), 11)

upygame.display.flip()
upygame.display.flip()

Find the editor here: https://pyinsky.herokuapp.com/

New features

  • The Cookie functions for loading and saving data to EEPROM. With these functions, you can preserve game data, like high scores, so that it can be loaded the next time Pokitto is powered on. A simple example of usage is below.There is a more complex example, “EEPROM”, behind the Python Editor Examples button. That makes possible to save text and integer values to EEPROM. For more detailed information of the functions, look at the reference: [Wiki] Pokitto gaming API for Python, reference (uPyGame and umachine)
# Load and save two bytes (0-255 each) to EEPROM

# Create a 2-byte cookie
myCookieData = bytearray(2)
myCookie = umachine.Cookie("Tetrix", myCookieData)

# Save the cookie to EEPROM
myCookieData[0] = score1
myCookieData[1] = score2
myCookie.save()

# Load the cookie from EEPROM
myCookie.load()
score1 = myCookieData[0]
score2 = myCookieData[1]

7 Likes

The online Pokitto Python Editor release, v0.3, 2nd of January, 2020

Find the editor here: https://pyinsky.herokuapp.com/

New feature

  • Internationalization support
    The editor now detects the language used by your browser and changes the UI language accordingly. These are the newly supported languages and their translators:
    – Finnish: @jonne
    – German: @genki
    – Italian: @HomineLudens
    – Portuguese: @FManga
    Thank you @jonne, @genki and @HomineLudens! If anyone else wants to add another language, feel free to use this template.
3 Likes