AI Briefing
KO

Looking Back at Banksalad at PyCon KR 2019

·2019.08.26 09:00

Key point

Banksalad ran an interactive game event at PyCon KR 2019 using Pyxel, a Python-based open source game engine.

Details

Banksalad participated as a keystone sponsor at PyCon KR 2019, with 4 engineers taking the stage as speakers. Unlike last year's online event, this year they ran interactive games called Pythonic Adventure and Challenge at an offline booth, receiving a great response from visitors.

Game Development Based on Pyxel

For the game engine, they adopted Pyxel, a Python-based open source engine. Pyxel has the advantage of being easy to create simple pixel games with and having a low learning curve, allowing development directly in the Python language. It was implemented with a structure where frame updates are handled in the update function and screen rendering is handled in the draw function, and image sprites are drawn at specific positions and sizes via the pyxel.blt API.

In terms of resource handling, instead of regular audio files, they used a string-based notation to define sounds, and utilized pyxel_music_tool to convert musical notes. Additionally, tilemaps were used by converting .png files into the .pyxres format.

Game Mechanics Utilizing Python Principles

The game works by filling in blanks to complete code, which then attacks monsters. Adventure was set for beginners and Challenge for advanced users in terms of difficulty, and problems were designed that could only be solved by understanding Python's internal operating principles.

  • Floating-point arithmetic: Using the IEEE 754 standard characteristic where the result of 0.1 + 0.1 + 0.1 becomes 0.30000000000000004, a problem was presented that calculates maximum damage (4 ** 19) via len(str(...)).
  • Base conversion: Through a problem that generates a large value such as decimal 65793 using the second argument (base) like int('10101', 16), the principle of base conversion was tested.
  • Truth-value Testing: A problem was presented that calculates maximum damage using Python's truth-value testing characteristic, where built-in functions such as len and dir evaluate to True.
  • List Comprehension: Through a problem like sum([int(i == i) for i in range(10, 90)]) that combines list comprehension and logical operators to maximize the value of True, participants were guided to understand Python's order of evaluation.

Banksalad designed these problems so that participants could enjoyably learn Python's detailed operating mechanisms and library usage, and apologized for the long waiting lines caused by a larger crowd than expected.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.