Location: / Portal / Index Language: en

Portal Gun Mod

Portal Gun is a modification for iD’s Quake game. It appends the device, that creates inter-spatial wormhole between two gates. This is official web page of the project. You can also find some information at http://www.moddb.com/mods/quake-portal-gun

General description

Type of mod:
Quake C yes
Sound yes
Models yes

Format of QuakeC:

qc files yes
progs.dat yes

How to install

Easily. Just download the portal_gun package, enter your quake directory and extract it. Then you can run:
$ quake -game portal_gun
For demonstration, toggle console and type 'playdemo portal'.


Portal Gun (Handheld Portal Device) is a device that creates and inter-spatial portal (wormhole) in level. It is quaked version of the gun from game Portal (part of Orange box) by Valve software http://www.valvesoftware.com also implemented in some half-life games. Ussage is simple: fire with the portal gun to the desired locations to opend first and second portals. Now, the wormhole is created between them. You can enter it, or close it down.

This mod tries to simulate (poorly) the physic as seen in original Portal game. That means, when you enter the first portal, your velocity and angles is restored on the other side of wormhole. This allows you to do big jumps and other tricks (see fig. 1).

Teleporting of pickups is possible, which allows interesting strategies (like gathering pickups on one place and the pick them all up at once; or reaching distant items just by shooting at them.)

Portal Gun can also be used as item carrier. Simply aim the item and press ‘f’. To drop carried item, press ‘f’ again.

  __      ,.,
 |  |   ,'   ',
-|  |--|-----, ',
 |  | \|/   / | |    Create portals, jump to the lower one (arrow 1)
___________/  | 2      ,.,   and the higher one will shoot you up (arrow 2)
          |   | |    ,'   ',  
          |   | |  O       ', 
          |   | |  |-       |
          |  /'-|--/\-,     |
          | /  (_)   / |    |
          |/________/  |    1
                   |   |    |
                   |   |    |
                   |   |   \|/
                   |  /'----'-- - -
                   | /     (_)
                   |/_________ _ _

Fig. 1 – Example of clever usage of portal gun – power of gravity: (see tricks for more!)

h2.Portal gun modes

Portal gun mod includes two modes: deathmatch and cooperative variant.

NOTE: please make sure, that all portals are closed before changing mode to avoid an unexpected behavior.

Why I started this project

Answer is simple. My computer was too slow for running the original Valve’s Portal game, but I love YouTube videos and generally – the gameplay. The first version of portal mod by Lag.Com was designed for making incredible fast speed demos (see http://speeddemosarchive.comSDA; great site!). My mod was made independently and each mod had pros and cons (thanks for Mark Ehlke for summary). This mod is v2.0 although there’s no 1.0 and it is fusion of two independently made portal gun mods. While is it aimed for original engine it could be theoreticaly on many platforms like dos, linux or mac.


Note, that the mod is still in development phase. This is my very fist quake mod, so I would like to ask anybody for helping me with models, levels and other things from TODO section. The mod is released under the link:{dir}/copying.html[GNU/GPL licence].


See Changelog file.


command effect
impulse 99 use Portal Gun
impulse 98 close portals down
impulse 97 toggle deathmatch/cooperative mode
impulse 96 fire blue portal
impulse 95 fire red portal
impulse 94 use item carrier

Portal Gun mod should contain autoexec.cfg file, where he keybindings are set.

Controls defined in autoexec.cfg:
 [Q][W][E][R] ... [P]

P - use Portal Gun
R - close portals
Q - fire blue portal
E - fire red portal
F - use item carrier
'portal_mode' - toggle deathmatch/cooperative mode

Things to improve / bugs

No program is bugless and many things could be added. Here’s the list:


People from http://www.inside3d.com, Mark Ehlke for testing and ideas, Lag.Com for sending his source code.