project director: Simon Yuill
original drawings: Chad McCail
development team:
Ricardo Creemers
Stefan Gartner
Eleonora Oreggia
Simon Yuill
sound design: Mark Vernon

contact

supported by ...

All content is available under the terms of the GNU Free Documentation License, unless otherwise stated.

[module 4] spring_city
Huddersfield (England), Dundee and Glasgow (Scotland), Amsterdam (the Netherlands), Tokyo (Japan)
April 2005 - July 2005

Software

Description

Download

Installation

Running

Navigation



Description
The spring_city module presents a complete version of the urban environment from the
Spring drawing with buildings, furniture and vehicles. There are no inhabitants as these require the AI capabilities that are to be developed in a later module. Some of the vehicles, however, are animated to roam around the city at periodic intervals.

spring_city is designed to run across a network with the simulation running on one machine and graphical clients running on others.

contents

Download

spring_city.tgz [27.9 MB]
svs-0.3.tar.gz [192 KB]

contents

Installation

spring_city requires Python version 2.3 or higher. Python is available from:
http://www.python.org.

The underlying simulation system for spring_city will run on any Python compatible platform. The graphics clients for spring_city are known only to run for definite on GNU/Linux systems. These use the Soya 3D library which can run on other platforms, such as OS X, but can be problematic.

To run spring_city you will need to install the SVS framework first. Use version 0.3:
svs-0.3.tar.gz

This requires several external libraries which should be installed first:

Twisted - networking library
http://twistedmatrix.com

Zope Interface - support for Twisted
http://zope.org/Products/ZopeInterface

PyXML - XML support
http://pyxml.sourceforge.net

pyGraphLib - mathematical graph handling
http://pygraphlib.sourceforge.net

Numeric Kinds - numerical standards
http://cvs.sourceforge.net/viewcvs.py/numpy/kinds/

Polygon - polygon geometry handling
http://www.dezentral.de/soft/Polygon/

Soya 3D - 3D graphics library
http://home.gna.org/oomadness/en/soya/index.html

wxPython - wxWidget graphics interface
http://www.wxpython.org/

You may also require Tkinter (Tk/Tcl interface graphics), but this is provided as a standard part of most Python distributions.

For full details see the SVS installation instructions: http://www.spring-alpha.org/svs

Download and decompress the spring_city files, for example in your home directory:

spring_city.tgz

To decompress:

tar -zxvf spring_city.tar.gz

This does not require any installation as the applications can be run directly from its current location.

The 'spring_city' directory contains several Pyhton scripts which are used to run the server and clients along with two additional directories: 'client_data' and 'world_data'. 'client_data' contains the 2D and 3D models for representng the simulation environment in the player client, it is used by the 'soyaclient.py' application. 'world_data' contains all the data that the simulation requires to run, this is used by the 'world_client.py' application.

Follow the installation instructions for every machine spring_city will be running on. Note that the Soya 3D and wxPython libraries are only required by machines running the graphical clients, they are not required for the server and simulation applications.

contents

Running

This describes a basic setup for 3 machines, running the simulation and the two graphical clients.

Step 1.) gather the network addresses, or IP numbers for the three machines. For example:

machine 1 (server and simulation): 192.168.0.1
machine 2 (2D client): 192.168.0.2
machine 3 (3D client): 192.168.0.3

The addresses for your machines may vary.

Step 2.) start the server on machine 1. Launch a terminal, go to the 'spring_city' directory, and enter the command:

./server.py

Step 3.) start the simulation on the same machine. Open a second terminal, go to the 'spring_city' directory, and enter the command:

./worldclient.py

Note: if you start the simulation on a different machine from the server you will need to edit the connection command in the 'worldclient.py' file. Change:

world.connect("spring_city", "localhost", 9797)

To something like:

world.connect("spring_city", "192.168.0.1", 9797)

Step 3.) start the 2D client. On machine 2 open a terminal, go to the 'spring_city' directory, and enter the command:

./soyaclient.py -f -h 192.168.0.1 -u client2d

When the client first launches it will take a few minutes to download the world data and build the scene.

Step 4.) start the 3D client. On machine 2 open a terminal and enter the command:

./soyaclient.py -df -h 192.168.0.1 -u client3d

When the client first launches it will take a few minutes to download the world data and build the scene.

For info on all the command line options for luanching a client enter:

./soyaclient.py --help

Once the scenes have loaded into the clients, the environment can be explored by the player.

contents

Navigation

It is possible to explore the worlds in the two clients. Navigation can be driven either from the computer keyboard or from an attached game controller.

Keyboard navigation:
  Up arrow - move forward
  Down arrow - move backward
  Left arrow - rotate left
  Right arrow - rotate right

A gamecontroller can navigate in a similar way using the joystick or arrow pads.

contents