Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Leges Motus: A 2D zero-gravity shooter
C++ Other
Latest commit a708c11 @greywhind greywhind Corrected positioning of weapons when player image is flipped.
Player must be drawn in a larger region in order to show the whole
weapon graphic, now that placement is corrected. Increased size of
player region.
Failed to load latest commit information.
ai Fixed an AI bug that could cause the AI not to fire, due to
client Added initial firing effects to all guns using new particle system.
common Updated to Box2D v.2.3, improved information about how to build Box2D…
config Add and use new gun info functions to have AI switch guns.
data Corrected positioning of weapons when player image is flipped.
gui Corrected positioning of weapons when player image is flipped.
mac Fold final changes from 0.4.0 into TRUNK
man/man6 Commit missing manpage to trunk
metaserver An early spring breeze
server Added the "PLAYER_TO_SERVER_UPDATE" packet type, allowing asymmetrical
serverscanner An early spring breeze
tests Added several new widgets and tests for them.
thirdparty Add gitignore and SimpleIni files
tools Fix Packet memory leak
.gitignore Modified .gitignore to ignore cscope files that are autogenerated by …
CHANGES Fold final changes from 0.4.0 into TRUNK
COPYING Changed copyright notice in every file, modified add_class_file to pr…
Doxyfile Add Doxygen configuration
Makefile SparseIntersectMap tests
NEW_MAP_FORMAT Initial documentation update for Beta 2. More to come...
README Updated to Box2D v.2.3, improved information about how to build Box2D… Begin using config inis
configure Add LM_CONFIG_DIR define


     __                                     _               
    / /  ___  __ _  ___  ___    /\/\   ___ | |_ _   _ ___   
   / /  / _ \/ _` |/ _ \/ __|  /    \ / _ \| __| | | / __|  
  / /__|  __/ (_| |  __/\__ \ / /\/\ \ (_) | |_| |_| \__ \  
  \____/\___|\__, |\___||___/ \/    \/\___/ \__|\__,_|___/  
             |___/                             v 0.5.0-git  

        Andrew Ayer | Nathan Partlan | Jeffrey Pfau         



Leges Motus is a 2D networked, team-based shooter set in zero gravity.


The objective of the game is to reach the opposing team's gate and stay next to it until it opens fully.

Shoot enemy players to freeze them.  They will un-freeze a number of seconds after they are frozen.

You can move by jumping off of any obstacle, and you will jump in the direction of the mouse pointer.  You will also move due to the recoil from firing your gun.  When frozen, you will bounce off of obstacles.  If you unfreeze away from obstacles, shoot your weapon to move back towards the nearest obstacle.


The Windows verion of Leges Motus is distributed as a binary.  Simply unzip the archive.  Leges Motus has no installer on Windows and simply deleted to remove it.  However, configuration files will be retained in your home directory.


Simply drag the Leges Motus application into the Applications folder to install Leges Motus on Mac OS X.  To install the server, you need to use the bundled Install Command Line Tools script.


Please note that only GNU Make is supported.  If the default 'make' command is not GNU Make, please install and use it where appropriate.  Generally it is called gmake when it is not make.

1. Run './configure' in the top level directory.
   You can also use the --help option to find out all of the supported options for this script.  If you're using a Mac, make sure to specify --disable-bundle for a flat build.
   This script will check to make sure you have the required libraries installed.

2. Run 'make' to build the server and client.

3. Run 'make install' as an administrator to install the server and client.

See "ADVANCED BUILDING" below for more advanced build options.


The following libraries must be installed in order to build the common code for all parts of Leges Motus:

 Box2D 2.3
Compile Box2D 2.3 (you can get it from, and then copy the resulting files:
- libBox2D.a to /usr/local/lib (or another location of your choice - use the LDFLAGS to point to it with -L) and
- all header files to /usr/local/include (or another location of your choice - use the CFLAGS to point to it with -I).

The following libraries must be installed in order to build and run the Leges Motus graphical client:

 FreeType 2
 SDL 1.2
 SDL_image 1.2
 GLEW (Windows only)

The following libraries are bundled with the source and statically linked at compile time:

 SimpleIni 4.13 © 2006-2010, Brodie Thiesfield

All of these are bundled in the Windows and Mac OS X packages, except for OpenGL, which should already be installed on the system.  No additional libraries are needed to build or run the server.

If you do not have SDL_mixer installed and/or you would like to build without sound support, you may pass the --disable-sound option to configure.


By default, Leges Motus expects to find its data in /usr/local/share/games/legesmotus.  This path can be set at compile time by passing a --prefix argument to configure.  The path can be overridden at runtime by setting the $LM_DATA_DIR environment variable to the location containing the data.  The data can be found in the 'data' directory in the top-level source directory.


To run the client, if Leges Motus is in your path, run the 'legesmotus' command.  You can also double click on legesmotus.exe on Windows and the Leges Motus application on Mac, but you cannot specify command line options in this manner.

The client supports the following command-line options:
  -n NAME        set your player name (default: your user name)
  -t red|blue    set your team (default: auto-balanced)
  -s SERVER      set the hostname of the server (default: use the server browser)
  -p PORTNO      set the port number of the server (default: 16877)
  -w WIDTH       set the screen width, in pixels (default: 1024)
  -h HEIGHT      set the screen height, in pixels (default: 768)
  -f             run the game in fullscreen
  -?, --help     display this help, and exit
      --version  display version information and exit


To run the server, run the 'lmserver' command, or double click on lmserver.exe on Windows.

The server supports the following command-line options:
  -c CONFFILE    load server configuration options from the given file (default: no config file)
  -o OPT=VALUE   set the configuration option named OPT to VALUE
  -m MAPNAME     set the map name (default: alpha1)
  -p PORTNO	     set the port number to listen on (default: 16877)
  -P PASSWORD    set the admin password (default: admin mode is disabled)
  -i ADDRESS     address of interface to listen on (default: listen on all interfaces)
  -d             daemonize the server (not on Windows)
  -u USERNAME    drop privileges to given user (only super user may use) (not on Windows)
  -g GROUPNAME   drop privileges to given group (only super user may use) (not on Windows)
  -l             (local server) do not register with the meta server
  -?, --help     display this help, and exit
      --version  display version information and exit

By default, the Leges Motus server will contact the meta server so other players on the Internet can connect to and play on the server.  If you would NOT like your server to appear in server browsers of other Internet users, pass the -l ("local") option to lmserver, or set the server configuration option "register_server" to "no".

If a server is run behind a firewall, and it is registered with the meta server, the metaserver will attempt to traverse the firewall so that clients outside the firewall are able to connect to the server.  However, this technique does not work with all firewalls, and is not 100% reliable.  If you intend to host a long-running server behind a firewall, you are strongly recommended to modify your firewall settings to allow/forward UDP port 16877.


	space        Jump in direction of mouse pointer
	left click   Fire in direction of mouse pointer
	right click  Switch weapons
	1 through 8  Switch weapons (if available)
	t            Open chat
	y            Open team chat
	~            Open chat log
	ESC          Return to main menu / close chat console
	tab          Show the scoreboard


These commands are entered in the client's chat bar:

	/tchat MESSAGE   Send a message to your team
	/name NEWNAME    Change your name
	/team red|blue   Change teams
	/server COMMAND  Send the command to the server (see below for list of server commands)
	/quit            Quit the game
	/legal           Show legal information (copyright and warranty)
	NAME: MESSAGE    Send message to specified player only


These commands are entered in the client's chat bar.  Some commands (marked as [op]) require you to authenticate first with the password specified on the command-line to the server.

	/server auth PASSWORD  Authenticate with given password
	/server teamscore      Return the score for each team
	/server teamcount      Return the number of players on each team
	/server maps           Retrieve a list of maps
	/server balance        Balance the teams [op]
	/server shakeup        Randomly reform the teams [op]
	/server reset          Reset the scores [op]
	/server map MAPNAME    Load the given map [op]
	/server newgame        Start new game [op]
	/server kick PLAYER    Kick a player [op]
	/server shutdown       Shutdown the server [op]
	/server help           Display this help

If no operator password is set, then any player connecting from the localhost ( will be given operator status.  If this is undesirable behavior, then be sure to set an operator password.


Home Page (News, Screenshots, Wiki):
Project Page (Downloads):  
Trac Page (Bugs):          
IRC Channel:                #legesmotus
Subversion Repository:     

For bugs and feature requests, visit Trac.  For immediate help or to try to find a game, stop by our IRC channel.  For documentation, visit the wiki.


The code is divided into separate components, located in the following directories:

	common         Common code for the executables
	client         The common client code
	gui            The graphical client
	server         The server
	serverscanner  A command line tool for scanning a metaserver
	metaserver     The metaserver (running a metaserver is not recommended)
	ai             An experimental AI client

The data for the program are located in the data directory, and the default configuration files are located in the config directory


By default, Leges Motus will install to /usr/local.  You may change this by specifying a --prefix argument to configure.  To install into your home directory, you could use:

	./configure --prefix=$HOME/legesmotus

By default, on Mac OS X, Leges Motus will build a .app bundle, and use frameworks to find the SDL libraries.  Leges Motus will install the bundle to the system-wide /Applications directory.  To enable a traditional, flat build, use:

	./configure --disable-bundle

Note that this requires sdl-config to be installed on your system, which it generally is not unless SDL is installed through a system such as MacPorts.

To disable building a universal binary on Mac OS X, use:

	./configure --disable-universal

To build only the server or client, use one of:

	make server
	make client

To install in a different directory (useful for making packages):

	make install DESTDIR=/path/to/package/root

Note that, by default, the version of Leges Motus that is built on an OS X computer running 10.6 (Snow Leopard) or higher will not work on older versions of Mac OS X. To fix this, you must configure Leges Motus to use an older version of GCC. This can be accomplished by running the configure script with an environment variable set, like so:

	CXX=g++-4.0 ./configure

When built with a configuration like this, it should work on 10.5, and, assuming you have the SDK for 10.4 installed, 10.4 as well.


Original Designers and Programmers:
	Andrew Ayer      Server, networking, support code, map handling
	Nathan Partlan   Game logic, component integration, client design and interface, physics, server scanner
	Jeffrey Pfau     Graphics code, sprites, multi-platform support, server scanner
	Danny Schneider  Maps, sound, assist with client

	Kenny Coane         Official project mentor
	Robert Mustacchi    Shadow mentor
	Jon Silverman       All-around great guy
	Hayden Greif-Neill  Loyal advocacy and an endless list of excellent suggestions
	All our testers in the Sun Lab at Brown University's Department of Computer Science

Public Domain Sounds From:

Creative Commons Sampling 1.0 License Sounds:
	By schluppipuppie (
            wasserflasche25.wav (

	By hammerklavier (
            MOURNFUL CADENCE-Plain.aif (


Copyright 2009-2011 Andrew Ayer, Nathan Partlan, Jeffrey Pfau

Leges Motus is free and open source software.  You may redistribute it and/or
modify it under the terms of version 2, or (at your option) version 3, of the
GNU General Public License (GPL), as published by the Free Software Foundation.

Leges Motus is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the full text of the GNU General Public License for
further detail.

For a full copy of the GNU General Public License, please see the COPYING file
in the root of the source code tree.  You may also retrieve a copy from
<>, or request a copy by writing to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307  USA

Something went wrong with that request. Please try again.