You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
QWPython is a Python-powered QuakeWorld dedicated server in which the QuakeC interpreter has been removed, and Pythonused in its place to execute game logic.
Python game logic can be generated by an included QuakeC -> Python translator.
Runs on:
OSX (tested on 64-bit Yosemite 10.10.3 with Python 2.7.6)
FreeBSD (tested on 64-bit 9.3 with Python 2.7.9)
Version 1.0 ran on:
Windows (tested on 32-bit NT 4.0 and 2000 with Python 2.0 back in 2001)
Requirements:
Python 2.7 or higher
Quake/QuakeWorld .PAK files
File Placement
QWPython should work out-of-the-box if you place its files relative to your Quake installationlike this:
If you don't use this particular placement, you'll have to edit thedeathmatch.py and/orctf.py files to looksomewhere else for the game's .pak files.
Building the native code
(Unix users need to follow this step. Windows distributions containpre-built binaries allowing you to skip this, but if you have VisualC++you can follow this step also to build your own binary.)
Change to the qwpython directory and run this command:
python setup.py install --install-lib .
This will compile the native-code part of QWPython (the actual QuakeWorld engine), and a couple supporting modules, andplace the resulting package, named 'qwpython', in the current directory. So you should end up with something like:
You may remove the 'build' directory after this is finished.
Running a Game
QWPython comes with pre-translated versions of Deathmatch and CTF, which can be found in thepy_dm andpy_ctfdirectories. If you want to translate your own QC code, be sure to read the translator notes indocs\translate.html.
You might want to use a standard QuakeWorldserver.cfg file (usuallyin the same place as your .PAK files), that looks something like:
Although it should still work without one. From inside the QWPython directory,run this command:
python deathmatch.py
and you're in business. You should also be able to use the normal QWcommand line parameters, such as:+map dm1
Currently QWPython doesn't handle keyboard input to the console, so tostop it you'll either have to use the 'kill' command on Unix, or justclose the window under Windows, or use the QuakeWorld 'rcon' command fromwithin a connected QW client console (as in:rcon mypass quit).
Running as a WinNT/Win2k Service
The file ctf_service.py is an example of running a QWPython game as aservice. To install and run, use the commands:
python ctf_service.py install net start ctfpython
To stop and remove the service, try:
net stop ctfpython python ctf_service.py remove
You can also control the service through the Windows service controlpanel. Adapting this to other games besides CTF should be easy - nothingin the game itself changes, only the ctf_service.py has anything specificto Windows services in it.
About
QuakeWorld dedicated server wrapped up as a Python module, QuakeC -> Python game translator