Difference between revisions of "Python"

From RogueBasin
Jump to navigation Jump to search
m
(updated list of defunct games and dead/outdated python resources)
Line 2: Line 2:
|company = Python Software Foundation
|company = Python Software Foundation
|influences = ABC programming language  
|influences = ABC programming language  
|updated = Sept 29 2012 (3.3.0) and April 9, 2012 (2.7.3)
|updated = Feb 25 2015 (3.4.0) and May 23 2015 (2.7.10)
|status = Stable
|status = Stable
|licensing = Open Source (Python 3.3.0 license)
|licensing = Open Source (Python 3.3.0 license)
Line 18: Line 18:
== Roguelike Specific Details ==
== 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 such as Psyco, 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 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'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 ==
== Python-Specific Articles on RogueBasin ==
Line 28: Line 28:
* [[Permissive Field of View in Python]] - An implementation of the [[Precise_Permissive_Field_of_View|precise Permissive Field of View]] algorithm in Python.
* [[Permissive Field of View in Python]] - An implementation of the [[Precise_Permissive_Field_of_View|precise Permissive Field of View]] algorithm in Python.
* [[Dungeon builder written in Python]] - A dungeon builder.
* [[Dungeon builder written in Python]] - A dungeon builder.
* [[A simple turn scheduling system -- Python implementation]] - A simple time system for rouguelikes.
* [[A simple turn scheduling system -- Python implementation]] - A simple time system for Roguelikes.


== Related links ==
== Related links ==
Line 34: Line 34:
* [http://python.org Official Python website]
* [http://python.org Official Python website]
* [http://www.python.org/doc/faq/ Official Python FAQs]
* [http://www.python.org/doc/faq/ Official Python FAQs]
 
* [https://bitbucket.org/libtcod/libtcod 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.
* [http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses Curses at pythonlibs], unofficial curses module implementation for Windows Python, based on PDCurses. Differs from UniCurses above in that UniCurses is a different module, whereas this fixes the feature outage found in a default Python windows install. Has 32b and 64b binaries available for 2.x and 3.x. Tiny and easy to install. Better alternative to WCurses (below). Python 3.3 will most [http://bugs.python.org/issue2889 probably] have this implementation installed by default, so all of these problems will go away :)
* [http://sourceforge.net/apps/wordpress/pyunicurses/ UniCurses for Python], a Python wrapper module that provides consistent [[Curses]] functionality on all platforms including Microsoft Windows (by wrapping PDCurses), Linux and Mac OS X (by wrapping the original "curses" module). It supports both Python 2 and Python 3, starting with version 2.6.1.
* [http://code.google.com/p/wcurses/ WCurses], a Python module implementing a substantial subset of the [[Curses]] interface under Windows. You'll have to compile it yourself as adamv no longer issues binaries. Python includes Curses support by default for other OS's.
 
* [http://doryen.eptalys.net/libtcod/ Doryen Library], 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.
* [http://psyco.sourceforge.net/ Psyco], the specializing compiler for Python.  Improves performance 2 to 100 times (usually about 4 times), and requires little more from the programmer than to import the module and execute <tt>psyco.full()</tt>.
* [http://www.py2exe.org/ 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.
* [http://www.py2exe.org/ 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.
* [http://www.pyinstaller.org/ PyInstaller] is a program that converts (packages) Python programs into stand-alone executables, under Windows, Linux, and Mac OS X.
* [https://github.com/pyinstaller/pyinstaller/wiki PyInstaller] is a program that converts (packages) Python programs into stand-alone executables, under Windows, Linux, and Mac OS X.
* [http://www.pygame.org Pygame], [[Pygame]] is an SDL wrapper for Python that has been used for many graphical and non-graphical Roguelikes.
* [http://www.pygame.org/news.html Pygame] ([[Pygame]]) is an SDL wrapper for Python that has been used for many graphical and non-graphical Roguelikes.
:* A newer version, [[pgreloaded]], can be found [https://code.google.com/p/pgreloaded/ here]
* [http://www.barricane.com/2009/08/07/python-with-curses-with-with_curses.html with_curses], just a tiny bit of help for Linux/Unix roguelikes.


== Roguelike games in Python ==
== Roguelike games in Python ==
Line 51: Line 43:
!style="width:15%;"|Status || Name
!style="width:15%;"|Status || Name
|-
|-
| {{beta}} ||  [[Artisan]]
| {{defunct}} ||  [[Artisan]]
|-
|-
| {{alpha}} ||  [[CrashRun]]
| {{alpha}} ||  [[CrashRun]]
Line 67: Line 59:
| {{defunct}} ||  [[I, Monster]]
| {{defunct}} ||  [[I, Monster]]
|-
|-
| {{alpha}} ||  [[Lands of Elderlore]]
| {{defunct}} ||  [[Lands of Elderlore]]
|-
|-
| {{beta}} ||  [[Mines of Elderlore]]
| {{beta}} ||  [[Mines of Elderlore]]
|-
|-
| {{beta}} ||  [[Netpack]]
| {{defunct}} ||  [[Netpack]]
|-
|-
| {{7DRL}} || [[Nightmare Tyrant]]
| {{7DRL}} || [[Nightmare Tyrant]]
Line 77: Line 69:
| {{beta}} ||  [[Nyctos]]
| {{beta}} ||  [[Nyctos]]
|-
|-
| {{alpha}} ||  [[Pyro]]
| {{defunct}} ||  [[Pyro]]
|-
|-
| {{alpha}} ||  [[Roguelike me]]
| {{alpha}} ||  [[Roguelike me]]
|-
|-
| {{alpha}} ||  [[Shuruppak]]
| {{defunct}} ||  [[Shuruppak]]
|-
|-
| {{7DRL}} ||  [[Swamp Monster]]
| {{7DRL}} ||  [[Swamp Monster]]
|-
| {{beta}} ||  [[Test Adventure]]
|-
|-
| {{beta}} ||  [[The Temple of Torment]]
| {{beta}} ||  [[The Temple of Torment]]
Line 93: Line 83:
| {{7DRL}} ||  [[TrapRL]]
| {{7DRL}} ||  [[TrapRL]]
|-
|-
| {{alpha}} ||  [[Ultima Ratio Regum]]
| {{beta}} ||  [[Ultima Ratio Regum]]
|-
|-
| {{alpha}} ||  [[Wa]]
| {{defunct}} ||  [[Wa]]
|-
|-
| {{7DRL}} ||  [[Whispers in the Void]]
| {{7DRL}} ||  [[Whispers in the Void]]

Revision as of 04:29, 30 July 2015

Python
Programming Language
Company Python Software Foundation
Influences ABC programming language
Updated Feb 25 2015 (3.4.0) and May 23 2015 (2.7.10)
Status Stable
Licensing Open Source (Python 3.3.0 license)
Platforms Linux, Unix, Mac OS X, Windows and others.
Official site of 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

Related links

  • 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.
  • 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

Status Name
defunct Artisan
αlpha CrashRun
αlpha CyberRogue
7DRL Cypress Tree Manor
7DRL Fist of the Rogue Warrior
αlpha Herculeum
αlpha Ighalsk
defunct I, Monster
defunct Lands of Elderlore
βeta Mines of Elderlore
defunct Netpack
7DRL Nightmare Tyrant
βeta Nyctos
defunct Pyro
αlpha Roguelike me
defunct Shuruppak
7DRL Swamp Monster
βeta The Temple of Torment
αlpha Torchlit
7DRL TrapRL
βeta Ultima Ratio Regum
defunct Wa
7DRL Whispers in the Void
7DRL Z-Day