RogueBasin
Menu (Edit):
Contents:
  1. Python
    1. What is Python?
    2. Roguelike Specific Details
    3. Python-Specific Articles on RogueBasin
      1. General
      2. Field of View and Line of Sight
      3. Pathfinding
      4. Map Generation
      5. Scheduling
      6. Name Generation
    4. Related links
    5. Roguelike games in Python
    6. References

Python


What is Python?


From the official Python FAQ:

“Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Python combines remarkable power with very clear syntax. It has interfaces to many system calls and libraries, as well as to various window systems, and is extensible in C or C++. It is also usable as an extension language for applications that need a programmable interface. Finally, Python is portable: it runs on many Unix variants, on the Mac, and on PCs under MS-DOS, Windows, Windows NT, and OS/2.”

A full set of features can be found here.

Roguelike Specific Details


Python’s expressive code, dynamic typing, flexible data types, and powerful OO and exception handling facilities make it well-suited to quick, productive RL development. However, like all interpreted languages, Python has a reputation for large memory overheads and being slower in some applications when compared to compiled languages such as C++. These problems, however, can be overcome with the extension of third-party Python modules and proper profiling and programming techniques. Another problem is that Python often requires the user to download an interpreter separately. A way to solve that is to include the interpreter in the game download.

Python’s rapid speed of development and human-readable code makes it an excellent choice for programmers wanting to develop a Roguelike in a limited amount of time, making the language ideal for 7DRL Challenges.

Python-Specific Articles on RogueBasin


General

Field of View and Line of Sight

Pathfinding

Map Generation

Scheduling

Name Generation


  • Official Python website
  • Official Python FAQs
  • libtcod is a free, fast, portable and uncomplicated API for roguelike developers providing an advanced true color console emulator, input, and lots of other utilities frequently used in roguelikes.
  • BearLibTerminal is another API for roguelike developers. Unlike libtcod, it provides and API for output only. It is therefore more compact, and is much simpler. Sports binding for C/C++, C#, Ruby, Lua, Python and Pascal.
  • py2exe is a package which converts Python scripts into executable Windows programs, able to run without requiring a Python installation. Since most Windows users will not have Python installed, py2exe is a good way to distribute your Python game to that audience.
  • PyInstaller is a program that converts (packages) Python programs into stand-alone executables, under Windows, Linux, and Mac OS X.
  • Pygame (Pygame) is an SDL wrapper for Python that has been used for many graphical and non-graphical Roguelikes.

Roguelike games in Python


Artisan Armoured Commander CrashRun CyberRogue Cypress Tree Manor Fist of the Rogue Warrior Herculeum Ighalsk I, Monster Lands of Elderlore Mines of Elderlore Netpack Nightmare Tyrant Nyctos Pyro rng clrc Roguelike me Shuruppak SummonerRL Swamp Monster The Temple of Torment Torchlit TrapRL Ultima Ratio Regum Wa Whispers in the Void Z-Day

References


  1. Python downloads, official downloads page with release information.
  2. History and License, detailed license info from the Python documentation.