<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://springrts-wiki.p2004a.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jcnossen</id>
	<title>Spring - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://springrts-wiki.p2004a.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jcnossen"/>
	<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/wiki/Special:Contributions/Jcnossen"/>
	<updated>2026-11-08T22:53:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5659</id>
		<title>Development:Main</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5659"/>
		<updated>2008-09-25T00:57:46Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOTE: Outlined below is information on assisting with the development of the Spring source itself. For information about developing a mod (units, widgets, maps, etc.) see the [[Mod_and_Unit_development]] page.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below you can find information on how to work with the Spring source in the current mainline (Windows platform) if you like to work on another platform (Linux &amp;amp; Mac) please look at the bottem of this page under &amp;quot;Multiplatform development&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Starting Development==&lt;br /&gt;
To start development, you will need&lt;br /&gt;
#To read the [[Coding_Standards]]&lt;br /&gt;
#The latest version of the source &lt;br /&gt;
#A good code manipulation program&lt;br /&gt;
#Compiling your modified source&lt;br /&gt;
&lt;br /&gt;
== Keep track what others do ==&lt;br /&gt;
If you develop with others, you need to know what they do. We have [http://spring.clan-sy.com/fisheye/ fisheye], a very handy SVN helper, and [http://spring.clan-sy.com/websvn/ WebSVN] running on the server.&lt;br /&gt;
&lt;br /&gt;
===Source Code Documentation===&lt;br /&gt;
A good place to start is [http://buildbot.no-ip.org/~buildbot/spring/doxygen the source code documentation].&lt;br /&gt;
&lt;br /&gt;
An explanation on how the code is executed in game can be found in the [[Spring Engine Code]]&lt;br /&gt;
page.&lt;br /&gt;
&lt;br /&gt;
==Obtaining the Source==&lt;br /&gt;
The latest SVN is at: [https://spring.clan-sy.com/svn/spring https://spring.clan-sy.com/svn/spring]&amp;lt;br&amp;gt;&lt;br /&gt;
A hourly updated read-only mirror is available at: svn://caspring.org:3691/&lt;br /&gt;
&lt;br /&gt;
Another option is to manually [http://spring.clan-sy.com/download.php download] it along with the latest released version of the game. However, for serious developers, a better way would be to download the source straight from the subversion (SVN) repository. This will also allow you to make a patch out of the changes you make to the code, and send it to one of the developers with SVN access.&lt;br /&gt;
&lt;br /&gt;
Windows SVN clients : [http://subversion.tigris.org Subversion] (Win32-Console), &lt;br /&gt;
[http://www.syntevo.com/smartsvn/index.jsp SmartSVN] (Java) and [http://tortoisesvn.tigris.org TortoiseSVN] (MSI).&lt;br /&gt;
&lt;br /&gt;
Assuming that you are using the Subversion svn client you can download the latest SVN source with one of the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;svn.exe checkout https://spring.clan-sy.com/svn/spring/trunk&amp;lt;br&amp;gt;&lt;br /&gt;
svn.exe checkout svn://caspring.org:3691/trunk&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will create a trunk subdirectory in the directory from where you ran it, which will contain the source code root directory which will be later referred to as /spring&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using Git rather than SVN, you need to initialize local repository and fetch using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git-svn clone https://spring.clan-sy.com/svn/spring&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(this may take a while)&lt;br /&gt;
&lt;br /&gt;
To update your local repository, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git-svn fetch https://spring.clan-sy.com/svn/spring&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Learning C++==&lt;br /&gt;
You will need to know C++ to modify or understand Spring&#039;s source code. If you are interested in learning C++, see [[Learning_CPP]]&lt;br /&gt;
&lt;br /&gt;
However please note that badly designed code (code created by a C++ novice for example), even if working will likely not be included in the spring code. Spring is a large project, and therefore it is necessary to stay away from hack jobs and create general solutions to problems.&lt;br /&gt;
&lt;br /&gt;
==Setting up your development environment==&lt;br /&gt;
You have either to use the SCons build system that is multi platform, or use Microsoft Visual Studio for building spring. See also [[Development_IDEs]] for some more background information about the IDE to choose.&lt;br /&gt;
&lt;br /&gt;
===Visual Studio 8 (2005)===&lt;br /&gt;
(possibly the free Express Edition) &lt;br /&gt;
&lt;br /&gt;
* Install the [http://spring.clan-sy.com/dl/spring-vc8libs.exe vclibs library package]. You need to install this in the /spring directory from the SVN checkout or the zipped source. If done right, it will look like:&lt;br /&gt;
**/spring/&lt;br /&gt;
**/spring/installer&lt;br /&gt;
**/spring/rts&lt;br /&gt;
**/spring/... other dirs&lt;br /&gt;
**/spring/vclibs&lt;br /&gt;
* Install the [http://msdn.microsoft.com/directx/sdk/ DirectX SDK]&lt;br /&gt;
* Install the PlatformSDK. I got away with unchecking the parts of the PlatformSDK that were obviously not related (IIS, web stuff). Makes for a smaller download. Make &#039;&#039;&#039;sure&#039;&#039;&#039; the Platform SDK and DirectX SDK are in the VS search/include directories:&lt;br /&gt;
* After installing them, open Visual C++. Click Tools &amp;gt;&amp;gt; Options &amp;gt;&amp;gt; Projects and Solutions &amp;gt;&amp;gt; VC++ Directories. Add these entries to the corresponding sections (paths just a reference, yours may be different):&lt;br /&gt;
**Include files:&lt;br /&gt;
***$(ProgramFiles)\Microsoft DirectX SDK (August 2007)\Include&lt;br /&gt;
***$(ProgramFiles)\Microsoft Platform SDK\include&lt;br /&gt;
**Library files:&lt;br /&gt;
***$(ProgramFiles)\Microsoft DirectX SDK (August 2007)\Lib\x86 (Might need \x64 on a 64-bit platform, I don&#039;t know.)&lt;br /&gt;
***$(ProgramFiles)\Microsoft Platform SDK\lib&lt;br /&gt;
* Open the solution. /spring/rts/build/vstudio8/rts.sln&lt;br /&gt;
* Start building (usually you want to select the release/no debug build, debug is really too slow and is used only when you really know what you want to test)&lt;br /&gt;
* Select the working directory in the project properties, otherwise spring will not work correctly&lt;br /&gt;
&lt;br /&gt;
===Visual Studio 9 (2008)===&lt;br /&gt;
(possibly the free Express Edition)&lt;br /&gt;
&lt;br /&gt;
Not yet fully working as far as I know; you need at least this hotfix from Microsoft though:&lt;br /&gt;
&lt;br /&gt;
http://support.microsoft.com/kb/946040&lt;br /&gt;
&lt;br /&gt;
For the rest the Visual Studio 8 instructions should apply, mostly.&lt;br /&gt;
&lt;br /&gt;
===SCONS/MinGW===&lt;br /&gt;
Code::Blocks and Dev C++ use MinGW too, so if you are using one of these IDEs, you&#039;ll want to follow these instructions too.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Getting the compiler&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can compile spring either with MinGW version 3 or 4. MinGW 4.2.1 is used for spring release builds (cross compiled on Linux). Therefore, version 4 is recommended.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;MinGW 3&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you do not have MinGW installed yet, the easiest way to get it, is to install it together with one of the two IDEs [http://downloads.sourceforge.net/dev-cpp/devcpp-4.9.9.2_setup.exe Dev-C++] or [http://downloads.sourceforge.net/codeblocks/codeblocks-8.02mingw-setup.exe Code::Blocks]. They both come with MinGW 3.4, which still compiles spring correctly (June 2008). Use [http://spring.clan-sy.com/dl/spring-mingwlibs-v10.exe v10 of the MinGW library package] if you have MinGW 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;MinGW 4 (recommended)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t yet have it, go to [http://sf.net/project/showfiles.php?group_id=2435 the MinGW download page], and get at least the following packages (MinGW 4.3.0):&lt;br /&gt;
* mingw-runtime&lt;br /&gt;
* core&lt;br /&gt;
* c++&lt;br /&gt;
* java (if MinGW 4.3.1 is out yet, you dont need this)&lt;br /&gt;
* binutils&lt;br /&gt;
* win32api&lt;br /&gt;
Use [http://spring.jobjol.nl/show_file.php?id=1102 v11 of the MinGW library package] if you have MinGW 4.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compiling spring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Make sure you install the MinGW library package in the checkout directory, so the path is: /spring/mingwlibs. If done right, it will look like:&lt;br /&gt;
**/spring/&lt;br /&gt;
**/spring/installer&lt;br /&gt;
**/spring/rts&lt;br /&gt;
**/spring/... other dirs&lt;br /&gt;
**/spring/mingwlibs&lt;br /&gt;
&lt;br /&gt;
These programs are a must have if you want to compile Spring with MinGW, so install them now, if you don&#039;t have them already.&lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-210.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-0.96.96.win32.exe Scons 0.96 installer]&lt;br /&gt;
*[http://www.cmake.org/files/v2.6/cmake-2.6.0-win32-x86.exe CMake 2.6 installer]&lt;br /&gt;
&lt;br /&gt;
Oh, and quick instructions:&lt;br /&gt;
&lt;br /&gt;
* Grab and install the above programs.&lt;br /&gt;
* Make sure C:\Python25, C:\Python25\Scripts and C:\Dev-Cpp\bin are in your PATH environment variable. Set environment variables by: Start -&amp;gt; Settings -&amp;gt; Control Panel -&amp;gt; System -&amp;gt; Advanced -&amp;gt; Environment variables (for Windows XP).&lt;br /&gt;
* Make sure a MINGDIR environment variable with value C:\Dev-Cpp exists. (change paths where appropriate.)&lt;br /&gt;
* Checkout the Spring SVN repository, following the instructions above in obtaining source. (TODO:link)&lt;br /&gt;
* Open a console (Start -&amp;gt; Run -&amp;gt; cmd.exe -&amp;gt; Run), cd \where you checked it out in the previous step, if you checked it out on a different drive make sure to change drives with DriveLetter:&amp;lt;enter&amp;gt; first.&lt;br /&gt;
* Type scons configure&amp;lt;enter&amp;gt;. Refer to scons --help for options which can be passed to scons configure. Gotchas:&lt;br /&gt;
** If you get an error message starting with &amp;quot;EOFError: : env = Environement...&amp;quot;, try deleting the file build/scons_signatures.dblite&lt;br /&gt;
** If you get an error message stating &amp;quot;ImportError: No module named win32file:&amp;quot;, you have probably not installed the python-win32-extensions.&lt;br /&gt;
** If all proceeds as intended you will see a message similar to: &amp;quot;Everything seems OK.  Run `scons&#039; now to build.&amp;quot;&lt;br /&gt;
* Type scons&amp;lt;enter&amp;gt; to start the compilation.&lt;br /&gt;
** If you have Delphi installed and get an error message that the commandline params &amp;quot;--no-print-directory&amp;quot; &amp;amp; &amp;quot;-C&amp;quot; aren&#039;t supported, then you should remove the Delphi dirs from your &amp;lt;i&amp;gt;PATH&amp;lt;/i&amp;gt; variable, because scons tried to run the delphi&#039;s make.exe instead of using mingw32-make. (this will cause that streflop can&#039;t be build!)&lt;br /&gt;
* Wait for the compilation to finish, this may take a while.&lt;br /&gt;
* Copy datafiles and stuff from official Spring installation to the /spring/game directory (where spring.exe is located, after the compilation finished.)&lt;br /&gt;
* Copy missing DLLs from mingwlibs/dll.&lt;br /&gt;
* Start developing.&lt;br /&gt;
&lt;br /&gt;
If you are using Linux, refer to the [[SetupGuide]] to build Spring and get it running.&lt;br /&gt;
&lt;br /&gt;
=== CMake/GCC ===&lt;br /&gt;
Currently the CMake scripts are not capable of generating Visual Studio project files, so CMake can only be used for gcc compiling.&lt;br /&gt;
&lt;br /&gt;
* Install CMake (must be at least version 2.6.0) from either www.cmake.org or through your distributions package manager&lt;br /&gt;
* get the source code (from svn, tarballs...)&lt;br /&gt;
==== The GUI method ====&lt;br /&gt;
CMake offers a nice Qt4 gui to ease the following steps (to use the gui explained here, cmake must be at least version 2.6.1). Doing so should be straightforward:&lt;br /&gt;
* select source directory&lt;br /&gt;
* select (and/or create) build directory where temporary files are stored&lt;br /&gt;
* hit configure button&lt;br /&gt;
* choose your build type:&lt;br /&gt;
** Unix makefile if you are using linux and want to compile linux executables&lt;br /&gt;
** mingw makefiles if you are working on windows&lt;br /&gt;
** Unix makefile with cross compiler setup to cross-compile mingw32 executables, you have to select the toolchain file you want to use (see below)&lt;br /&gt;
* configure variables to your need (move the mouse over the options and read the tooltip for further informations on them and or see Section &amp;quot;Options&amp;quot;)&lt;br /&gt;
* push generate button&lt;br /&gt;
* open commandline and do &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== The commandline method ====&lt;br /&gt;
Only works with the linux version of cmake, and is easiely scriptable.&lt;br /&gt;
* cd to (and/or create) build directory where temporary files are stored&lt;br /&gt;
* &amp;quot;cmake &amp;lt;path to source tree&amp;gt; &amp;lt;options&amp;gt;&amp;quot; where:&lt;br /&gt;
** &amp;lt;path to source tree&amp;gt; is the path to the spring source directory&lt;br /&gt;
**  &amp;lt;options&amp;gt; are defined like &amp;quot;-D&amp;lt;option name&amp;gt;=&amp;lt;value&amp;gt;&lt;br /&gt;
* depending on your settings you may need to run &amp;quot;cmake ...&amp;quot; twice&lt;br /&gt;
* run &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
* PACKAGE MAINTAINERS:&lt;br /&gt;
** doing &amp;quot;make install DESTDIR=/some/path&amp;quot; will install spring in the specified place, putting files in subdirectories like configured. This may be helpfull when making packages so spring don&#039;T get installed on your system for real (see also CMake FAQ [[http://www.vtk.org/Wiki/CMake_FAQ#Does_CMake.27s_.22make_install.22_support_DESTDIR.3F]]).&lt;br /&gt;
** You need to update the mime database (update-mime-database) and the kde database (kbuildsycoca) after installing to make the system aware of the newly installed mime types and desktop shortcuts.&lt;br /&gt;
&lt;br /&gt;
==== Some Options Explained ====&lt;br /&gt;
* MINGWLIBS: directory where the [http://spring.jobjol.nl/show_file.php?id=1102 v11 of the MinGW library package is] (only needed when compiling with mingw)&lt;br /&gt;
* CMAKE_BUILD_TYPE: either RELEASE, DEBUG, DEBUG2, DEBUG3 which compiler options to use&lt;br /&gt;
* CMAKE_INSTALL_PREFIX: installation prefix (defaults to /usr/local) defines the base directory for installing&lt;br /&gt;
* DATADIR, LIBDIR, BINDIR: where to install data, libraries or binaries (relative paths are based on CMAKE_INSTALL_PREFIX, absolute paths are absolute (DESTDIR is still respected))&lt;br /&gt;
* APPLICATIONS_DIR, MIME_DIR, PIXMAPS_DIR: where to install freedesktop-files (icons, mime-types and application-description)&lt;br /&gt;
&lt;br /&gt;
==== The toolchain file ====&lt;br /&gt;
An example should be self-explainatory:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 # the name of the target operating system&lt;br /&gt;
 SET(CMAKE_SYSTEM_NAME Windows)&lt;br /&gt;
&lt;br /&gt;
 # which compilers to use for C and C++&lt;br /&gt;
 SET(CMAKE_C_COMPILER i686-mingw32-gcc)&lt;br /&gt;
 SET(CMAKE_CXX_COMPILER i686-mingw32-g++)&lt;br /&gt;
&lt;br /&gt;
 # here is the target environment located&lt;br /&gt;
 SET(CMAKE_FIND_ROOT_PATH /usr/i686-mingw32)&lt;br /&gt;
&lt;br /&gt;
 SET(MINGWLIBS /home/karl/spring/mingwlibs_v11)&amp;lt;/code&amp;gt;&lt;br /&gt;
Pass this with &amp;quot;-DCMAKE_TOOLCHAIN_FILE=/your/toolchain/file&amp;quot; to cmake or select it in the gui to make a cross-compilation.&lt;br /&gt;
&lt;br /&gt;
==== Further reference ====&lt;br /&gt;
* CMake FAQ [[http://www.vtk.org/Wiki/CMake_FAQ]]&lt;br /&gt;
* man CMake&lt;br /&gt;
* the CMake documentation (long!) [[http://www.cmake.org/HTML/cmake-2.6.html]]&lt;br /&gt;
&lt;br /&gt;
==Development Suggestions==&lt;br /&gt;
Before starting to make modifications to the source, take a look at the [[development guidelines]] which outlines some important things to think about. To find something interesting to work on, look at the list of [[example projects]]. You can also check the list of [[whois doing what]] to see what others are doing. If you do edit the code, please add [[Doxygen style comments]] to the code, which will then enhance the source code documentation.&lt;br /&gt;
&lt;br /&gt;
==How to get your code included==&lt;br /&gt;
If you create something that you think should be included in the official source tree, you can report a &amp;quot;bug&amp;quot; in [http://spring.clan-sy.com/mantis/ mantis, our BTS]. Add your patch as attachment, and put &amp;quot;[patch]&amp;quot; in front of the subject, so it is easy for us to separate patches from bugs.&lt;br /&gt;
&lt;br /&gt;
It&#039;s also considered standard practice to post one&#039;s modifications in the [http://spring.clan-sy.com/phpbb/viewforum.php?f=12 development forum] and get feedback.&lt;br /&gt;
&lt;br /&gt;
==Spring Engine TODO list==&lt;br /&gt;
There is a TODO list for developers who want to contribute to the engine itself:&lt;br /&gt;
[[SpringEngineTODO]]. There is also a [http://spring.clan-sy.com/phpbb/viewforum.php?f=21 feature request forum], which may give you some ideas. Don&#039;t be overwhelmed by the sheer number of (silly) requests though!&lt;br /&gt;
&lt;br /&gt;
==Development links==&lt;br /&gt;
* [http://planetspring.free.fr/spring/ Automatic installer builds (crosscompiled, mingw)]&lt;br /&gt;
* [http://spring.jobjol.nl/show_file.php?id=860 Spring base content files]&lt;br /&gt;
* [http://developer.berlios.de/projects/taspring-linux BerliOS project page (OLD)]&lt;br /&gt;
* [http://spring.clan-sy.com/mantis Bug Tracking System]&lt;br /&gt;
* [http://buildbot.no-ip.org:8010/ Buildbot]&lt;br /&gt;
* [https://lists.berlios.de/mailman/listinfo/taspring-linux-commit Commit mailing list]&lt;br /&gt;
* [http://spring.clan-sy.com/dl/spring-vc8libs.exe Development libraries for Visual Studio 2005]&lt;br /&gt;
* [http://www.unknown-files.net/spring/3839/mingwlibsv10/ Development libraries for MinGW]&lt;br /&gt;
* [http://lolut.utbm.info/cgi-bin/mailman/listinfo/taspring-linux Developers mailing list (practically dead, use this forum instead) (DOWN)]&lt;br /&gt;
* [http://buildbot.no-ip.org/~buildbot/spring/doxygen Doxygen pages of the latest source (regenerated nightly)]&lt;br /&gt;
* [http://spring.clan-sy.com/fisheye Fisheye interface to SVN]&lt;br /&gt;
* [http://sourceforge.net/projects/springrts SourceForge project page (OLD)]&lt;br /&gt;
* [http://buildbot.no-ip.org/~buildbot/spring/stacktraceTranslator.php StackTrace Translator]&lt;br /&gt;
* [https://spring.clan-sy.com/svn/spring/trunk/ Subversion repository]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/listing.php?repname=spring&amp;amp;path=%2F&amp;amp;sc=0 WebSVN]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/log.php?repname=spring&amp;amp;path=%2F&amp;amp;rev=0&amp;amp;sc=0&amp;amp;isdir=1 WebSVN link to &amp;quot;development log&amp;quot;]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/filedetails.php?repname=spring&amp;amp;path=%2Ftrunk%2FDocumentation%2Fchangelog.txt&amp;amp;rev=0&amp;amp;sc=0 WebSVN link to the most recent changelog.txt]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]] [[Category:Source development]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5638</id>
		<title>Development:Main</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5638"/>
		<updated>2008-04-21T18:16:20Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outlined below is information on assisting with the development of the Spring source itself.&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;small&amp;gt;NOTE: For information about developing a mod (units, maps, etc.) see the [[Mod Development]] page.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below you can find information on how to work with the Spring source in the current mainline (Windows platform) if you like to work on another platform (Linux &amp;amp; Mac) please look at the bottem of this page under &amp;quot;Multiplatform development&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Starting Development==&lt;br /&gt;
To start development, you will need&lt;br /&gt;
#The latest version of the source &lt;br /&gt;
#A good code manipulation program&lt;br /&gt;
#Compiling your modified source&lt;br /&gt;
&lt;br /&gt;
== Keep track what others do ==&lt;br /&gt;
If you develop with others, you need to know what they do. We have [http://spring.clan-sy.com/fisheye/ fisheye], a very handy SVN helper, and [http://spring.clan-sy.com/websvn/ WebSVN] running on the server.&lt;br /&gt;
&lt;br /&gt;
===Source Code Documentation===&lt;br /&gt;
A good place to start is [http://buildbot.no-ip.org/~buildbot/spring/doxygen the source code documentation].&lt;br /&gt;
&lt;br /&gt;
An explanation on how the code is executed in game can be found in the [[Spring Engine Code]]&lt;br /&gt;
page.&lt;br /&gt;
&lt;br /&gt;
==Obtaining the Source==&lt;br /&gt;
The latest SVN is at: [https://spring.clan-sy.com/svn/spring https://spring.clan-sy.com/svn/spring]&amp;lt;br&amp;gt;&lt;br /&gt;
A hourly updated read-only mirror is available at: svn://caspring.org:3691/&lt;br /&gt;
&lt;br /&gt;
Another option is to manually [http://spring.clan-sy.com/download.php download] it along with the latest released version of the game. However, for serious developers, a better way would be to download the source straight from the subversion (SVN) repository. This will also allow you to make a patch out of the changes you make to the code, and send it to one of the developers with SVN access.&lt;br /&gt;
&lt;br /&gt;
Windows SVN clients : [http://subversion.tigris.org Subversion] (Win32-Console), &lt;br /&gt;
[http://www.syntevo.com/smartsvn/index.jsp SmartSVN] (Java) and [http://tortoisesvn.tigris.org TortoiseSVN] (MSI).&lt;br /&gt;
&lt;br /&gt;
Assuming that you are using the Subversion svn client you can download the latest SVN source with one of the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;svn.exe checkout https://spring.clan-sy.com/svn/spring/trunk&amp;lt;br&amp;gt;&lt;br /&gt;
svn.exe checkout svn://caspring.org:3691/trunk&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will create a trunk subdirectory in the directory from where you ran it, which will contain the source code root directory which will be later referred to as /spring&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using Git rather than SVN, you need to initialize local repository and fetch using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git-svn clone https://spring.clan-sy.com/svn/spring&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(this may take a while)&lt;br /&gt;
&lt;br /&gt;
To update your local repository, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git-svn fetch https://spring.clan-sy.com/svn/spring&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Learning C++==&lt;br /&gt;
You will need to know C++ to modify or understand Spring&#039;s source code. If you are interested in learning C++, see [[Learning_CPP]]&lt;br /&gt;
&lt;br /&gt;
However please note that badly designed code (code created by a C++ novice for example), even if working will likely not be included in the spring code. Spring is a large project, and therefore it is necessary to stay away from hack jobs and create general solutions to problems.&lt;br /&gt;
&lt;br /&gt;
==Setting up your development environment==&lt;br /&gt;
You have either to use the SCons build system that is multi platform, or use Microsoft Visual Studio for building spring. See also [[Development_IDEs]] for some more background information about the IDE to choose.&lt;br /&gt;
&lt;br /&gt;
===Visual Studio 8 (2005)===&lt;br /&gt;
(possibly the free Express Edition) &lt;br /&gt;
&lt;br /&gt;
* Install the [http://xta.wolfgame.org/SimBase/vclibs.7z vclibs library package]. You need to install this in the /spring directory from the SVN checkout the zipped source. If done right, it will look like:&lt;br /&gt;
**/spring/&lt;br /&gt;
**/spring/installer&lt;br /&gt;
**/spring/rts&lt;br /&gt;
**/spring/... other dirs&lt;br /&gt;
**/spring/vclibs&lt;br /&gt;
* Install the [http://msdn.microsoft.com/directx/sdk/ DirectX SDK]&lt;br /&gt;
* Install the PlatformSDK. I got away with unchecking the parts of the PlatformSDK that were obviously not related (IIS, web stuff). Makes for a smaller download. Make &#039;&#039;&#039;sure&#039;&#039;&#039; the Platform SDK and DirectX SDK are in the VS search/include directories:&lt;br /&gt;
* After installing them, open Visual C++. Click Tools &amp;gt;&amp;gt; Options &amp;gt;&amp;gt; Projects and Solutions &amp;gt;&amp;gt; VC++ Directories. Add these entries to the corresponding sections (paths just a reference, yours may be different):&lt;br /&gt;
**Include files:&lt;br /&gt;
***$(ProgramFiles)\Microsoft DirectX SDK (August 2007)\Include&lt;br /&gt;
***$(ProgramFiles)\Microsoft Platform SDK\include&lt;br /&gt;
**Library files:&lt;br /&gt;
***$(ProgramFiles)\Microsoft DirectX SDK (August 2007)\Lib\x86 (Might need \x64 on a 64-bit platform, I don&#039;t know.)&lt;br /&gt;
***$(ProgramFiles)\Microsoft Platform SDK\lib&lt;br /&gt;
* Open the solution. /spring/rts/build/vstudio8/rts.sln&lt;br /&gt;
* Start building (usually you want to select the release/no debug build, debug is really too slow and is used only when you really know what you want to test)&lt;br /&gt;
* Select the working directory in the project properties, otherwise spring will not work correctly&lt;br /&gt;
&lt;br /&gt;
===SCONS/MinGW===&lt;br /&gt;
Code::Blocks and Dev C++ use MinGW too, so if you are using one of these IDEs, you&#039;ll want to follow these instructions too.&lt;br /&gt;
&lt;br /&gt;
*[http://downloads.sourceforge.net/dev-cpp/devcpp-4.9.9.2_setup.exe Dev-C++ Installer]&lt;br /&gt;
&lt;br /&gt;
Get [http://spring.clan-sy.com/dl/spring-mingwlibs-v10.exe the MinGW library package]. Make sure you install it it the checkout directory, so the path is: /spring/mingwlibs. If done right, it will look like:&lt;br /&gt;
**/spring/&lt;br /&gt;
**/spring/installer&lt;br /&gt;
**/spring/rts&lt;br /&gt;
**/spring/... other dirs&lt;br /&gt;
**/spring/mingwlibs&lt;br /&gt;
&lt;br /&gt;
These programs are a must have if you want to compile Spring with MinGW, so install them now, if you don&#039;t have them already.&lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-210.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-0.96.96.win32.exe Scons 0.96 installer]&lt;br /&gt;
&lt;br /&gt;
Oh, and quick instructions:&lt;br /&gt;
&lt;br /&gt;
* Grab and install the above programs.&lt;br /&gt;
* Make sure C:\Python25, C:\Python25\Scripts and C:\Dev-Cpp\bin are in your PATH environment variable. Set environment variables by: Start -&amp;gt; Settings -&amp;gt; Control Panel -&amp;gt; System -&amp;gt; Advanced -&amp;gt; Environment variables (for Windows XP).&lt;br /&gt;
* Make sure a MINGDIR environment variable with value C:\Dev-Cpp exists. (change paths where appropriate.)&lt;br /&gt;
* Checkout the Spring SVN repository, following the instructions above in obtaining source. (TODO:link)&lt;br /&gt;
* Open a console (Start -&amp;gt; Run -&amp;gt; cmd.exe -&amp;gt; Run), cd \where you checked it out in the previous step, if you checked it out on a different drive make sure to change drives with DriveLetter:&amp;lt;enter&amp;gt; first.&lt;br /&gt;
* Type scons configure&amp;lt;enter&amp;gt;. Refer to scons --help for options which can be passed to scons configure. Gotchas:&lt;br /&gt;
** If you get an error message starting with &amp;quot;EOFError: : env = Environement...&amp;quot;, try deleting the file build/scons_signatures.dblite&lt;br /&gt;
** If you get an error message stating &amp;quot;ImportError: No module named win32file:&amp;quot;, you have probably not installed the python-win32-extensions.&lt;br /&gt;
** If all proceeds as intended you will see a message similar to: &amp;quot;Everything seems OK.  Run `scons&#039; now to build.&amp;quot;&lt;br /&gt;
* Type scons&amp;lt;enter&amp;gt; to start the compilation.&lt;br /&gt;
* Wait for the compilation to finish, this may take a while.&lt;br /&gt;
* Copy datafiles and stuff from official Spring installation to the /spring/game directory (where spring.exe is located, after the compilation finished.)&lt;br /&gt;
* Copy missing DLLs from mingwlibs/dll.&lt;br /&gt;
* Start developing.&lt;br /&gt;
&lt;br /&gt;
If you are using Linux, refer to the [[SetupGuide]] to build Spring and get it running.&lt;br /&gt;
&lt;br /&gt;
==Development Suggestions==&lt;br /&gt;
Before starting to make modifications to the source, take a look at the [[development guidelines]] which outlines some important things to think about. To find something interesting to work on, look at the list of [[example projects]]. You can also check the list of [[whois doing what]] to see what others are doing. If you do edit the code, please add [[Doxygen style comments]] to the code, which will then enhance the source code documentation.&lt;br /&gt;
&lt;br /&gt;
==How to get your code included==&lt;br /&gt;
If you create something that you think should be included in the official source tree, you can report a &amp;quot;bug&amp;quot; in [http://spring.clan-sy.com/mantis/ mantis, our BTS]. Add your patch as attachment, and put &amp;quot;[patch]&amp;quot; in front of the subject, so it is easy for us to separate patches from bugs.&lt;br /&gt;
&lt;br /&gt;
It&#039;s also considered standard practice to post one&#039;s modifications in the [http://spring.clan-sy.com/phpbb/viewforum.php?f=12 development forum] and get feedback.&lt;br /&gt;
&lt;br /&gt;
==Spring Engine TODO list==&lt;br /&gt;
There is a TODO list for developers who want to contribute to the engine itself:&lt;br /&gt;
[[SpringEngineTODO]]. There is also a [http://spring.clan-sy.com/phpbb/viewforum.php?f=21 feature request forum], which may give you some ideas. Don&#039;t be overwhelmed by the sheer number of (silly) requests though!&lt;br /&gt;
&lt;br /&gt;
==Development links==&lt;br /&gt;
* [http://planetspring.free.fr/spring/ Automatic installer builds (crosscompiled, mingw)]&lt;br /&gt;
* [http://developer.berlios.de/projects/taspring-linux BerliOS project page (OLD)]&lt;br /&gt;
* [http://spring.clan-sy.com/mantis Bug Tracking System]&lt;br /&gt;
* [http://buildbot.no-ip.org:8010/ Buildbot]&lt;br /&gt;
* [https://lists.berlios.de/mailman/listinfo/taspring-linux-commit Commit mailing list]&lt;br /&gt;
* [http://spring.clan-sy.com/dl/spring-vc8libs.exe Development libraries for Visual Studio 2005]&lt;br /&gt;
* [http://www.unknown-files.net/spring/3839/mingwlibsv10/ Development libraries for MinGW]&lt;br /&gt;
* [http://lolut.utbm.info/cgi-bin/mailman/listinfo/taspring-linux Developers mailing list (practically dead, use this forum instead) (DOWN)]&lt;br /&gt;
* [http://buildbot.no-ip.org/~buildbot/spring/doxygen Doxygen pages of the latest source (regenerated nightly)]&lt;br /&gt;
* [http://spring.clan-sy.com/fisheye Fisheye interface to SVN]&lt;br /&gt;
* [http://sourceforge.net/projects/springrts SourceForge project page (OLD)]&lt;br /&gt;
* [http://buildbot.no-ip.org/~buildbot/spring/stacktraceTranslator.php StackTrace Translator]&lt;br /&gt;
* [https://spring.clan-sy.com/svn/spring/trunk/ Subversion repository]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/listing.php?repname=spring&amp;amp;path=%2F&amp;amp;sc=0 WebSVN]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/log.php?repname=spring&amp;amp;path=%2F&amp;amp;rev=0&amp;amp;sc=0&amp;amp;isdir=1 WebSVN link to &amp;quot;development log&amp;quot;]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/filedetails.php?repname=spring&amp;amp;path=%2Ftrunk%2FDocumentation%2Fchangelog.txt&amp;amp;rev=0&amp;amp;sc=0 WebSVN link to the most recent changelog.txt]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]] [[Category:Source development]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_SyncedCtrl&amp;diff=11644</id>
		<title>Lua SyncedCtrl</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_SyncedCtrl&amp;diff=11644"/>
		<updated>2008-02-07T13:00:19Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Resources =&lt;br /&gt;
&#039;&#039;&#039;Spring.AddTeamResource&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, string &amp;quot;m&amp;quot; | &amp;quot;e&amp;quot;, number amount ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.UseTeamResource&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, &lt;br /&gt;
    string &amp;quot;m&amp;quot; | &amp;quot;e&amp;quot;, number amount |&lt;br /&gt;
    { m = number amount, e = number amount}&lt;br /&gt;
  ) -&amp;gt; nil | boolean hadEnough&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetTeamResource&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, string res, number amount ) -&amp;gt; nil&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
  possible values for res are:&lt;br /&gt;
    &amp;quot;m&amp;quot;  = metal&lt;br /&gt;
    &amp;quot;e&amp;quot;  = energy&lt;br /&gt;
    &amp;quot;ms&amp;quot;  = metal storage&lt;br /&gt;
    &amp;quot;es&amp;quot;  = energy storage&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetTeamShareLevel&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, string &amp;quot;m&amp;quot; | &amp;quot;e&amp;quot;, number amount ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Unit Handling =&lt;br /&gt;
&#039;&#039;&#039;Spring.CreateUnit&#039;&#039;&#039;&lt;br /&gt;
  ( string &amp;quot;defName&amp;quot;,&lt;br /&gt;
    number x, number y, number z,&lt;br /&gt;
    (number facing | string &amp;quot;facing&amp;quot;),&lt;br /&gt;
    number teamID ) -&amp;gt; number unitID&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
  possible values for facing are:&lt;br /&gt;
    &amp;quot;s&amp;quot; | 0 = south&lt;br /&gt;
    &amp;quot;e&amp;quot; | 1 = east&lt;br /&gt;
    &amp;quot;n&amp;quot; | 2 = north&lt;br /&gt;
    &amp;quot;w&amp;quot; | 3 = west&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.DestroyUnit&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    [boolean selfd,]&lt;br /&gt;
    [boolean reclaimWreckage,]&lt;br /&gt;
    [number attackerID] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.TransferUnit&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    numer newTeamID,&lt;br /&gt;
    boolean given ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Unit Control ==&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitCosts&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, { &lt;br /&gt;
     [ buildTime  = number amount ],&lt;br /&gt;
     [ metalCost  = number amount ],&lt;br /&gt;
     [ energyCost = number amount ]&lt;br /&gt;
   } ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitTooltip&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, string &amp;quot;tooltip&amp;quot; ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitHealth&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number health |&lt;br /&gt;
    { [ health   = number health ],&lt;br /&gt;
      [ capture  = number capture ],&lt;br /&gt;
      [ paralyze = number paralyze ],&lt;br /&gt;
      [ build    = number build ] }&lt;br /&gt;
  ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitMaxHealth&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number maxHealth ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.AddUnitDamage&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number damage&lt;br /&gt;
    [, number paralyze = 0 [, number attackerID = -1 [, number weaponID = -1&lt;br /&gt;
      [, number impulse_x [, number impulse_y [, number impulse_z ]]] ]]] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitStockpile&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number stockpile [, number buildPercent ]]) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitExperience&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number experience ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitCloak&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    boolean cloaked | number scriptCloak,&lt;br /&gt;
    [ number decloakDistance | boolean decloakAbs ] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;&lt;br /&gt;
  If the 2nd argument is a number, the value works like this:&lt;br /&gt;
   1:=normal cloak&lt;br /&gt;
   2:=for free cloak (cost no E)&lt;br /&gt;
   3:=for free + no decloaking (except the unit is stunned)&lt;br /&gt;
   4&amp;gt;=ultimative cloak (no ecost, no decloaking, no stunned decloak)&lt;br /&gt;
&lt;br /&gt;
  The decloak distance is only changed if the 3th argument is a number or a boolean.&lt;br /&gt;
   If the boolean is false it takes the default decloak distance for that unitdef,&lt;br /&gt;
   if the boolean is true it takes the absolute value of it.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitStealth&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean stealth ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitLineage&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number teamID [, boolean isRoot] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitNeutral&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean neutral ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitTarget&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number enemyUnitID | number x, number y, number z,&lt;br /&gt;
    [ boolean dgun = false ] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitAlwaysVisible&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean alwaysVisible ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitBlocking&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean noBlock) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitMetalExtraction&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number depth [,number range] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitBuildSpeed&#039;&#039;&#039;&lt;br /&gt;
  ( number builderID,&lt;br /&gt;
    number buildSpeed, [ number repairSpeed [, number reclaimSpeed&lt;br /&gt;
  [,number resurrectSpeed [, number captureSpeed [, number terraformSpeed ]] ]]] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitShieldState&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean enabled [, number power] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitWeaponState&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number weaponNum, table states ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;format of the states table:&lt;br /&gt;
    {&lt;br /&gt;
      [&amp;quot;reloadstate&amp;quot; = number value,]&lt;br /&gt;
      [&amp;quot;reloadtime&amp;quot;  = number value,]&lt;br /&gt;
      [&amp;quot;accuracy&amp;quot;    = number value,]&lt;br /&gt;
      [&amp;quot;sprayangle&amp;quot;  = number value,]&lt;br /&gt;
      [&amp;quot;range&amp;quot;       = number value,]&lt;br /&gt;
      [&amp;quot;projectilespeed&amp;quot; = number value,]&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitTravel&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number travel [, number travelPeriod] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitMoveGoal&#039;&#039;&#039;   &amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;used by default commands to get in build-,attackrange etc.&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID, number x, number y, number z,&lt;br /&gt;
    [, number radius = 0 [, number speed = unit-&amp;gt;maxSpeed * 2 ] ] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitPhysics&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number posx, number posy, number posz,&lt;br /&gt;
    number velx, number vely, number velz,&lt;br /&gt;
    number rotx, number roty, number rotz,&lt;br /&gt;
  ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitPosition&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number x, number z [, boolean alwaysAboveSea] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitVelocity&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number velx, number vely, number velz ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitRotation&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number rotx, number roty, number rotz ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.AddUnitImpulse&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number x, number y, number z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Unit Ressourcing ==&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitResourcing&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    string res, number amount |&lt;br /&gt;
    { res = number amount, ... }&lt;br /&gt;
  ) -&amp;gt; nil&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
  possible values for res are: &amp;quot;[u|c][u|m][m|e]&amp;quot;&lt;br /&gt;
       unconditional | conditional&lt;br /&gt;
                 use | make&lt;br /&gt;
               metal | energy&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.AddUnitResource&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, string &amp;quot;m&amp;quot; | &amp;quot;e&amp;quot;, number amount ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.UseUnitResource&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, string &amp;quot;m&amp;quot; | &amp;quot;e&amp;quot;, number amount ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= Feature Handling =&lt;br /&gt;
&#039;&#039;&#039;Spring.CreateFeature&#039;&#039;&#039;&lt;br /&gt;
  (  string &amp;quot;defName&amp;quot;, number x, number y, number z&lt;br /&gt;
   [,number heading [, number AllyTeamID ]] ) -&amp;gt; number featureID&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.DestroyFeature&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.TransferFeature&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID, number AllyTeamID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Feature Control ==&lt;br /&gt;
&#039;&#039;&#039;Spring.SetFeatureHealth&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID, number health) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetFeatureReclaim&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID, number reclaimLeft) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetFeatureResurrect&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID, string &amp;quot;UnitDefName?&amp;quot; [, number facing | string &amp;quot;facing&amp;quot; ] ) -&amp;gt; nil&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
  possible string values for facing are:&lt;br /&gt;
    &amp;quot;s&amp;quot;  = south&lt;br /&gt;
    &amp;quot;e&amp;quot;  = east&lt;br /&gt;
    &amp;quot;n&amp;quot;  = north&lt;br /&gt;
    &amp;quot;w&amp;quot;  = west&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetFeaturePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID, number x, number y, number z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetFeatureDirection&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID, number x, number y, number z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetFeatureNoSelect&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID, boolean noSelect ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.RemoveBuildingDecal&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Lua to COB =&lt;br /&gt;
&#039;&#039;&#039;Spring.CallCOBScript&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number funcID | string funcName, number retArgs, COBArg1, COBArg2, ... )&lt;br /&gt;
    -&amp;gt; nil | number returnValue, number retArg1, number retArg2, ...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.CallCOBScriptCB&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number funcID | string funcName, number retArgs, COBArg1, COBArg2, ... )&lt;br /&gt;
    -&amp;gt; nil | number returnValue, number CallbackData, number retArg1, number retArg2, ...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBScriptID&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, string funcName ) -&amp;gt; nil | number funcID&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitCOBValue&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, boolean splitData=false], number COBValue&lt;br /&gt;
    [, number param1 [,number param2 [, number param3 [, number param4 ] ] ] ] )&lt;br /&gt;
  -&amp;gt; number result | number result1, number result2&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitCOBValue&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number COBValue, number param1 [,number param2] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= Give Order =&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot; style=&amp;quot;font-size:120%&amp;quot;&amp;gt;Works in unsynced code, too.&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GiveOrderToUnit&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number cmdID,&lt;br /&gt;
    params = {number, etc...},&lt;br /&gt;
    options = {&amp;quot;alt&amp;quot;, &amp;quot;ctrl&amp;quot;, &amp;quot;shift&amp;quot;, &amp;quot;right&amp;quot;} ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GiveOrderToUnitMap&#039;&#039;&#039;&lt;br /&gt;
  ( unitMap = { [unitID] = dontCare, etc... },&lt;br /&gt;
    number cmdID,&lt;br /&gt;
    params = {number, etc...},&lt;br /&gt;
    options = {&amp;quot;alt&amp;quot;, &amp;quot;ctrl&amp;quot;, &amp;quot;shift&amp;quot;, &amp;quot;right&amp;quot;} ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GiveOrderToUnitArray&#039;&#039;&#039;&lt;br /&gt;
  ( unitArray = { [1] = unitID, etc... },&lt;br /&gt;
    number cmdID,&lt;br /&gt;
    params = {number, etc...},&lt;br /&gt;
    options = {&amp;quot;alt&amp;quot;, &amp;quot;ctrl&amp;quot;, &amp;quot;shift&amp;quot;, &amp;quot;right&amp;quot;} ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GiveOrderArrayToUnitMap&#039;&#039;&#039;&lt;br /&gt;
  ( unitMap = { [number unitID] = dontCare, etc... },&lt;br /&gt;
    orderArray = {&lt;br /&gt;
      { number cmdID,&lt;br /&gt;
        params = {number, etc...},&lt;br /&gt;
        options = {&amp;quot;alt&amp;quot;, &amp;quot;ctrl&amp;quot;, &amp;quot;shift&amp;quot;, &amp;quot;right&amp;quot;}&lt;br /&gt;
      }, ..&lt;br /&gt;
    }&lt;br /&gt;
  ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GiveOrderArrayToUnitArray&#039;&#039;&#039;&lt;br /&gt;
  ( unitArray = { [1] = number unitID, etc... },&lt;br /&gt;
    orderArray = {&lt;br /&gt;
      { number cmdID,&lt;br /&gt;
        params = {number, etc...},&lt;br /&gt;
        options = {&amp;quot;alt&amp;quot;, &amp;quot;ctrl&amp;quot;, &amp;quot;shift&amp;quot;, &amp;quot;right&amp;quot;}&lt;br /&gt;
      }, ..&lt;br /&gt;
    }&lt;br /&gt;
  ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= Heightmap =&lt;br /&gt;
&#039;&#039;&#039;Spring.LevelHeightMap&#039;&#039;&#039;&lt;br /&gt;
  ( number x1, number z1 [, number x2, number z2], number height ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.AdjustHeightMap&#039;&#039;&#039;&lt;br /&gt;
  ( number x1, number z1 [, number x2, number z2], number height ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.RevertHeightMap&#039;&#039;&#039;&lt;br /&gt;
  ( number x1, number z1 [, number x2, number z2], number origFactor ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Command Descriptions =&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot; style=&amp;quot;font-size:120%&amp;quot;&amp;gt;Doesn&#039;t work in unsynced code.&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.EditUnitCmdDesc&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number cmdDescID, table cmdArray ) -&amp;gt; nil&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
  structure of cmdArray:&lt;br /&gt;
  {&lt;br /&gt;
    [ id          = int ],&lt;br /&gt;
    [ type        = int ],&lt;br /&gt;
    [ name        = string ],&lt;br /&gt;
    [ action      = string ],&lt;br /&gt;
    [ tooltip     = string ],&lt;br /&gt;
    [ texture     = string ],&lt;br /&gt;
    [ cursor      = string ],&lt;br /&gt;
    [ hidden      = boolean ],&lt;br /&gt;
    [ disabled    = boolean ],&lt;br /&gt;
    [ showUnique  = boolean ],&lt;br /&gt;
    [ onlyTexture = boolean ],&lt;br /&gt;
    [ params      = { string = string, ... } ]&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.InsertUnitCmdDesc&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number cmdDescID ] , table cmdArray ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.RemoveUnitCmdDesc&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number cmdDescID ] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= Other =&lt;br /&gt;
&#039;&#039;&#039;Spring.SetNoPause&#039;&#039;&#039;&lt;br /&gt;
  ( boolean noPause ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitToFeature&#039;&#039;&#039;&lt;br /&gt;
  ( boolean tofeature ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetExperienceGrade&#039;&#039;&#039;&lt;br /&gt;
  ( number expGrade&lt;br /&gt;
   &amp;lt;font color=red&amp;gt;[, number ExpPowerScale [, number ExpHealthScale [, number ExpReloadScale ]]]&amp;lt;/font&amp;gt; ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;font color=&amp;quot;darkgreen&amp;quot;&amp;gt;expGrade defines how often UnitExperience() will be called,&lt;br /&gt;
   it is based on the following equation:&lt;br /&gt;
     (int) [exp/(exp+1)] / expGrade&lt;br /&gt;
   If this integer differs from the one before the experience change&lt;br /&gt;
   it will call UnitExperience().&lt;br /&gt;
  Also those 3 last params are only available in .cheat&lt;br /&gt;
  &amp;lt;/font&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua-LuaCOB&amp;diff=10694</id>
		<title>Lua-LuaCOB</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua-LuaCOB&amp;diff=10694"/>
		<updated>2008-02-07T12:59:12Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&amp;lt;font size=&amp;quot;4&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;NOTE&amp;lt;/font&amp;gt; LuaCob will merged with LuaRules in 76b2&amp;lt;/font&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
To use Lua code in your BOS/COB files, you can either include the gadgetHandler (include it in the mod, see the CA mod or include it from the springcontent.sdz) or you create your own enviroment:&lt;br /&gt;
*create a mod-level directory LuaCOB/,&lt;br /&gt;
*make a LuaCOB/main.lua file.&lt;br /&gt;
Any additional files need to be included with a&lt;br /&gt;
&lt;br /&gt;
 include(&amp;quot;LuaCOB/additional_file.lua&amp;quot; [, fenvTable])&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t know what a fenvTable is, don&#039;t worry, you probably don&#039;t need it anyway.&lt;br /&gt;
More information can be found on [http://www.lua.org the Lua site]. It it highly recommended to read the manual and the tutorials found there. Note that Spring 76b1 used Lua version is 5.1.2, so please take note which version of the manual you&#039;re reading.&lt;br /&gt;
&lt;br /&gt;
Also note that the usual Lua functions for executing code in other files (&amp;lt;tt&amp;gt;dofiles()&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;require()&amp;lt;/tt&amp;gt;) are disabled for technical reasons.&lt;br /&gt;
&lt;br /&gt;
=Interfacing COB-&amp;gt;Lua=&lt;br /&gt;
All Lua functions that are called by COB are given three parameters:&lt;br /&gt;
*unitID - ID of the unit calling the function,&lt;br /&gt;
*unitDefID - ID of the unitDef,&lt;br /&gt;
*teamID - self-explanatory.&lt;br /&gt;
You can call scripts with any (enough for all practical purpouses) amount of additional arguments.&lt;br /&gt;
&lt;br /&gt;
Example functions:&lt;br /&gt;
&lt;br /&gt;
  function GetNearestEnemy(unitID, unitDefID, teamID, radius)&lt;br /&gt;
    local px, py, pz = Spring.GetUnitPosition(unitID)&lt;br /&gt;
    if (px == nil) then&lt;br /&gt;
      return&lt;br /&gt;
    end&lt;br /&gt;
       &lt;br /&gt;
    local nearDist = 1.0e20&lt;br /&gt;
    local nearUnit&lt;br /&gt;
    local units = Spring.GetUnitsInCylinder(px, pz, radius)&lt;br /&gt;
    for _,enemyID in ipairs(units) do&lt;br /&gt;
      if (not Sim.IsUnitAllied(enemyID)) then             &lt;br /&gt;
        local ex, ey, ez = Spring.GetUnitPosition(enemyID)&lt;br /&gt;
        if (ex ~= nil) then&lt;br /&gt;
          local dx, dy, dz = (px - ex), (py - ey), (pz - ez)&lt;br /&gt;
          local dist = (dx * dx) + (dy * dy) + (dz + dz)&lt;br /&gt;
          if (dist &amp;lt; nearDist) then&lt;br /&gt;
            nearUnit = enemyID&lt;br /&gt;
            nearDist = dist&lt;br /&gt;
          end&lt;br /&gt;
        end &lt;br /&gt;
      end   &lt;br /&gt;
    end   &lt;br /&gt;
&lt;br /&gt;
    if (nearUnit == nil) then&lt;br /&gt;
      return -1&lt;br /&gt;
    else&lt;br /&gt;
      return nearUnit&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Please note that returning tables doesn&#039;t currently work as one could expect. &#039;&#039;(Description what it does here)&#039;&#039; If you want to return multiple values from a table, you need to do it like this:&lt;br /&gt;
&lt;br /&gt;
 function ReturnSomeValues(u, ud, t, ...)&lt;br /&gt;
     return arg[1], arg[2], arg[3]  -- instead of arg&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==Calling Lua from BOS==&lt;br /&gt;
To call a Lua function from BOS code, you need to declare it first:&lt;br /&gt;
 // BOS&lt;br /&gt;
 lua_MyFunction() { return 0; }&lt;br /&gt;
Then just call this script. The &amp;lt;tt&amp;gt;lua_&amp;lt;/tt&amp;gt; prefix does its magic and routes the call to Lua code instead of calling the usual BOS code. Note that arguments don&#039;t matter, they are passed anyway:&lt;br /&gt;
 call-script lua_MyFunction(arg1, arg2);&lt;br /&gt;
===Getting output===&lt;br /&gt;
If you wish to print out some debugging info, please note that &amp;lt;tt&amp;gt;print&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;io.write&amp;lt;/tt&amp;gt; don&#039;t quite work in Windows versions of Spring, since stdout isn&#039;t availible (or is well-hidden.) Use &amp;lt;tt&amp;gt;Spring.Echo(&amp;quot;a string&amp;quot;)&amp;lt;/tt&amp;gt;, this will print a message to the Spring console and into the infolog.&lt;br /&gt;
&lt;br /&gt;
===LUA0..9===&lt;br /&gt;
 // the GET/SET constants&lt;br /&gt;
 #define LUA0 110&lt;br /&gt;
 #define LUA1 111&lt;br /&gt;
 #define LUA2 112&lt;br /&gt;
 #define LUA3 113&lt;br /&gt;
 #define LUA4 114&lt;br /&gt;
 #define LUA5 115&lt;br /&gt;
 #define LUA6 116&lt;br /&gt;
 #define LUA7 117&lt;br /&gt;
 #define LUA8 118&lt;br /&gt;
 #define LUA9 119&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;get LUA0&amp;lt;/tt&amp;gt; is used to check whether call succeeded (1 if true, 0 otherwise.) LUA1..9 store return values, e.g. &amp;lt;tt&amp;gt;lua_ReturnSomeValues&amp;lt;/tt&amp;gt; above would put its first argument into &amp;lt;tt&amp;gt;get LUA1&amp;lt;/tt&amp;gt;, second into &amp;lt;tt&amp;gt;get LUA2&amp;lt;/tt&amp;gt;, and so on.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Steps needed to call a Lua function in a BOS call-script call:&lt;br /&gt;
*define a Lua function &amp;lt;tt&amp;gt;MyFunction(unitID, unitDefID, teamID, ...)&amp;lt;/tt&amp;gt; in LuaCOB/main.lua or a file included by it&lt;br /&gt;
*define a BOS/COB script &amp;lt;tt&amp;gt;lua_MyFunction() { return 0; }&amp;lt;/tt&amp;gt; so the compiler knows about it&lt;br /&gt;
*call your function with &amp;lt;tt&amp;gt;call-script lua_MyFunction()&amp;lt;/tt&amp;gt;&lt;br /&gt;
*return values can be found in &amp;lt;tt&amp;gt;get LUA1..9&amp;lt;/tt&amp;gt;&lt;br /&gt;
*&amp;lt;tt&amp;gt;get LUA0&amp;lt;/tt&amp;gt; returns 1 when call was successful (regardless of its return values) and 0 in case of failure.&lt;br /&gt;
&lt;br /&gt;
===Examples of code===&lt;br /&gt;
*[http://neoteric.pl/~imbaczek/spring/messages_lua.zip Inter-unit communication]  &amp;lt;small&amp;gt;(shameless plug ;p)&amp;lt;/small&amp;gt; - a library that allows passing messages between units and reading/writing of public variables exposed by them.Included is a tech demo involving modified [[Nanoblobs]] 0.64. Patch, start the game, make a sheep and see for yourself.&lt;br /&gt;
* &amp;lt;big&amp;gt;Your own!&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Interfacing Lua-&amp;gt;COB=&lt;br /&gt;
&lt;br /&gt;
Lua:&lt;br /&gt;
 Spring.CallCOBScript(unitID, &amp;quot;CustomScript&amp;quot;, retArgCount, arg1, ..., argN)&lt;br /&gt;
 Spring.CallCOBScriptCB(unitID, &amp;quot;CustomScript&amp;quot;, retArgCount, callbackData, arg1, ..., argN)&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;retArgCount:&#039;&#039;&#039;  the number of arguments expected to be returned&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;callbackData:&#039;&#039;&#039; number passed to CobCallback() when the cob call completes&lt;br /&gt;
&lt;br /&gt;
COB:&lt;br /&gt;
 CustomScript(arg1, ..., argN) { ... }&lt;br /&gt;
&lt;br /&gt;
One particularly useful COB script, since Lua doesn&#039;t seem to have a way of making &amp;lt;tt&amp;gt;get SOMETHING(args)&amp;lt;/tt&amp;gt; requests (but it may provide other ways of getting the same information):&lt;br /&gt;
 LuaGet(r, cmd, p1, p2, p3, p4)&lt;br /&gt;
 {&lt;br /&gt;
  if (r == 0) { r = get cmd;                 return r }&lt;br /&gt;
  if (r == 1) { r = get cmd(p1,  0,  0,  0); return r }&lt;br /&gt;
  if (r == 2) { r = get cmd(p1, p2,  0,  0); return r }&lt;br /&gt;
  if (r == 3) { r = get cmd(p1, p2, p3,  0); return r }&lt;br /&gt;
  if (r == 4) { r = get cmd(p1, p2, p3, p4); return r }&lt;br /&gt;
&lt;br /&gt;
  return 1234;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
#[http://spring.clan-sy.com/phpbb/viewforum.php?f=23 Spring Lua Scripts forum]&lt;br /&gt;
#[http://spring.clan-sy.com/phpbb/viewtopic.php?t=9329 trepan&#039;s description of Lua-COB interface] - a little bit outdated, but still worth a read&lt;br /&gt;
&lt;br /&gt;
=Thanks=&lt;br /&gt;
trepan for doing the hard work of integrating Lua into Spring!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE from trepan:&lt;br /&gt;
  Thanks, but there were lua startscripts before I started doing&lt;br /&gt;
  any Spring coding. The benefits of the new LuaCob, LuaGaia, and&lt;br /&gt;
  LuaRules scripts are that they can be loaded from map/mod archives,&lt;br /&gt;
  and that they all use the same base libraries (as does LuaUI).&lt;br /&gt;
  They also have significantly more features then the current&lt;br /&gt;
  startscript code (ex: more call-ins and call-outs, the ability to&lt;br /&gt;
  render graphics in several different modes, play sounds, etc...)&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16107</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16107"/>
		<updated>2007-01-20T16:17:13Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
Hugh Perkins has been working on a SM3 map editor:&lt;br /&gt;
http://taspring.clan-sy.com/phpbb/viewtopic.php?t=8094&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section. It also has  an extra tag in LIGHT (GroundSpecularColor):&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [LIGHT]&lt;br /&gt;
 {&lt;br /&gt;
 // specular color, defaults to 0.1 0.1 0.1&lt;br /&gt;
 	GroundSpecularColor=0.3 0.3 0.3;&lt;br /&gt;
&lt;br /&gt;
   ... other standard tags shared with SMF (such as GroundSunColor)...&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 	SpecularExponent=16; // specular exponent AKA &lt;br /&gt;
 		//shininess or polishedness.  defaults to 8&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing method specification (how are the textures applied) ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
==== Tiled textures ====&lt;br /&gt;
&lt;br /&gt;
The operations usually have &amp;quot;source=texturename&amp;quot; in them, which points to the name of a tiled texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=1;&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [Snow]&lt;br /&gt;
 {&lt;br /&gt;
 	File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 	TileSize=20;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Tilesize is how big a single tile is in the 3D spring world, when the texture is tiled across the map. Imagine a heightmap of 1025x1025 (In spring world space this is 1024*8= 8192x8192 units). &lt;br /&gt;
When you set tilesize=4096, you will see the complete texture 4 times on the map (2 by 2). Set it to 8192 and you&#039;ll see the map completely covered. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Blendmap specification ====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
===== Blendmaps from file =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===== Generated blendmaps =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square too, with power-of-two dimensions like: 256x256, 512x512, 1024x1024.  They should be smaller than the heightmap.&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
[edit by relinquished: fixed typo &amp;quot;to be square two&amp;quot; instead of &amp;quot;to be square too&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
== Feature placement ==&lt;br /&gt;
&lt;br /&gt;
The feature specification is done with a list of feature type names in the SM3 itself, and with a binary datafile that contains all the feature positions, orientations.&lt;br /&gt;
Feature types are specified like this:&lt;br /&gt;
&lt;br /&gt;
 [FeatureTypes]&lt;br /&gt;
 {&lt;br /&gt;
 	NumTypes=4;&lt;br /&gt;
 	type0=TreeType0;     // a tree&lt;br /&gt;
 	type1=MyFeature; &lt;br /&gt;
 	type2=MyOtherFeature;&lt;br /&gt;
 	type3=GeoVent;            // a geothermal	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The feature binary file should be made with an editor. I&#039;m hoping Maelstrom will add feature placing to his startpoint editor, but until then there&#039;s only http://user.supradigital.org/jcnossen/FeaturePlacer.zip&lt;br /&gt;
&lt;br /&gt;
[[Image:Featureplacer.png]]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Pos:&amp;quot; fields are ment to enter the feature X,Y,Z. You can use zero for Y because spring will automatically put the feature on the ground when it loads.&lt;br /&gt;
Type is the index into the feature type list specified in the SM3 file.&lt;br /&gt;
&lt;br /&gt;
The feature data file should be linked to the SM3 with:&lt;br /&gt;
&lt;br /&gt;
 [map]&lt;br /&gt;
 {&lt;br /&gt;
      ..  other map tags ...&lt;br /&gt;
&lt;br /&gt;
      featuredata=FeatureDataFileName;&lt;br /&gt;
&lt;br /&gt;
      ..  other map tags ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Minimap ==&lt;br /&gt;
&lt;br /&gt;
The minimap is loaded from an image file that you have to set in the MAP section of the sm3 file.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
[MAP]&lt;br /&gt;
{&lt;br /&gt;
   minimap=maps/data/minimap.png;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* fix bugs&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16106</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16106"/>
		<updated>2007-01-12T22:17:23Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
Hugh Perkins has been working on a SM3 map editor:&lt;br /&gt;
http://taspring.clan-sy.com/phpbb/viewtopic.php?t=8094&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section. It also has  an extra tag in LIGHT (GroundSpecularColor):&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [LIGHT]&lt;br /&gt;
 {&lt;br /&gt;
 // specular color, defaults to 0.1 0.1 0.1&lt;br /&gt;
 	GroundSpecularColor=0.3 0.3 0.3;&lt;br /&gt;
&lt;br /&gt;
   ... other standard tags shared with SMF (such as GroundSunColor)...&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 	SpecularExponent=16; // specular exponent AKA &lt;br /&gt;
 		//shininess or polishedness.  defaults to 8&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing method specification (how are the textures applied) ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
==== Tiled textures ====&lt;br /&gt;
&lt;br /&gt;
The operations usually have &amp;quot;source=texturename&amp;quot; in them, which points to the name of a tiled texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=1;&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [Snow]&lt;br /&gt;
 {&lt;br /&gt;
 	File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 	TileSize=20;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Tilesize is how big a single tile is in the 3D spring world, when the texture is tiled across the map. Imagine a heightmap of 1025x1025 (In spring world space this is 1024*8= 8192x8192 units). &lt;br /&gt;
When you set tilesize=4096, you will see the complete texture 4 times on the map (2 by 2). Set it to 8192 and you&#039;ll see the map completely covered. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Blendmap specification ====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
===== Blendmaps from file =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===== Generated blendmaps =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square too, with power-of-two dimensions like: 256x256, 512x512, 1024x1024.  They should be smaller than the heightmap.&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
[edit by relinquished: fixed typo &amp;quot;to be square two&amp;quot; instead of &amp;quot;to be square too&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
== Feature placement ==&lt;br /&gt;
&lt;br /&gt;
The feature specification is done with a list of feature type names in the SM3 itself, and with a binary datafile that contains all the feature positions, orientations.&lt;br /&gt;
Feature types are specified like this:&lt;br /&gt;
&lt;br /&gt;
 [FeatureTypes]&lt;br /&gt;
 {&lt;br /&gt;
 	NumTypes=4;&lt;br /&gt;
 	type0=TreeType0;     // a tree&lt;br /&gt;
 	type1=MyFeature; &lt;br /&gt;
 	type2=MyOtherFeature;&lt;br /&gt;
 	type3=GeoVent;            // a geothermal	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The feature binary file should be made with an editor. I&#039;m hoping Maelstrom will add feature placing to his startpoint editor, but until then there&#039;s only http://user.supradigital.org/jcnossen/FeaturePlacer.zip&lt;br /&gt;
&lt;br /&gt;
[[Image:Featureplacer.png]]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Pos:&amp;quot; fields are ment to enter the feature X,Y,Z. You can use zero for Y because spring will automatically put the feature on the ground when it loads.&lt;br /&gt;
Type is the index into the feature type list specified in the SM3 file.&lt;br /&gt;
&lt;br /&gt;
The feature data file should be linked to the SM3 with:&lt;br /&gt;
&lt;br /&gt;
 [map]&lt;br /&gt;
 {&lt;br /&gt;
      ..  other map tags ...&lt;br /&gt;
&lt;br /&gt;
      featuredata=FeatureDataFileName;&lt;br /&gt;
&lt;br /&gt;
      ..  other map tags ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* fix bugs&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16103</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16103"/>
		<updated>2006-10-04T19:58:52Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: /* Feature placement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section. It also has  an extra tag in LIGHT (GroundSpecularColor):&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [LIGHT]&lt;br /&gt;
 {&lt;br /&gt;
 // specular color, defaults to 0.1 0.1 0.1&lt;br /&gt;
 	GroundSpecularColor=0.3 0.3 0.3;&lt;br /&gt;
&lt;br /&gt;
   ... other standard tags shared with SMF (such as GroundSunColor)...&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 	SpecularExponent=16; // specular exponent AKA &lt;br /&gt;
 		//shininess or polishedness.  defaults to 8&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing method specification (how are the textures applied) ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
==== Tiled textures ====&lt;br /&gt;
&lt;br /&gt;
The operations usually have &amp;quot;source=texturename&amp;quot; in them, which points to the name of a tiled texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=1;&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [Snow]&lt;br /&gt;
 {&lt;br /&gt;
 	File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 	TileSize=20;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Tilesize is how big a single tile is in the 3D spring world, when the texture is tiled across the map. Imagine a heightmap of 1025x1025 (In spring world space this is 1024*8= 8192x8192 units). &lt;br /&gt;
When you set tilesize=4096, you will see the complete texture 4 times on the map (2 by 2). Set it to 8192 and you&#039;ll see the map completely covered. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Blendmap specification ====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
===== Blendmaps from file =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===== Generated blendmaps =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square two, with power-of-two dimensions like: 256x256, 512x512, 1024x1024.  They should be smaller than the heightmap.&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
&lt;br /&gt;
== Feature placement ==&lt;br /&gt;
&lt;br /&gt;
The feature specification is done with a list of feature type names in the SM3 itself, and with an binary datafile that contains all the feature positions, orientations.&lt;br /&gt;
Feature types are specified like this:&lt;br /&gt;
&lt;br /&gt;
 [FeatureTypes]&lt;br /&gt;
 {&lt;br /&gt;
 	NumTypes=4;&lt;br /&gt;
 	type0=TreeType0;     // a tree&lt;br /&gt;
 	type1=MyFeature; &lt;br /&gt;
 	type2=MyOtherFeature;&lt;br /&gt;
 	type3=GeoVent;            // a geothermal	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The feature binary file should be made with an editor. I&#039;m hoping Maelstrom will add feature placing to his startpoint editor, but until then there&#039;s only http://user.supradigital.org/jcnossen/FeaturePlacer.zip&lt;br /&gt;
&lt;br /&gt;
[[Image:Featureplacer.png]]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Pos:&amp;quot; fields are ment to enter the feature X,Y,Z. You can use zero for Y because spring will automatically put the feature on the ground when it loads.&lt;br /&gt;
Type is the index into the feature type list specified in the SM3 file.&lt;br /&gt;
&lt;br /&gt;
The feature data file should be linked to the SM3 with:&lt;br /&gt;
&lt;br /&gt;
 [map]&lt;br /&gt;
 {&lt;br /&gt;
      ..  other map tags ...&lt;br /&gt;
&lt;br /&gt;
      featuredata=FeatureDataFileName;&lt;br /&gt;
&lt;br /&gt;
      ..  other map tags ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16102</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16102"/>
		<updated>2006-10-04T19:58:27Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: /* Feature placement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section. It also has  an extra tag in LIGHT (GroundSpecularColor):&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [LIGHT]&lt;br /&gt;
 {&lt;br /&gt;
 // specular color, defaults to 0.1 0.1 0.1&lt;br /&gt;
 	GroundSpecularColor=0.3 0.3 0.3;&lt;br /&gt;
&lt;br /&gt;
   ... other standard tags shared with SMF (such as GroundSunColor)...&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 	SpecularExponent=16; // specular exponent AKA &lt;br /&gt;
 		//shininess or polishedness.  defaults to 8&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing method specification (how are the textures applied) ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
==== Tiled textures ====&lt;br /&gt;
&lt;br /&gt;
The operations usually have &amp;quot;source=texturename&amp;quot; in them, which points to the name of a tiled texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=1;&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [Snow]&lt;br /&gt;
 {&lt;br /&gt;
 	File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 	TileSize=20;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Tilesize is how big a single tile is in the 3D spring world, when the texture is tiled across the map. Imagine a heightmap of 1025x1025 (In spring world space this is 1024*8= 8192x8192 units). &lt;br /&gt;
When you set tilesize=4096, you will see the complete texture 4 times on the map (2 by 2). Set it to 8192 and you&#039;ll see the map completely covered. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Blendmap specification ====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
===== Blendmaps from file =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===== Generated blendmaps =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square two, with power-of-two dimensions like: 256x256, 512x512, 1024x1024.  They should be smaller than the heightmap.&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
&lt;br /&gt;
== Feature placement ==&lt;br /&gt;
&lt;br /&gt;
The feature specification is done with a list of feature type names in the SM3 itself, and with an binary datafile that contains all the feature positions, orientations.&lt;br /&gt;
Feature types are specified like this:&lt;br /&gt;
&lt;br /&gt;
 [FeatureTypes]&lt;br /&gt;
 {&lt;br /&gt;
	NumTypes=4;&lt;br /&gt;
 	type0=TreeType0;     // a tree&lt;br /&gt;
 	type1=MyFeature; &lt;br /&gt;
 	type2=MyOtherFeature;&lt;br /&gt;
 	type3=GeoVent;            // a geothermal	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The feature binary file should be made with an editor. I&#039;m hoping Maelstrom will add feature placing to his startpoint editor, but until then there&#039;s only http://user.supradigital.org/jcnossen/FeaturePlacer.zip&lt;br /&gt;
&lt;br /&gt;
[[Image:Featureplacer.png]]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Pos:&amp;quot; fields are ment to enter the feature X,Y,Z. You can use zero for Y because spring will automatically put the feature on the ground when it loads.&lt;br /&gt;
Type is the index into the feature type list specified in the SM3 file.&lt;br /&gt;
&lt;br /&gt;
The feature data file should be linked to the SM3 with:&lt;br /&gt;
&lt;br /&gt;
 [map]&lt;br /&gt;
 {&lt;br /&gt;
      ..  other map tags ...&lt;br /&gt;
&lt;br /&gt;
      featuredata=FeatureDataFileName;&lt;br /&gt;
&lt;br /&gt;
      ..  other map tags ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16101</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16101"/>
		<updated>2006-10-04T19:55:15Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section. It also has  an extra tag in LIGHT (GroundSpecularColor):&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [LIGHT]&lt;br /&gt;
 {&lt;br /&gt;
 // specular color, defaults to 0.1 0.1 0.1&lt;br /&gt;
 	GroundSpecularColor=0.3 0.3 0.3;&lt;br /&gt;
&lt;br /&gt;
   ... other standard tags shared with SMF (such as GroundSunColor)...&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 	SpecularExponent=16; // specular exponent AKA &lt;br /&gt;
 		//shininess or polishedness.  defaults to 8&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing method specification (how are the textures applied) ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
==== Tiled textures ====&lt;br /&gt;
&lt;br /&gt;
The operations usually have &amp;quot;source=texturename&amp;quot; in them, which points to the name of a tiled texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=1;&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [Snow]&lt;br /&gt;
 {&lt;br /&gt;
 	File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 	TileSize=20;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Tilesize is how big a single tile is in the 3D spring world, when the texture is tiled across the map. Imagine a heightmap of 1025x1025 (In spring world space this is 1024*8= 8192x8192 units). &lt;br /&gt;
When you set tilesize=4096, you will see the complete texture 4 times on the map (2 by 2). Set it to 8192 and you&#039;ll see the map completely covered. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Blendmap specification ====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
===== Blendmaps from file =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===== Generated blendmaps =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square two, with power-of-two dimensions like: 256x256, 512x512, 1024x1024.  They should be smaller than the heightmap.&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
&lt;br /&gt;
== Feature placement ==&lt;br /&gt;
&lt;br /&gt;
The feature specification is done with a list of feature type names in the SM3 itself, and with an binary datafile that contains all the feature positions, orientations.&lt;br /&gt;
Feature types are specified like this:&lt;br /&gt;
&lt;br /&gt;
 [FeatureTypes]&lt;br /&gt;
 {&lt;br /&gt;
	NumTypes=4;&lt;br /&gt;
 	type0=TreeType0;     // a tree&lt;br /&gt;
 	type1=MyFeature; &lt;br /&gt;
 	type2=MyOtherFeature;&lt;br /&gt;
 	type3=GeoVent;            // a geothermal	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The feature binary file should be made with an editor. I&#039;m hoping Maelstrom will add feature placing to his startpoint editor, but until then there&#039;s only http://user.supradigital.org/jcnossen/FeaturePlacer.zip&lt;br /&gt;
&lt;br /&gt;
[[Image:Featureplacer.png]]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Pos:&amp;quot; fields are ment to enter the feature X,Y,Z. You can use zero for Y because spring will automatically put the feature on the ground when it loads.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=File:Featureplacer.png&amp;diff=21733</id>
		<title>File:Featureplacer.png</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=File:Featureplacer.png&amp;diff=21733"/>
		<updated>2006-10-04T19:51:54Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: Screenshot of the example feature placer for SM3 maps&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot of the example feature placer for SM3 maps&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16100</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16100"/>
		<updated>2006-09-30T11:25:29Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section. It also has  an extra tag in LIGHT (GroundSpecularColor):&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [LIGHT]&lt;br /&gt;
 {&lt;br /&gt;
 // specular color, defaults to 0.1 0.1 0.1&lt;br /&gt;
 	GroundSpecularColor=0.3 0.3 0.3;&lt;br /&gt;
&lt;br /&gt;
   ... other standard tags shared with SMF (such as GroundSunColor)...&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 	SpecularExponent=16; // specular exponent AKA &lt;br /&gt;
 		//shininess or polishedness.  defaults to 8&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing method specification (how are the textures applied) ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
==== Tiled textures ====&lt;br /&gt;
&lt;br /&gt;
The operations usually have &amp;quot;source=texturename&amp;quot; in them, which points to the name of a tiled texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=1;&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [Snow]&lt;br /&gt;
 {&lt;br /&gt;
 	File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 	TileSize=20;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Tilesize is how big a single tile is in the 3D spring world, when the texture is tiled across the map. Imagine a heightmap of 1025x1025 (In spring world space this is 1024*8= 8192x8192 units). &lt;br /&gt;
When you set tilesize=4096, you will see the complete texture 4 times on the map (2 by 2). Set it to 8192 and you&#039;ll see the map completely covered. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Blendmap specification ====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
===== Blendmaps from file =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===== Generated blendmaps =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square two, with power-of-two dimensions like: 256x256, 512x512, 1024x1024.  They should be smaller than the heightmap.&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
&lt;br /&gt;
== Feature placement ==&lt;br /&gt;
&lt;br /&gt;
The feature specification is done with a list of feature type names in the SM3 itself, and with an binary datafile that contains all the feature positions, orientations.&lt;br /&gt;
Feature types are specified like this:&lt;br /&gt;
&lt;br /&gt;
 [FeatureTypes]&lt;br /&gt;
 {&lt;br /&gt;
	NumTypes=4;&lt;br /&gt;
 	type0=TreeType0;     // a tree&lt;br /&gt;
 	type1=MyFeature; &lt;br /&gt;
 	type2=MyOtherFeature;&lt;br /&gt;
 	type3=GeoVent;            // a geothermal	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The feature binary file should be made with editor...&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16099</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16099"/>
		<updated>2006-09-30T11:18:22Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section. It also has  an extra tag in LIGHT (GroundSpecularColor):&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [LIGHT]&lt;br /&gt;
 {&lt;br /&gt;
 // specular color, defaults to 0.1 0.1 0.1&lt;br /&gt;
 	GroundSpecularColor=0.3 0.3 0.3;&lt;br /&gt;
&lt;br /&gt;
   ... other standard tags shared with SMF (such as GroundSunColor)...&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 	SpecularExponent=16; // specular exponent AKA &lt;br /&gt;
 		//shininess or polishedness.  defaults to 8&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing method specification (how are the textures applied) ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
==== Tiled textures ====&lt;br /&gt;
&lt;br /&gt;
The operations usually have &amp;quot;source=texturename&amp;quot; in them, which points to the name of a tiled texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=1;&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [Snow]&lt;br /&gt;
 {&lt;br /&gt;
 	File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 	TileSize=20;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Tilesize is how big a single tile is in the 3D spring world, when the texture is tiled across the map. Imagine a heightmap of 1025x1025 (In spring world space this is 1024*8= 8192x8192 units). &lt;br /&gt;
When you set tilesize=4096, you will see the complete texture 4 times on the map (2 by 2). Set it to 8192 and you&#039;ll see the map completely covered. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Blendmap specification ====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
===== Blendmaps from file =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===== Generated blendmaps =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square two, with power-of-two dimensions like: 256x256, 512x512, 1024x1024.  They should be smaller than the heightmap.&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
&lt;br /&gt;
== Feature placement ==&lt;br /&gt;
&lt;br /&gt;
The feature specification is done with a list of feature type names in the SM3 itself, and with an binary datafile that contains all the feature positions, orientations.&lt;br /&gt;
Feature types are specified like this:&lt;br /&gt;
&lt;br /&gt;
 [FeatureTypes]&lt;br /&gt;
 {&lt;br /&gt;
 	type0=TreeType0;     // a tree&lt;br /&gt;
 	type1=MyFeature; &lt;br /&gt;
 	canBeAnyUniqueName=MyOtherFeature;&lt;br /&gt;
 	t3=GeoVent;            // a geothermal	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The feature binary file should be made with editor...&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Projectiles.txt&amp;diff=15531</id>
		<title>Projectiles.txt</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Projectiles.txt&amp;diff=15531"/>
		<updated>2006-09-28T01:21:27Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; Class: CTracerProjectile.  Scriptname: tracer&lt;br /&gt;
 	length: float&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Class: CSmokeProjectile2.  Scriptname: smoke2&lt;br /&gt;
 	color: float&lt;br /&gt;
 	ageSpeed: float&lt;br /&gt;
 	size: float&lt;br /&gt;
 	startSize: float&lt;br /&gt;
 	sizeExpansion: float&lt;br /&gt;
 	wantedPos: float3&lt;br /&gt;
 	glowFalloff: float&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Class: CSmokeProjectile.  Scriptname: smoke&lt;br /&gt;
 	color: float&lt;br /&gt;
 	size: float&lt;br /&gt;
 	startSize: float&lt;br /&gt;
 	sizeExpansion: float&lt;br /&gt;
 	ageSpeed: float&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Class: CSimpleParticleSystem.  Scriptname: simpleparticlesystem&lt;br /&gt;
 	emitVector: float3&lt;br /&gt;
 	emitSpread: float3&lt;br /&gt;
 	emitMul: float3&lt;br /&gt;
 	gravity: float3&lt;br /&gt;
 	colorMap: CColorMap*&lt;br /&gt;
 	texture: AtlasedTexture*&lt;br /&gt;
 	airdrag: float&lt;br /&gt;
 	particleLife: float&lt;br /&gt;
 	particleLifeSpread: float&lt;br /&gt;
 	numParticles: int&lt;br /&gt;
 	particleSpeed: float&lt;br /&gt;
 	particleSpeedSpread: float&lt;br /&gt;
 	particleSize: float&lt;br /&gt;
 	particleSizeSpread: float&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Class: CHeatCloudProjectile.  Scriptname: heatcloud&lt;br /&gt;
 	heat: float&lt;br /&gt;
 	maxheat: float&lt;br /&gt;
 	heatFalloff: float&lt;br /&gt;
 	size: float&lt;br /&gt;
 	sizeGrowth: float&lt;br /&gt;
 	sizemod: float&lt;br /&gt;
 	sizemodmod: float&lt;br /&gt;
 	texture: AtlasedTexture*&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Class: CGfxProjectile.  Scriptname: gfx&lt;br /&gt;
 	creationTime: int&lt;br /&gt;
 	lifeTime: int&lt;br /&gt;
 	color: uchar[4]&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Class: CDirtProjectile.  Scriptname: dirt&lt;br /&gt;
 	alpha: float&lt;br /&gt;
 	alphaFalloff: float&lt;br /&gt;
 	size: float&lt;br /&gt;
 	sizeExpansion: float&lt;br /&gt;
 	slowdown: float&lt;br /&gt;
 	color: float3&lt;br /&gt;
 	texture: AtlasedTexture*&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Class: CBitmapMuzzleFlame.  Scriptname: bitmapmuzzleflame&lt;br /&gt;
 	sideTexture: AtlasedTexture*&lt;br /&gt;
 	frontTexture: AtlasedTexture*&lt;br /&gt;
 	dir: float3&lt;br /&gt;
 	colorMap: CColorMap*&lt;br /&gt;
 	size: float&lt;br /&gt;
 	length: float&lt;br /&gt;
 	sizeGrowth: float&lt;br /&gt;
 	ttl: int&lt;br /&gt;
 	frontOffset: float&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Monthly_Topic_Rotation&amp;diff=14717</id>
		<title>Monthly Topic Rotation</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Monthly_Topic_Rotation&amp;diff=14717"/>
		<updated>2006-08-30T00:22:27Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;quot;Monthy Topic Rotation&amp;quot; is a term coined by Gnome referring to the fact that people keep coming into the forums and posting messages on the same subject.  It seems that as Spring becomes more popular, more new people keep coming up with the same ideas and questions... think of this as the &amp;quot;Is your idea original?&amp;quot; FAQ as opposed to the &amp;quot;real&amp;quot; [[FAQ]].&lt;br /&gt;
&lt;br /&gt;
Now in some situations it&#039;s okay to repost on the same topic, if it has been only mentioned before in other people&#039;s topics or if you make reference to the fact that it is a known issue you are addressing with new ideas... but that doesn&#039;t excuse you from the list.  One way or the other, the community might make fun of you for rehashing old topics, expecially when they aren&#039;t forgotten so much as people are bored of talking about them.&lt;br /&gt;
&lt;br /&gt;
This has now turned into a sort of game. You can see the current scores here: http://maelstrom.niiil.com/?l=mtr (Note from a visitor: link seems to be down)&lt;br /&gt;
&lt;br /&gt;
=The Topics=&lt;br /&gt;
&#039;&#039;&#039;List of Generic Topics with brief discussion and list of topics posted on these subjects for quick reference:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===OTA Style Music===&lt;br /&gt;
Requests or Suggestions that the engine include music playback, especially music that changes depending on what kind of action is happening in game.  Associated with requests for a sound track of any kind or asking for a link to get the orriginal TA Soundtrack in MP3 format.&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2856 Soundtracks.]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2786&amp;amp;highlight=music Original TA music]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2640&amp;amp;highlight=music TA Style music]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2363&amp;amp;highlight=music Music Player code]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2348&amp;amp;highlight=music Is original music needed?]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?p=80030#80030 Music support?]&lt;br /&gt;
&lt;br /&gt;
As a subnote, many of Spring&#039;s pre beta members have been working on code to get the music working, while yet others have spent time studying other games and their setups. Current thinking is of a THE SIMS style, where you can specify your own music.&lt;br /&gt;
&lt;br /&gt;
===Raise/Lower Terrain===&lt;br /&gt;
People suggesting or requesting some kind of better control over deformable terrain or some kind of terraforming unit.  Often associated with people posting pictures of cool effects they have achieved through the use of the current &amp;quot;blow a big hole and then restore to the desired surface&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2838 Raise/Lower Terrain?]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=6346 Terraforming]&lt;br /&gt;
&lt;br /&gt;
===Camera Angles===&lt;br /&gt;
suggesting changes to current camera angles, popularly related to the inability of the rotatable and FPS cams to go outside the map boundries, making it difficult to see units close to the edges of the map.&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2821 The #2 item on my wishlist]&lt;br /&gt;
&lt;br /&gt;
Also, there&#039;s the problem of the world stopping at a rather steep drop.&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2789 What is good, and what is bad]&lt;br /&gt;
&lt;br /&gt;
===The New GUI===&lt;br /&gt;
Anything related to how bad the current GUI is, suggestions for features that already exists but users do not know about because they are barely documented, or simply threads asking for or about the new GUI.&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2801 New GUI questions]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=1994 New GUI testing]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?p=35418 Wheres the new gui?]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=1643 re: about the newGUI]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=4110 New &amp;quot;Interface&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
===Multiple transport load sharing via cable hooks===&lt;br /&gt;
Seriously WTF, this isn&#039;t even a good idea, why does this keep coming up?&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2621 Transports]&lt;br /&gt;
&lt;br /&gt;
===Mobile factories===&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2017 Rise and walk, or how my factorie grew legs (and wings too).]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2809#38534 &amp;quot;Build pads&amp;quot; for units]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?p=35072#35072 air based factories for FF]&lt;br /&gt;
&lt;br /&gt;
===Day and Night===&lt;br /&gt;
&lt;br /&gt;
Wouldn&#039;t it be pretty to see a tank&#039;s headlights in the dark? Even prettier would be to have a dynamic sun to go with it. =) Watch the mountain&#039;s shadows lengthen...&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?p=5514#5514 Reviving the request list]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=1598 Day and Night]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=552 how about night and day]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2872 Gameplay idea: Night]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FPS mode hud/movement changes===&lt;br /&gt;
Lots of people don&#039;t think the FPS mode implimentation is being all that it can be.  They love to make forum topics about it.&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2917 Regarding the FPS &amp;quot;gimmick&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
===Game lobby moderators===&lt;br /&gt;
A well known issue. People always seem to request it...&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2770 Client moderators]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=3065 We need moderators]&lt;br /&gt;
&lt;br /&gt;
===Gaia Player===&lt;br /&gt;
&lt;br /&gt;
Subject specific threads:&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=1410 first one?]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=3189 Almost directly related]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=1204 This is the last one]&lt;br /&gt;
&lt;br /&gt;
But this request appears in random threads every now and then.&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=3154&amp;amp;start=20 is gaia in cvs? Alantai says so.]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2791], [http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2627], [http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2293&amp;amp;start=20], [http://taspring.clan-sy.com/phpbb/viewtopic.php?t=1395].&lt;br /&gt;
&lt;br /&gt;
===Improved feature reactivity===&lt;br /&gt;
&lt;br /&gt;
Bridges that you can acctually walk on, better hit detection, there are lots of improvements that could be made to the way spring units, models, and features react to eachother in the most basic sense.  Often they are mentioned in the same topic.  &lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?p=48196#48196 3D Collission Mesh?]&lt;br /&gt;
&lt;br /&gt;
===Spherical/Looping/Endless maps===&lt;br /&gt;
&lt;br /&gt;
A number of options are available for making the map &amp;quot;go on forever&amp;quot;... and apparently the &#039;&#039;&#039;new&#039;&#039;&#039; new map format includes support for extanding the map behond the playable area of the map (no more ugly edges).&lt;br /&gt;
&lt;br /&gt;
Usually what is being suggested if for maps to just loop, refered to a sphere but more like a &amp;quot;double cylinder&amp;quot; or &amp;quot;Torus&amp;quot;... some people basically think we could just &amp;quot;warp&amp;quot; units to the other side of the map, but issues have been brought up with ranged weapons, line of sight and figuring out where shots are coming from. If you go WAY WAY back you can even see this idea included in an idea for an MMORTS based on the spring engine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?p=64751#64751 Monster Truck Madness 2? Looping Maps.]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=4065 Even MORE 3D]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=3275 Spherical Maps]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=473 stop talking about this!!!]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=655 Does anyone Want This?]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=870&amp;amp;highlight=mmorts Multiple Maps Linked together... would also require being able to join a battle already in progress]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What is that map with the trees... (and others)===&lt;br /&gt;
&lt;br /&gt;
Ok, so its a map, but me, and others I&#039;m sure are fed up of repeting ourselves... The map with trees is NOT availble for download. Its part of aGorms imagination. Unfortunatly the engin currentlyt can&#039;t handel the trees very well so its not released... You will see the screen alot because... well people think its a realy good screen.&lt;br /&gt;
&lt;br /&gt;
See the said screen:&lt;br /&gt;
[http://taspring.clan-sy.com/screenshots/screen87.jpg The Tree Map]&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?p=99835#99835 Spring on Wikipedia]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=5707&amp;amp;highlight=whats+map  What&#039;s this wiki map]&lt;br /&gt;
&lt;br /&gt;
===Rewinding Replays===&lt;br /&gt;
&lt;br /&gt;
Many people want stuff such as a .jumpto (time) command, or the ability to rewind during a replay. The nature of replays and the spring simulation implies that rewinding can never happen, so discussing this is really pointless.&lt;br /&gt;
&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=6009 Rewinding for Replays?]&lt;br /&gt;
&lt;br /&gt;
[[Category:Content]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16098</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16098"/>
		<updated>2006-08-16T00:52:16Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: /* Map specification */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section. It also has  an extra tag in LIGHT (GroundSpecularColor):&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [LIGHT]&lt;br /&gt;
 {&lt;br /&gt;
 // specular color, defaults to 0.1 0.1 0.1&lt;br /&gt;
 	GroundSpecularColor=0.3 0.3 0.3;&lt;br /&gt;
&lt;br /&gt;
   ... other standard tags shared with SMF (such as GroundSunColor)...&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 	SpecularExponent=16; // specular exponent AKA &lt;br /&gt;
 		//shininess or polishedness.  defaults to 8&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing method specification (how are the textures applied) ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
==== Tiled textures ====&lt;br /&gt;
&lt;br /&gt;
The operations usually have &amp;quot;source=texturename&amp;quot; in them, which points to the name of a tiled texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=1;&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [Snow]&lt;br /&gt;
 {&lt;br /&gt;
 	File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 	TileSize=20;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Tilesize is how big a single tile is in the 3D spring world, when the texture is tiled across the map. Imagine a heightmap of 1025x1025 (In spring world space this is 1024*8= 8192x8192 units). &lt;br /&gt;
When you set tilesize=4096, you will see the complete texture 4 times on the map (2 by 2). Set it to 8192 and you&#039;ll see the map completely covered. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Blendmap specification ====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
===== Blendmaps from file =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===== Generated blendmaps =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square two, with power-of-two dimensions like: 256x256, 512x512, 1024x1024.  They should be smaller than the heightmap.&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* map features&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16097</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16097"/>
		<updated>2006-08-16T00:51:23Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [LIGHT]&lt;br /&gt;
 {&lt;br /&gt;
 // specular color, defaults to 0.1 0.1 0.1&lt;br /&gt;
 	GroundSpecularColor=0.3 0.3 0.3;&lt;br /&gt;
&lt;br /&gt;
   ... other standard tags shared with SMF (such as GroundSunColor)...&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 	SpecularExponent=16; // specular exponent AKA &lt;br /&gt;
 		//shininess or polishedness.  defaults to 8&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing method specification (how are the textures applied) ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
==== Tiled textures ====&lt;br /&gt;
&lt;br /&gt;
The operations usually have &amp;quot;source=texturename&amp;quot; in them, which points to the name of a tiled texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=1;&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [Snow]&lt;br /&gt;
 {&lt;br /&gt;
 	File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 	TileSize=20;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Tilesize is how big a single tile is in the 3D spring world, when the texture is tiled across the map. Imagine a heightmap of 1025x1025 (In spring world space this is 1024*8= 8192x8192 units). &lt;br /&gt;
When you set tilesize=4096, you will see the complete texture 4 times on the map (2 by 2). Set it to 8192 and you&#039;ll see the map completely covered. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Blendmap specification ====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
===== Blendmaps from file =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===== Generated blendmaps =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square two, with power-of-two dimensions like: 256x256, 512x512, 1024x1024.  They should be smaller than the heightmap.&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* map features&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SetupGuide&amp;diff=16361</id>
		<title>SetupGuide</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SetupGuide&amp;diff=16361"/>
		<updated>2006-08-07T21:23:27Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Linux Setup Guide ==&lt;br /&gt;
* If you&#039;re running [http://www.gentoo.org Gentoo linux], you&#039;re lucky, because [http://developer.berlios.de/project/showfiles.php?group_id=4358 an ebuild is already available]. If not, a short walk-trough to compile, run and debug spring on provided below.&lt;br /&gt;
&lt;br /&gt;
* In short, to get spring compiled under linux, make sure you&#039;ve got all necessary development packages installed. On [http://www.ubuntu.com/ (K)Ubuntu linux], and maybe [http://www.debian.org/ Debian] too, this can be done by copying the following in a root terminal (or use the graphical package manager Synaptic or Adept if you can&#039;t stand commandline):&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;apt-get install build-essential subversion scons libsdl-dev libopenal-dev libglew-dev libboost-dev libboost-thread-dev libboost-filesystem-dev libboost-regex-dev libdevil-dev libfreetype6-dev python2.4-dev&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;For any other distribution, grab these libraries and the base development packages too (for Gentoo, base development packages aren&#039;t needed, because everything is compiled from source: they&#039;re already installed). I&#039;ve no clue about RPM based distros. But [http://www.google.com google] is your friend.&lt;br /&gt;
&lt;br /&gt;
* Grab the latest work-in-progress sourcecode from subversion (using commandline SVN): &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;svn co https://taspring.clan-sy.com/svn/spring/trunk&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; Or look in https://taspring.clan-sy.com/svn/spring/tags/ for the last official release.&lt;br /&gt;
&lt;br /&gt;
* To compile the sourcecode, switch to the trunk directory created by the svn checkout in the previous step. Then type: &amp;lt;code&amp;gt;scons configure&amp;lt;/code&amp;gt; to configure the build. (You can fine tune the build by passing options to this command [for enabling debugging/optimizing etc.]. Type &amp;lt;code&amp;gt;scons --help&amp;lt;/code&amp;gt; to view the available options.) Now, if you really installed all development package, the scons configure will output: &amp;quot;Everything seems OK. Run `scons&#039; now to build.&amp;quot;. If it outputs with an error you&#039;re probably missing a development package. &lt;br /&gt;
&lt;br /&gt;
* As instructed on end of previous step, type: &amp;lt;code&amp;gt;scons&amp;lt;/code&amp;gt; Spring will now build including [[NTAI]], [[JCAI]] and a few [[GroupAI]]s. You should end up with a file &amp;lt;code&amp;gt;trunk/game/spring&amp;lt;/code&amp;gt; (the executable) and some shared objects (SOs or DLLs) in &amp;lt;code&amp;gt;trunk/game/aidll&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Now, grab [https://developer.berlios.de/project/showfiles.php?group_id=4358 the linux data tarball] and extract it somewhere. This will create a directory taspring-linux-data-0.71b1 (or higher version number).&lt;br /&gt;
&lt;br /&gt;
* Put a symlink to the spring executable in the data directory:&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;ln -s /path/to/trunk/game/spring /path/to/taspring-linux-data-0.71b1/spring&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Optionally, make symlinks for the shared objects in &amp;lt;code&amp;gt;trunk/game/aidll too&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Now run spring by &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt;&#039;ing (change dir) to the &amp;lt;code&amp;gt;taspring-linux-data-0.71b1&amp;lt;/code&amp;gt; directory and typing: &amp;lt;code&amp;gt;./spring&amp;lt;/code&amp;gt; If you&#039;ve compiled with debugging enabled, you might want to run inside gdb to provide the devs with a backtrace if spring crashes: &amp;lt;code&amp;gt;gdb ./spring&amp;lt;/code&amp;gt;&lt;br /&gt;
** Basic commands inside gdb are: &lt;br /&gt;
*** &amp;lt;code&amp;gt;&#039;&#039;&#039;r&#039;&#039;&#039;un&amp;lt;/code&amp;gt; - Run the program (spring) &lt;br /&gt;
*** &amp;lt;code&amp;gt;&#039;&#039;&#039;bt&#039;&#039;&#039;&amp;lt;/code&amp;gt; - Print a backtrace &lt;br /&gt;
*** &amp;lt;code&amp;gt;&#039;&#039;&#039;q&#039;&#039;&#039;uit&amp;lt;/code&amp;gt; - Quit &lt;br /&gt;
*** &amp;lt;code&amp;gt;&#039;&#039;&#039;help&#039;&#039;&#039;&amp;lt;/code&amp;gt; - This one&#039;s important&lt;br /&gt;
&lt;br /&gt;
* Be happy!&lt;br /&gt;
&lt;br /&gt;
Tips:&lt;br /&gt;
&lt;br /&gt;
* Checkout [http://www.fileuniverse.com File Universe] for much more maps &amp;amp; mods.&lt;br /&gt;
* If spring hangs/crashes while in full screen mode, you can press ctrl+alt+backspace to restart X, so no need for a reboot.&lt;br /&gt;
* A binary release of [[AAI]], a skirmish AI, is included in the data package.&lt;br /&gt;
* Spring uses OpenAL for sound, Config your sound output i.e esd / arts / oss / alsa by editing /etc/openalrc  or ~/.openalrc&lt;br /&gt;
&lt;br /&gt;
If you really can&#039;t figure out how to get spring compiled, or you think there&#039;s a bug in the code or the buildsystem...&lt;br /&gt;
* just poke any developer on IRC&lt;br /&gt;
** channel &amp;lt;code&amp;gt;#taspring&amp;lt;/code&amp;gt; on [http://freenode.net/ FreeNode]&lt;br /&gt;
** or channel &amp;lt;code&amp;gt;#sy&amp;lt;/code&amp;gt; on [http://www.quakenet.org/ QuakeNet]&lt;br /&gt;
* post it on the forum&lt;br /&gt;
* or file a bug in our [http://taspring.clan-sy.com/mantis/ Bug tracking system].&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux Port]][[Category:Playing]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17069</id>
		<title>SpringEngineTODO</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17069"/>
		<updated>2006-08-02T20:12:46Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a TODO list for anyone interested in developing the spring code. If you are not involved in the development, please contact one of the developers first, or mail to the mailing list before you add things here.&lt;br /&gt;
&lt;br /&gt;
* Implement saving/loading. There are a lot of direct LoadSave() functions in the game code, but the easier way would probably to finish the serialization in the class registration type interfaces (rts/System/creg), so everything can be serialized automatically. &lt;br /&gt;
&lt;br /&gt;
* [[Syncing System|Implement re-sync]]. After a sync problem is detected, and a re-sync of the random seed does not fix it the game would pause and use the rsync to adjust game state (current plan if for float3 data) to resync, as suggested by Jesse Schoch in [http://lolut.utbm.info/pipermail/taspring-linux/2006-February/000810.html]. After using rsync on it should be able to continue normally until the next sync error is detected.&lt;br /&gt;
&lt;br /&gt;
* Abstract and improve unit rendering:&lt;br /&gt;
** Improve the S3O rendering: It doesn&#039;t generate nice explosion particles like the 3DO system, and it has other issues with drawing as well (refer to the s3o related threads on the forum for this, or test it and see for yourself).&lt;br /&gt;
** 3DO/S3O support is not abstracted, many parts of unit rendering are spread throughout spring and assume 3DO, and the rendering is a messy mixture of 3DO and S3O stuff. Abstracting the model rendering with a sort of IModel and IModelInstance interfaces would allow adding other model formats as well (Such as a skeletal animation format).&lt;br /&gt;
&lt;br /&gt;
* Improve weapon collision detection with more complex shapes for the bigger units. Giving every model a set of convex collision meshes, saved in the S3O file, could be a solution. This will need a change in the s3o format and upspring editor, so you will need some cooperate with me on that part(jcnossen).&lt;br /&gt;
&lt;br /&gt;
* Bind a scripting language to Spring. Fnordia already started on this with lua and luabind, but since luabind does not compile on GCC (so I&#039;ve heard), it&#039;s not an option. &lt;br /&gt;
**Binding LUA could be done in other ways too ofcourse. &lt;br /&gt;
**A lightweight and fast language that can call C/C++ directly is AngelScript ([[www.angelcode.com/angelscript]]), class support with inheritance is however not yet supported (WIP), but is already a good choice because it doesn&#039;t require wrapper functions.&lt;br /&gt;
**Squirrel is a more game orientated derivative of LUA and would be worth looking into. It supports classes directly as opposed to lua which &amp;quot;simulates&amp;quot; classes.&lt;br /&gt;
**It would be more work, but it could be possible to create a stripped down version of mono to integrate into spring. Then you can use any language Mono supports, with higher speed than the non-JIT scripting systems mentioned above.&lt;br /&gt;
&lt;br /&gt;
* Make more elements of spring data-driven. Explosion bitmaps, trees, etc... A lot of graphics are hardcoded and should be changeable with scripts or config files (FBI/TDF).&lt;br /&gt;
&lt;br /&gt;
* Implement a general sensor system replacing the radars, as described in http://taspring.clan-sy.com/phpbb/viewtopic.php?t=6105&lt;br /&gt;
&lt;br /&gt;
* Add a dynamic-lighting system: Allow units to have dynamic lights on them that affect lighting of other units and landscape, with sort of &amp;quot;approximating lights&amp;quot; for cases where a lot of units get close together. This is a big thing, but it would improve spring graphics a lot if done well.&lt;br /&gt;
&lt;br /&gt;
* Get a mac version working. Contact the developers on the mailing list for this, as there are people looking into this already.&lt;br /&gt;
&lt;br /&gt;
* Abstract the rendering and add an orthographic renderer for OTA style play on lower end systems.&lt;br /&gt;
&lt;br /&gt;
Even though this isn&#039;t really about the Spring engine:&lt;br /&gt;
&lt;br /&gt;
* Get a working multi platform lobby client capable of joining battles, hosting battles, browsing maps, etc. (everything TASClient [the windows lobby] is capable off). Language/Toolkit doesn&#039;t matter. There&#039;s omni (Python and WxWidgets) and qspring (C++ and Qt 4) in the works.&lt;br /&gt;
&lt;br /&gt;
* Make a proper configuration application, something that reads the settings from some sort of XML file with range, type and category information, and shows them nicely organized. As opposed to one big dialog full of options.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source development]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16096</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16096"/>
		<updated>2006-07-31T19:23:58Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing method specification (how are the textures applied) ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
==== Tiled textures ====&lt;br /&gt;
&lt;br /&gt;
The operations usually have &amp;quot;source=texturename&amp;quot; in them, which points to the name of a tiled texture.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=1;&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 [Snow]&lt;br /&gt;
 {&lt;br /&gt;
 	File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 	TileSize=20;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Tilesize is how big a single tile is in the 3D spring world, when the texture is tiled across the map. Imagine a heightmap of 1025x1025 (In spring world space this is 1024*8= 8192x8192 units). &lt;br /&gt;
When you set tilesize=4096, you will see the complete texture 4 times on the map (2 by 2). Set it to 8192 and you&#039;ll see the map completely covered. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Blendmap specification ====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
===== Blendmaps from file =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===== Generated blendmaps =====&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square two, with power-of-two dimensions like: 256x256, 512x512, 1024x1024.  They should be smaller than the heightmap.&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* map features&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* bumpmapping&lt;br /&gt;
* specular mapping&lt;br /&gt;
* a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16095</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16095"/>
		<updated>2006-07-31T19:11:45Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: /* Image file sizes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing specification ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
== Texture specification ==&lt;br /&gt;
&lt;br /&gt;
== Blendmap specification ==&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
=== Blendmaps from file ===&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Generated blendmaps ===&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square two, with power-of-two dimensions like: 256x256, 512x512, 1024x1024.  They should be smaller than the heightmap.&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* map features&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* bumpmapping&lt;br /&gt;
* specular mapping&lt;br /&gt;
* a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16094</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16094"/>
		<updated>2006-07-31T19:11:32Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: /* Image file sizes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing specification ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
== Texture specification ==&lt;br /&gt;
&lt;br /&gt;
== Blendmap specification ==&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
=== Blendmaps from file ===&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Generated blendmaps ===&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square two, with power-of-two dimensions like: 256x256, 512x512, 1024x1024&lt;br /&gt;
They should be smaller than the heightmap.&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* map features&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* bumpmapping&lt;br /&gt;
* specular mapping&lt;br /&gt;
* a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16093</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16093"/>
		<updated>2006-07-26T10:08:27Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: Information on image sizes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing specification ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
== Texture specification ==&lt;br /&gt;
&lt;br /&gt;
== Blendmap specification ==&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
=== Blendmaps from file ===&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Generated blendmaps ===&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== Image file sizes ==&lt;br /&gt;
&lt;br /&gt;
* The heightmap has to be square and its dimensions have to be a power-of-two + 1, like 257x257, 513x513, 1025x1025&lt;br /&gt;
* The blendmaps have to be square two, with power-of-two dimensions like: 256x256, 512x512, 1024x1024&lt;br /&gt;
* The tiled textures should have power-of-two dimensions, but don&#039;t have to be square&lt;br /&gt;
* The minimap can be anything, but it will be resized to an image of 1024x1024. Specifying a 1024x1024 will allow faster loading because no resizing is needed.&lt;br /&gt;
* Typemap and metalmaps dimensions should be (heightmapsize - 1) / 2, so when the heightmap is 1025x1025, the typemap is 512x512.&lt;br /&gt;
* The heightmap can be any [http://openil.sourceforge.net/features.php DevIL] supported format, or RAW such as exported by terragen. All the other maps/texture files can only be a DevIL format.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* map features&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* bumpmapping&lt;br /&gt;
* specular mapping&lt;br /&gt;
* a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16092</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16092"/>
		<updated>2006-07-25T20:52:23Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: fix incorrect documentation for generated blendmaps + performance warning&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing specification ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the stages are directly executed on your videocard. This means the more stages you make the slower the map will render. &lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
== Texture specification ==&lt;br /&gt;
&lt;br /&gt;
== Blendmap specification ==&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
=== Blendmaps from file ===&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Generated blendmaps ===&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = SlopeTerm * HeightTerm * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* map features&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* bumpmapping&lt;br /&gt;
* specular mapping&lt;br /&gt;
* a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
* proper frustum culling, so big features work correctly (that is if features work at all;))&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making]]&lt;br /&gt;
[[Category:SM3 map format]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Map_development&amp;diff=13244</id>
		<title>Map development</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Map_development&amp;diff=13244"/>
		<updated>2006-07-25T18:09:50Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: Changed SM2 into SMF, sm2 was the older format before smf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Map making SM3=&lt;br /&gt;
&lt;br /&gt;
SM3 (Spring Mapformat 3) is getting allong nicely and maps using this format can be made. The following is documented so far.&lt;br /&gt;
&lt;br /&gt;
*[[SM3_Map_Format|jcnossen&#039;s brief description on how this mapformat works.]]&lt;br /&gt;
*[[SM3_FAQ|The first FAQ for the new mapformat.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:sm3-minimap-thumb.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Map making, SMF=&lt;br /&gt;
Maps, are a complex mixture of heightmaps and textures.&lt;br /&gt;
Fortunately, there are several people who share their knowledge with us.&lt;br /&gt;
There few tutorials will make your life as mapper a lot better.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Full Guides For Map Making ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Create_maps|aGorm&#039;s map creating Guide]]&lt;br /&gt;
*[[Map_Making_Guide|aGorms Ultimate Map Making Guide(unfinished)]]&lt;br /&gt;
*[[IceXuick_Map_Design_Help|IceXuicks Map creating Guide]]&lt;br /&gt;
*[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=3941 Forboding Angel&#039;s map creating Tutorial]&lt;br /&gt;
*[[Maps:Tutorial|Another tutorial from a designing point of view]]&lt;br /&gt;
*[[A_Complete_Map_Making_Tutorial|A Complete Map Making Tutorial (under construction)]]&lt;br /&gt;
*[[Runecrafter|Runecrafter&#039;s Map Tutorial]]&lt;br /&gt;
&lt;br /&gt;
== Specific Guides ==&lt;br /&gt;
&lt;br /&gt;
*[[Maps:SMD|Everything about .SMD]]&lt;br /&gt;
*[[Maps:Compiling|Everything about Compiling your map]]&lt;br /&gt;
*[[MapsBalance|Some things about map balance]]&lt;br /&gt;
&lt;br /&gt;
Features. Stones, rocks, trees, for your map can be found in [http://taspring.clan-sy.com/phpbb/viewtopic.php?t=4047 This thread]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mappers Clan ==&lt;br /&gt;
[[Map Making Guild]]: That weird fish aGorm set up a clan for poor mappers that can&#039;t get into a clan on there gaming merit... (Mainly for himself therefor...)&lt;br /&gt;
&lt;br /&gt;
== Reference and FAQs ==&lt;br /&gt;
&lt;br /&gt;
* [[Maps:Noob Mistakes]]&lt;br /&gt;
* [[Water Height: Mapconv vs. Heightmap]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
TIPS:&lt;br /&gt;
&lt;br /&gt;
A useful tip, on almost every map in a 1v1 you will start opposite your opponent unless you choose your position. this is because random order simply randomly distributes players at the default start points which in almost every map are opposite each other. One exception that I know of is flooded desert where you both start on the left hand island.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category:Map development]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17068</id>
		<title>SpringEngineTODO</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17068"/>
		<updated>2006-07-24T02:03:09Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a TODO list for anyone interested in developing the spring code. If you are not involved in the development, please contact one of the developers first, or mail to the mailing list before you add things here.&lt;br /&gt;
&lt;br /&gt;
* Implement saving/loading. There are a lot of direct LoadSave() functions in the game code, but the easier way would probably to finish the serialization in the class registration type interfaces (rts/System/creg), so everything can be serialized automatically. &lt;br /&gt;
&lt;br /&gt;
* [[Syncing System|Implement re-sync]]. After a sync problem is detected, and a re-sync of the random seed does not fix it the game would pause and use the rsync to adjust game state (current plan if for float3 data) to resync, as suggested by Jesse Schoch in [http://lolut.utbm.info/pipermail/taspring-linux/2006-February/000810.html]. After using rsync on it should be able to continue normally until the next sync error is detected.&lt;br /&gt;
&lt;br /&gt;
* Abstract and improve unit rendering:&lt;br /&gt;
** Improve the S3O rendering: It doesn&#039;t generate nice explosion particles like the 3DO system, and it has other issues with drawing as well (refer to the s3o related threads on the forum for this, or test it and see for yourself).&lt;br /&gt;
** 3DO/S3O support is not abstracted, many parts of unit rendering are spread throughout spring and assume 3DO, and the rendering is a messy mixture of 3DO and S3O stuff. Abstracting the model rendering with a sort of IModel and IModelInstance interfaces would allow adding other model formats as well (Such as a skeletal animation format).&lt;br /&gt;
&lt;br /&gt;
* Improve weapon collision detection with more complex shapes for the bigger units. Giving every model a set of convex collision meshes, saved in the S3O file, could be a solution. This will need a change in the s3o format and upspring editor, so you will need some cooperate with me on that part(jcnossen).&lt;br /&gt;
&lt;br /&gt;
* Bind a scripting language to Spring. Fnordia already started on this with lua and luabind, but since luabind does not compile on GCC (so I&#039;ve heard), it&#039;s not an option. &lt;br /&gt;
**Binding LUA could be done in other ways too ofcourse. &lt;br /&gt;
**A lightweight and fast language that can call C/C++ directly is AngelScript ([[www.angelcode.com/angelscript]]), class support with inheritance is however not yet supported (WIP), but is already a good choice because it doesn&#039;t require wrapper functions.&lt;br /&gt;
**Squirrel is a more game orientated derivative of LUA and would be worth looking into. It supports classes directly as opposed to lua which &amp;quot;simulates&amp;quot; classes.&lt;br /&gt;
**It would be more work, but it could be possible to create a stripped down version of mono to integrate into spring. Then you can use any language Mono supports, with higher speed than the non-JIT scripting systems mentioned above.&lt;br /&gt;
&lt;br /&gt;
* Make more elements of spring data-driven. Explosion bitmaps, trees, etc... A lot of graphics are hardcoded and should be changeable with scripts or config files (FBI/TDF).&lt;br /&gt;
&lt;br /&gt;
* Implement a general sensor system replacing the radars, as described in http://taspring.clan-sy.com/phpbb/viewtopic.php?t=6105&lt;br /&gt;
&lt;br /&gt;
* Add a dynamic-lighting system: Allow units to have dynamic lights on them that affect lighting of other units and landscape, with sort of &amp;quot;approximating lights&amp;quot; for cases where a lot of units get close together. This is a big thing, but it would improve spring graphics a lot if done well.&lt;br /&gt;
&lt;br /&gt;
* Get a mac version working. Contact the developers on the mailing list for this, as there are people looking into this already.&lt;br /&gt;
&lt;br /&gt;
* Abstract the rendering and add an orthographic renderer for OTA style play on lower end systems.&lt;br /&gt;
&lt;br /&gt;
Even though this isn&#039;t really about the Spring engine:&lt;br /&gt;
&lt;br /&gt;
* Get a working multi platform lobby client capable of joining battles, hosting battles, browsing maps, etc. (everything TASClient [the windows lobby] is capable off). Language/Toolkit doesn&#039;t matter. There&#039;s omni (Python and WxWidgets) and qspring (C++ and Qt 4) in the works.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source development]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16088</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16088"/>
		<updated>2006-07-20T15:13:59Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap:&#039;&#039;&#039; This should be either:&lt;br /&gt;
*An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
*A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HeightScale and HeightOffset:&#039;&#039;&#039; The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing specification ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Operation Add ====&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Multiply ====&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Operation Blend ====&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
== Texture specification ==&lt;br /&gt;
&lt;br /&gt;
== Blendmap specification ==&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
=== Blendmaps from file ===&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Generated blendmaps ===&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be generated from the heightmap. The final value is computed by&lt;br /&gt;
&lt;br /&gt;
 blendmap_value = (SlopeTerm + HeightTerm) * coverage * noise&lt;br /&gt;
&lt;br /&gt;
The slope of the terrain is a value between 0 and 1, with 0 being flat and 1 being completely steep. Ofcourse with a heightmap the slope can only be near 1 and not exactly 1&lt;br /&gt;
&lt;br /&gt;
The height of the terrain is between 0 and 1 (the minimum and maximum height value)&lt;br /&gt;
If the height is between minHeight and maxHeight, HeightTerm will be 1. maxHeightFuzzy and minHeightFuzzy determine the &amp;quot;border&amp;quot; size between having a HeightTerm of 0 and a HeightTerm of 1. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GeneratorLOD indicates at which resolution the blendmap should be generated. The blendmap size will be (heightmapsize-1) / (2 ^ generatorLOD). For example with a heightmap width of 1025 and a generatorlod of 2, the blendmap size will be 1024/4=256.&lt;br /&gt;
&lt;br /&gt;
(Images illustrating this will be added later)&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* map features&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* bumpmapping&lt;br /&gt;
* specular mapping&lt;br /&gt;
* a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
* proper frustum culling, so big features work correctly (that is if features work at all;))&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16086</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16086"/>
		<updated>2006-07-19T12:27:46Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Introduction&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Map specification&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap specification&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
Heightmap: This should be either&lt;br /&gt;
An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
HeightScale and HeightOffset:&lt;br /&gt;
The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Texturing specification &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Texture stages/layers &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
[texstage0]&lt;br /&gt;
{&lt;br /&gt;
 source=Snow;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; operation add &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
[texstage1]&lt;br /&gt;
{&lt;br /&gt;
 operation=add;&lt;br /&gt;
 source=CrackedDirt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; operation mul &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
[texstage1]&lt;br /&gt;
{&lt;br /&gt;
	operation=mul;&lt;br /&gt;
	source=CrackedDirt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; operation blend &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
[texstage1]&lt;br /&gt;
{&lt;br /&gt;
	operation=blend; &lt;br /&gt;
	source=CrackedDirt;&lt;br /&gt;
	blender=RockBlender1026;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture specification &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blendmap specification &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain. They are stretched across the full terrain, so in combination with the blend operation you can specify exactly where you want to see a specific texture on the terrain.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blendmaps from file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
[RockBlender]&lt;br /&gt;
{&lt;br /&gt;
	Blendmap=1;&lt;br /&gt;
	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Generated blendmaps&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tags (TODO: Document these):&lt;br /&gt;
* coverage&lt;br /&gt;
* noise&lt;br /&gt;
* minSlope&lt;br /&gt;
* maxSlope&lt;br /&gt;
* minSlopeFuzzy&lt;br /&gt;
* maxSlopeFuzzy&lt;br /&gt;
* maxHeight&lt;br /&gt;
* minHeight&lt;br /&gt;
* maxHeightFuzzy&lt;br /&gt;
* minHeightFuzzy&lt;br /&gt;
* generatorLOD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Infomaps&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; TODO &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* map features&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* bumpmapping&lt;br /&gt;
* specular mapping&lt;br /&gt;
* a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
* proper frustum culling, so big features work correctly (that is if features work at all;))&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16085</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16085"/>
		<updated>2006-07-18T01:03:35Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Introduction&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Map specification&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap specification&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
Heightmap: This should be either&lt;br /&gt;
An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
HeightScale and HeightOffset:&lt;br /&gt;
The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Texturing specification &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Texture stages/layers &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
[texstage0]&lt;br /&gt;
{&lt;br /&gt;
 source=Snow;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; operation add &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
[texstage1]&lt;br /&gt;
{&lt;br /&gt;
 operation=add;&lt;br /&gt;
 source=CrackedDirt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; operation mul &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
[texstage1]&lt;br /&gt;
{&lt;br /&gt;
	operation=mul;&lt;br /&gt;
	source=CrackedDirt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; operation blend &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
[texstage1]&lt;br /&gt;
{&lt;br /&gt;
	operation=blend; &lt;br /&gt;
	source=CrackedDirt;&lt;br /&gt;
	blender=RockBlender1026;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture specification &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blendmap specification &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blendmaps from file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
[RockBlender]&lt;br /&gt;
{&lt;br /&gt;
	Blendmap=1;&lt;br /&gt;
	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Generated blendmaps&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tags (TODO: Document these):&lt;br /&gt;
* coverage&lt;br /&gt;
* noise&lt;br /&gt;
* minSlope&lt;br /&gt;
* maxSlope&lt;br /&gt;
* minSlopeFuzzy&lt;br /&gt;
* maxSlopeFuzzy&lt;br /&gt;
* maxHeight&lt;br /&gt;
* minHeight&lt;br /&gt;
* maxHeightFuzzy&lt;br /&gt;
* minHeightFuzzy&lt;br /&gt;
* generatorLOD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Infomaps&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; TODO &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* map features&lt;br /&gt;
* dynamic shadow mapping support&lt;br /&gt;
* bumpmapping&lt;br /&gt;
* specular mapping&lt;br /&gt;
* a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
* shadowmap storage, so the resolution can be increased&lt;br /&gt;
* proper frustum culling, so big features work correctly (that is if features work at all;))&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16084</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16084"/>
		<updated>2006-07-18T01:03:17Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Introduction&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Map specification&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap specification&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
Heightmap: This should be either&lt;br /&gt;
An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
HeightScale and HeightOffset:&lt;br /&gt;
The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Texturing specification &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Texture stages/layers &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
[texstage0]&lt;br /&gt;
{&lt;br /&gt;
 source=Snow;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; operation add &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
[texstage1]&lt;br /&gt;
{&lt;br /&gt;
 operation=add;&lt;br /&gt;
 source=CrackedDirt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; operation mul &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
[texstage1]&lt;br /&gt;
{&lt;br /&gt;
	operation=mul;&lt;br /&gt;
	source=CrackedDirt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; operation blend &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
[texstage1]&lt;br /&gt;
{&lt;br /&gt;
	operation=blend; &lt;br /&gt;
	source=CrackedDirt;&lt;br /&gt;
	blender=RockBlender1026;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture specification &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blendmap specification &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blendmaps from file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
[RockBlender]&lt;br /&gt;
{&lt;br /&gt;
	Blendmap=1;&lt;br /&gt;
	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Generated blendmaps&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tags (TODO: Document these):&lt;br /&gt;
* coverage&lt;br /&gt;
* noise&lt;br /&gt;
* minSlope&lt;br /&gt;
* maxSlope&lt;br /&gt;
* minSlopeFuzzy&lt;br /&gt;
* maxSlopeFuzzy&lt;br /&gt;
* maxHeight&lt;br /&gt;
* minHeight&lt;br /&gt;
* maxHeightFuzzy&lt;br /&gt;
* minHeightFuzzy&lt;br /&gt;
* generatorLOD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Infomaps&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; TODO &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- map features&lt;br /&gt;
- dynamic shadow mapping support&lt;br /&gt;
- bumpmapping&lt;br /&gt;
- specular mapping&lt;br /&gt;
- a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
- shadowmap storage, so the resolution can be increased&lt;br /&gt;
- proper frustum culling, so big features work correctly (that is if features work at all;))&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16083</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16083"/>
		<updated>2006-07-18T01:02:01Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Introduction&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Map specification&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
   ... regular smd information, such as start positions,&lt;br /&gt;
     [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 [INFOMAPS]&lt;br /&gt;
 {&lt;br /&gt;
 	metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 	type=Maps/dry_data/typemap.png;&lt;br /&gt;
 }&lt;br /&gt;
 [TERRAIN]&lt;br /&gt;
 {&lt;br /&gt;
 	HeightScale=400.0;&lt;br /&gt;
 	HeightOffset=10.0;&lt;br /&gt;
 	Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
&lt;br /&gt;
 	NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
&lt;br /&gt;
 	[texstage0]&lt;br /&gt;
 	{&lt;br /&gt;
 		// the first texture stage operation is ignored&lt;br /&gt;
 		source=Snow;&lt;br /&gt;
 	}&lt;br /&gt;
 	[texstage1]&lt;br /&gt;
 	{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 		operation=blend; &lt;br /&gt;
 		source=CrackedDirt;&lt;br /&gt;
 		blender=RockBlender1026;&lt;br /&gt;
 	}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 	[CrackedDirt]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 		Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 		TileSize=50;&lt;br /&gt;
 	}&lt;br /&gt;
 	[Snow]&lt;br /&gt;
 	{&lt;br /&gt;
 		File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 		TileSize=20;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 	[RockBlender1026]&lt;br /&gt;
 	{&lt;br /&gt;
 		Blendmap=1;&lt;br /&gt;
 		File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Heightmap specification&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
Heightmap: This should be either&lt;br /&gt;
An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
HeightScale and HeightOffset:&lt;br /&gt;
The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Texturing specification &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Texture stages/layers &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
&lt;br /&gt;
[texstage0]&lt;br /&gt;
{&lt;br /&gt;
 source=Snow;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; operation add &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
[texstage1]&lt;br /&gt;
{&lt;br /&gt;
 operation=add;&lt;br /&gt;
 source=CrackedDirt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; operation mul &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
[texstage1]&lt;br /&gt;
{&lt;br /&gt;
	operation=mul;&lt;br /&gt;
	source=CrackedDirt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; operation blend &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
[texstage1]&lt;br /&gt;
{&lt;br /&gt;
	operation=blend; &lt;br /&gt;
	source=CrackedDirt;&lt;br /&gt;
	blender=RockBlender1026;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons:&lt;br /&gt;
This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture specification &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blendmap specification &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blendmaps from file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
[RockBlender]&lt;br /&gt;
{&lt;br /&gt;
	Blendmap=1;&lt;br /&gt;
	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Generated blendmaps&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tags (TODO: Document these):&lt;br /&gt;
* coverage&lt;br /&gt;
* noise&lt;br /&gt;
* minSlope&lt;br /&gt;
* maxSlope&lt;br /&gt;
* minSlopeFuzzy&lt;br /&gt;
* maxSlopeFuzzy&lt;br /&gt;
* maxHeight&lt;br /&gt;
* minHeight&lt;br /&gt;
* maxHeightFuzzy&lt;br /&gt;
* minHeightFuzzy&lt;br /&gt;
* generatorLOD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Infomaps&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039; TODO &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- map features&lt;br /&gt;
- dynamic shadow mapping support&lt;br /&gt;
- bumpmapping&lt;br /&gt;
- specular mapping&lt;br /&gt;
- a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
- shadowmap storage, so the resolution can be increased&lt;br /&gt;
- proper frustum culling, so big features work correctly (that is if features work at all;))&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16078</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16078"/>
		<updated>2006-07-17T21:47:12Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
    ... regular smd information, such as start positions,&lt;br /&gt;
            [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 	[INFOMAPS]&lt;br /&gt;
 	{&lt;br /&gt;
 		metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 		type=Maps/dry_data/typemap.png;&lt;br /&gt;
 	}&lt;br /&gt;
 	[TERRAIN]&lt;br /&gt;
 	{&lt;br /&gt;
 		HeightScale=400.0;&lt;br /&gt;
 		HeightOffset=10.0;&lt;br /&gt;
 		Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
 &lt;br /&gt;
 		NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 &lt;br /&gt;
 		[texstage0]&lt;br /&gt;
 		{&lt;br /&gt;
 			// the first texture stage operation is ignored&lt;br /&gt;
 			source=Snow;&lt;br /&gt;
 		}&lt;br /&gt;
 		[texstage1]&lt;br /&gt;
 		{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 			operation=blend; &lt;br /&gt;
 			source=CrackedDirt;&lt;br /&gt;
 			blender=RockBlender1026;&lt;br /&gt;
 		}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 		[CrackedDirt]&lt;br /&gt;
 		{&lt;br /&gt;
 			File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 			Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 			TileSize=50;&lt;br /&gt;
 		}&lt;br /&gt;
 		[Snow]&lt;br /&gt;
 		{&lt;br /&gt;
 			File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 			TileSize=20;&lt;br /&gt;
 		}&lt;br /&gt;
 		&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 		[RockBlender1026]&lt;br /&gt;
 		{&lt;br /&gt;
 			Blendmap=1;&lt;br /&gt;
 			File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
* Heightmap: This should be either&lt;br /&gt;
** An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
** A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
* HeightScale and HeightOffset:&lt;br /&gt;
  The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing specification ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== operation=add ====&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== operation=mul ====&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== operation=blend ====&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons: This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Texture specification ===&lt;br /&gt;
&lt;br /&gt;
=== Blendmap specification ===&lt;br /&gt;
Blendmaps can either be loaded from file or generated from the terrain&lt;br /&gt;
&lt;br /&gt;
==== Blendmaps from file ====&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Generated blendmaps ====&lt;br /&gt;
&lt;br /&gt;
Tags (TODO: Document these):&lt;br /&gt;
* coverage&lt;br /&gt;
* noise&lt;br /&gt;
* minSlope&lt;br /&gt;
* maxSlope&lt;br /&gt;
* minSlopeFuzzy&lt;br /&gt;
* maxSlopeFuzzy&lt;br /&gt;
* maxHeight&lt;br /&gt;
* minHeight&lt;br /&gt;
* maxHeightFuzzy&lt;br /&gt;
* minHeightFuzzy&lt;br /&gt;
* generatorLOD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
- map features&lt;br /&gt;
- dynamic shadow mapping support&lt;br /&gt;
- bumpmapping&lt;br /&gt;
- specular mapping&lt;br /&gt;
- a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
- shadowmap storage, so the resolution can be increased&lt;br /&gt;
- proper frustum culling, so big features work correctly (that is if features work at all;))&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16077</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16077"/>
		<updated>2006-07-17T21:45:16Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
    ... regular smd information, such as start positions,&lt;br /&gt;
            [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 	[INFOMAPS]&lt;br /&gt;
 	{&lt;br /&gt;
 		metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 		type=Maps/dry_data/typemap.png;&lt;br /&gt;
 	}&lt;br /&gt;
 	[TERRAIN]&lt;br /&gt;
 	{&lt;br /&gt;
 		HeightScale=400.0;&lt;br /&gt;
 		HeightOffset=10.0;&lt;br /&gt;
 		Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
 &lt;br /&gt;
 		NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 &lt;br /&gt;
 		[texstage0]&lt;br /&gt;
 		{&lt;br /&gt;
 			// the first texture stage operation is ignored&lt;br /&gt;
 			source=Snow;&lt;br /&gt;
 		}&lt;br /&gt;
 		[texstage1]&lt;br /&gt;
 		{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 			operation=blend; &lt;br /&gt;
 			source=CrackedDirt;&lt;br /&gt;
 			blender=RockBlender1026;&lt;br /&gt;
 		}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 		[CrackedDirt]&lt;br /&gt;
 		{&lt;br /&gt;
 			File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 			Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 			TileSize=50;&lt;br /&gt;
 		}&lt;br /&gt;
 		[Snow]&lt;br /&gt;
 		{&lt;br /&gt;
 			File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 			TileSize=20;&lt;br /&gt;
 		}&lt;br /&gt;
 		&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 		[GrassBlender] // a generated blender&lt;br /&gt;
 		{&lt;br /&gt;
 			Blendmap=1;&lt;br /&gt;
 			OriginHeight=10;&lt;br /&gt;
 			MaxHeight=0.5;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 		[RockBlender1026]&lt;br /&gt;
 		{&lt;br /&gt;
 			Blendmap=1;&lt;br /&gt;
 			File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
* Heightmap: This should be either&lt;br /&gt;
** An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
** A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
* HeightScale and HeightOffset:&lt;br /&gt;
  The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing specification ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== operation=add ====&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== operation=mul ====&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== operation=blend ====&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons: This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Texture specification ===&lt;br /&gt;
&lt;br /&gt;
=== Blendmap specification ===&lt;br /&gt;
==== Blendmaps from file ====&lt;br /&gt;
Blendmaps can be loaded from any grayscale file that DevIL can load:&lt;br /&gt;
 [RockBlender]&lt;br /&gt;
 {&lt;br /&gt;
 	Blendmap=1;&lt;br /&gt;
 	File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Generated blendmaps ====&lt;br /&gt;
&lt;br /&gt;
Tags (TODO: Document these):&lt;br /&gt;
* coverage&lt;br /&gt;
* noise&lt;br /&gt;
* minSlope&lt;br /&gt;
* maxSlope&lt;br /&gt;
* minSlopeFuzzy&lt;br /&gt;
* maxSlopeFuzzy&lt;br /&gt;
* maxHeight&lt;br /&gt;
* minHeight&lt;br /&gt;
* maxHeightFuzzy&lt;br /&gt;
* minHeightFuzzy&lt;br /&gt;
* generatorLOD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
- map features&lt;br /&gt;
- dynamic shadow mapping support&lt;br /&gt;
- bumpmapping&lt;br /&gt;
- specular mapping&lt;br /&gt;
- a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
- shadowmap storage, so the resolution can be increased&lt;br /&gt;
- proper frustum culling, so big features work correctly (that is if features work at all;))&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16076</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16076"/>
		<updated>2006-07-17T21:19:06Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
    ... regular smd information, such as start positions,&lt;br /&gt;
            [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 	[INFOMAPS]&lt;br /&gt;
 	{&lt;br /&gt;
 		metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 		type=Maps/dry_data/typemap.png;&lt;br /&gt;
 	}&lt;br /&gt;
 	[TERRAIN]&lt;br /&gt;
 	{&lt;br /&gt;
 		HeightScale=400.0;&lt;br /&gt;
 		HeightOffset=10.0;&lt;br /&gt;
 		Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
 &lt;br /&gt;
 		NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 &lt;br /&gt;
 		[texstage0]&lt;br /&gt;
 		{&lt;br /&gt;
 			// the first texture stage operation is ignored&lt;br /&gt;
 			source=Snow;&lt;br /&gt;
 		}&lt;br /&gt;
 		[texstage1]&lt;br /&gt;
 		{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 			operation=blend; &lt;br /&gt;
 			source=CrackedDirt;&lt;br /&gt;
 			blender=RockBlender1026;&lt;br /&gt;
 		}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 		[CrackedDirt]&lt;br /&gt;
 		{&lt;br /&gt;
 			File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 			Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 			TileSize=50;&lt;br /&gt;
 		}&lt;br /&gt;
 		[Snow]&lt;br /&gt;
 		{&lt;br /&gt;
 			File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 			TileSize=20;&lt;br /&gt;
 		}&lt;br /&gt;
 		&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 		[GrassBlender] // a generated blender&lt;br /&gt;
 		{&lt;br /&gt;
 			Blendmap=1;&lt;br /&gt;
 			OriginHeight=10;&lt;br /&gt;
 			MaxHeight=0.5;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 		[RockBlender1026]&lt;br /&gt;
 		{&lt;br /&gt;
 			Blendmap=1;&lt;br /&gt;
 			File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Heightmap specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags located in the [TERRAIN] section:&lt;br /&gt;
&lt;br /&gt;
* Heightmap: This should be either&lt;br /&gt;
** An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
** A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
* HeightScale and HeightOffset:&lt;br /&gt;
  The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
== Texturing specification ==&lt;br /&gt;
&lt;br /&gt;
=== Texture stages/layers ===&lt;br /&gt;
Texturing of SM3 terrains works by a series of texture layers that are applied on top of eachother. These layers are called &amp;quot;texture stages&amp;quot;. The stages can be added, multiplied, or alpha blended with the previous stage. This is defined by the stage operation. &lt;br /&gt;
&lt;br /&gt;
The number of stages is given with the tag NumTextureStages like:&lt;br /&gt;
 NumTextureStages=2;&lt;br /&gt;
 &lt;br /&gt;
The first stage never has an operation:&lt;br /&gt;
 [texstage0]&lt;br /&gt;
 {&lt;br /&gt;
 	source=Snow;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Following stages can have &amp;quot;operation=add&amp;quot;, &amp;quot;operation=mul&amp;quot;, &amp;quot;operation=blend&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== operation=add ====&lt;br /&gt;
The add operation needs a texture to add to the previous stage, which is specified with the &amp;quot;source=TextureName&amp;quot; tag. The texture specification is explained below.&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=add;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== operation=mul ====&lt;br /&gt;
Same as add, but with operation=mul&lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=mul;&lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== operation=blend ====&lt;br /&gt;
The blend operation does alpha blending with an extra grayscale alpha texture. Specification of these alpha textures (&amp;quot;Blendmaps&amp;quot;) is explained later in this doc. The blend operation needs a &amp;quot;blender=BlenderName&amp;quot; tag to work. I&#039;m guessing most maps will only be using this operation. &lt;br /&gt;
 [texstage1]&lt;br /&gt;
 {&lt;br /&gt;
 	operation=blend; &lt;br /&gt;
 	source=CrackedDirt;&lt;br /&gt;
 	blender=RockBlender1026;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The avaiable operations are limited to add/mul/blend for techical reasons: This way even the most complex maps can be executed with multipass operations on any card with at least 2 textures units. It would even work on a Riva TNT I think.&lt;br /&gt;
&lt;br /&gt;
Obviously because the first stage doesn&#039;t have any previous stage, the operation of the first stage is ignored&lt;br /&gt;
&lt;br /&gt;
=== Texture specification ===&lt;br /&gt;
&lt;br /&gt;
=== Blendmap specification ===&lt;br /&gt;
==== Blendmaps from file ====&lt;br /&gt;
&lt;br /&gt;
==== Generated blendmaps ====&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
- map features&lt;br /&gt;
- dynamic shadow mapping support&lt;br /&gt;
- bumpmapping&lt;br /&gt;
- specular mapping&lt;br /&gt;
- a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
- shadowmap storage, so the resolution can be increased&lt;br /&gt;
- proper frustum culling, so big features work correctly (that is if features work at all;))&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16075</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16075"/>
		<updated>2006-07-17T20:38:49Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: SM3 Map format specification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section and an [INFOMAPS] section:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [MAP]&lt;br /&gt;
 {&lt;br /&gt;
    ... regular smd information, such as start positions,&lt;br /&gt;
            [LIGHT],[WATER] and [ATMOSPHERE] sections...&lt;br /&gt;
&lt;br /&gt;
 	[INFOMAPS]&lt;br /&gt;
 	{&lt;br /&gt;
 		metal=Maps/dry_data/metalmap.png;&lt;br /&gt;
 		type=Maps/dry_data/typemap.png;&lt;br /&gt;
 	}&lt;br /&gt;
 	[TERRAIN]&lt;br /&gt;
 	{&lt;br /&gt;
 		HeightScale=400.0;&lt;br /&gt;
 		HeightOffset=10.0;&lt;br /&gt;
 		Heightmap=Maps/dry_data/1026.png;&lt;br /&gt;
 &lt;br /&gt;
 		NumTextureStages=2; // all texture stages are multiplied&lt;br /&gt;
 &lt;br /&gt;
 		[texstage0]&lt;br /&gt;
 		{&lt;br /&gt;
 			// the first texture stage operation is ignored&lt;br /&gt;
 			source=Snow;&lt;br /&gt;
 		}&lt;br /&gt;
 		[texstage1]&lt;br /&gt;
 		{&lt;br /&gt;
 // use the incoming alpha to blend between 2 textures&lt;br /&gt;
 			operation=blend; &lt;br /&gt;
 			source=CrackedDirt;&lt;br /&gt;
 			blender=RockBlender1026;&lt;br /&gt;
 		}&lt;br /&gt;
 /* texture definitions */&lt;br /&gt;
 		[CrackedDirt]&lt;br /&gt;
 		{&lt;br /&gt;
 			File=Maps/dry_data/dirt2.jpg;&lt;br /&gt;
 			Bumpmap=Maps/dry_data/dirt2_bm.jpg;&lt;br /&gt;
 			TileSize=50;&lt;br /&gt;
 		}&lt;br /&gt;
 		[Snow]&lt;br /&gt;
 		{&lt;br /&gt;
 			File=Maps/dry_data/Snow_Sand.jpg;&lt;br /&gt;
 			TileSize=20;&lt;br /&gt;
 		}&lt;br /&gt;
 		&lt;br /&gt;
 /* blender definition, all blenders have &amp;quot;Blendmap=1&amp;quot; */&lt;br /&gt;
 		[GrassBlender] // a generated blender&lt;br /&gt;
 		{&lt;br /&gt;
 			Blendmap=1;&lt;br /&gt;
 			OriginHeight=10;&lt;br /&gt;
 			MaxHeight=0.5;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 // a rock blender loaded from file for a specific map&lt;br /&gt;
 		[RockBlender1026]&lt;br /&gt;
 		{&lt;br /&gt;
 			Blendmap=1;&lt;br /&gt;
 			File=Maps/dry_data/1026_bm_small.png;&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Terrain specification ==&lt;br /&gt;
&lt;br /&gt;
The heightmap is specified with 3 tags:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Heightmap: This should be either&lt;br /&gt;
** An 8 or 16 bit image file readable by DevIL&lt;br /&gt;
** A 8 or 16 bit RAW file, such as generated by Terragen&lt;br /&gt;
* HeightScale and HeightOffset:&lt;br /&gt;
  The actual height of a heightmap pixel is calculated scaled by HeightScale, after which HeightOffset is added to it (height = pixel * HeightScale + HeightOffset)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infomaps ==&lt;br /&gt;
The infomaps section defines the metal map and typemap. Both should be 8 bit images in any format DevIL accepts.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
- map features&lt;br /&gt;
- dynamic shadow mapping support&lt;br /&gt;
- bumpmapping&lt;br /&gt;
- specular mapping&lt;br /&gt;
- a caching trick for very low end gfx hardware (partially done)&lt;br /&gt;
- shadowmap storage, so the resolution can be increased&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16074</id>
		<title>SM3 Map Format</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SM3_Map_Format&amp;diff=16074"/>
		<updated>2006-07-17T20:17:34Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: SM3 specification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As opposed to the original SMF renderer, the SM3 map renderer allows multiple texture layers rendered on the terrain. This allows for higher texture resolutions and (eventually) improved lighting such as bumpmapping/specular mapping.&lt;br /&gt;
&lt;br /&gt;
== Map specification ==&lt;br /&gt;
&lt;br /&gt;
Instead of a binary SMF file and a SMD file, all map information is now stored in a text based .SM3 file. This has the same basic layout as the original .SMD file, but it includes a [TERRAIN] section:&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG-OldInfo&amp;diff=3815</id>
		<title>CEG-OldInfo</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG-OldInfo&amp;diff=3815"/>
		<updated>2006-06-05T13:53:43Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Custom explosion generators ==&lt;br /&gt;
&lt;br /&gt;
=== What are they? ===&lt;br /&gt;
Custom explosions are small explosion scripts read from gamedata/explosions/*.tdf.&lt;br /&gt;
The explosion script specifies which particles/projectiles have to be created when the explosion happens, and their initial properties (position,speed,...)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Explosion script definition ===&lt;br /&gt;
&lt;br /&gt;
The explosion script directly specifies which C++ projectile classes have to be created, and also which properties the projectiles should have. &lt;br /&gt;
&lt;br /&gt;
The explosion script is structured like this:&lt;br /&gt;
&lt;br /&gt;
 [ExplosionScriptName]&lt;br /&gt;
 {&lt;br /&gt;
 	[projectile scriptname] // this specifies the class of the projectile&lt;br /&gt;
 	{&lt;br /&gt;
 		[properties]&lt;br /&gt;
 		{&lt;br /&gt;
 			size = 40;&lt;br /&gt;
 			sizeGrowth = -2;&lt;br /&gt;
 			pos = -30 r60, r30, -30 r60; // These codes are explained below&lt;br /&gt;
 			speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;&lt;br /&gt;
 		}&lt;br /&gt;
 		underwater=0; // should this projectile be created when underwater?&lt;br /&gt;
 		air=0;   // should this projectile be created when in air?&lt;br /&gt;
 		water=1; // should this projectile be created on water?&lt;br /&gt;
 		ground=1; // should this projectile be created when on ground?&lt;br /&gt;
 		count=10; // number of projectiles of this type&lt;br /&gt;
 	}&lt;br /&gt;
 .. other projectiles types can follow here ..&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Defaults for air/underwater/ground/water are zero.&lt;br /&gt;
Default of count is 1.&lt;br /&gt;
&lt;br /&gt;
=== Projectile properties ===&lt;br /&gt;
&lt;br /&gt;
To begin, you should run &lt;br /&gt;
 spring /p      (or &amp;quot;spring -p&amp;quot; on linux) &lt;br /&gt;
to let spring export &amp;quot;projectiles.txt&amp;quot;, which contains all the classes you can use in an explosion script. At the time of writing, this would contain [[projectiles.txt]]&lt;br /&gt;
&lt;br /&gt;
The items listed in &amp;quot;properties&amp;quot; are directly mapped to the class properties in projectiles.txt&lt;br /&gt;
The properties are specified with a bit of a cryptic syntax. You can use extra commands in them (r,d,i). For example this:&lt;br /&gt;
&lt;br /&gt;
 pos = -30 r60, r30, -30 r60; &lt;br /&gt;
&lt;br /&gt;
The x coordinate (specified with -30 r60) will be:  &lt;br /&gt;
 x = -30 + (Random value between 0 and 60);&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
 rX: add a number  between 0 and X&lt;br /&gt;
 iX: multiply the projectile index with X and add it. See the example for this below.&lt;br /&gt;
 dX: multiply the damage with X and add it.&lt;br /&gt;
&lt;br /&gt;
== Explosion script examples ==&lt;br /&gt;
&lt;br /&gt;
This is an example of a script that makes 10 smoke projectiles (yeah they should have been called particles, but they are handled by spring using the projectile system)&lt;br /&gt;
&lt;br /&gt;
 [ARM_HLT_Expl]&lt;br /&gt;
 {&lt;br /&gt;
 	[smoke]&lt;br /&gt;
 	{&lt;br /&gt;
 		[properties]&lt;br /&gt;
 		{&lt;br /&gt;
 			ageSpeed=0.04; // age increase per frame, when age &amp;gt;= 1 the particle is destroyed&lt;br /&gt;
 			size = 40;&lt;br /&gt;
 			sizeGrowth = -2;&lt;br /&gt;
 			pos = -30 r60, r30, -30 r60;&lt;br /&gt;
 			speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;&lt;br /&gt;
 		}&lt;br /&gt;
 		water=1;&lt;br /&gt;
 		ground=1;&lt;br /&gt;
 		count=10;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This particular script would be linked to with &amp;quot;explosiongenerator=custom:ARM_HLT_Expl;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here is an example that uses the index (i) command in the properties:&lt;br /&gt;
&lt;br /&gt;
 [heatcloud]&lt;br /&gt;
 {&lt;br /&gt;
 	[properties]&lt;br /&gt;
 	{&lt;br /&gt;
 		pos = 0, i20, 0;&lt;br /&gt;
 		heat = 10;&lt;br /&gt;
 		maxheat=10;&lt;br /&gt;
 		heatFalloff=1;&lt;br /&gt;
 		size = 30;&lt;br /&gt;
 	}&lt;br /&gt;
 	ground=1;&lt;br /&gt;
 	count=10;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This script creates a tower of heatcloud projectile. The first projectile gets y=0, the second y=20, y=40, y=60, .. and finally y=180&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to link a custom explosion to a weapon ===&lt;br /&gt;
&lt;br /&gt;
The weapon definitions needs to have this in it:&lt;br /&gt;
 explosiongenerator = custom:ExplosionScriptName;&lt;br /&gt;
&lt;br /&gt;
The explosion definition for ExplosionScriptName would be one of the TDF files in gamedata/explosions/&lt;br /&gt;
&lt;br /&gt;
You can also link the weapons for self-destruct and normal destruct to an explosion script.&lt;br /&gt;
&lt;br /&gt;
=== Adding ground flashes ===&lt;br /&gt;
&lt;br /&gt;
The ground flash is currently not an actual projectile, so it&#039;s specified in a different way:&lt;br /&gt;
 [ARM_HLT_Expl]&lt;br /&gt;
 {&lt;br /&gt;
      .. projectiles definitions ..&lt;br /&gt;
&lt;br /&gt;
 	[groundflash]&lt;br /&gt;
 	{&lt;br /&gt;
 		flashSize = 100;   // flash size&lt;br /&gt;
 		flashAlpha = 1;    // initial alpha of the flash&lt;br /&gt;
 		circleGrowth = 60; // size increase/frame&lt;br /&gt;
 		circleAlpha = 1;   // initial alpha of the ring&lt;br /&gt;
 		ttl = 10;          // number of frames&lt;br /&gt;
 		color = 0,0,1;    // color RGB&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG-OldInfo&amp;diff=3814</id>
		<title>CEG-OldInfo</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG-OldInfo&amp;diff=3814"/>
		<updated>2006-06-05T13:53:10Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Custom explosion generators ==&lt;br /&gt;
&lt;br /&gt;
=== What are they? ===&lt;br /&gt;
Custom explosions are small explosion scripts read from gamedata/explosions/*.tdf.&lt;br /&gt;
The explosion script specifies which particles/projectiles have to be created when the explosion happens, and their initial properties (position,speed,...)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Explosion script definition ===&lt;br /&gt;
&lt;br /&gt;
The explosion script directly specifies which C++ projectile classes have to be created, and also which properties the projectiles should have. &lt;br /&gt;
&lt;br /&gt;
The explosion script is structured like this:&lt;br /&gt;
&lt;br /&gt;
 [ExplosionScriptName]&lt;br /&gt;
 {&lt;br /&gt;
 	[projectile scriptname] // this specifies the class of the projectile&lt;br /&gt;
 	{&lt;br /&gt;
 		[properties]&lt;br /&gt;
 		{&lt;br /&gt;
 			size = 40;&lt;br /&gt;
 			sizeGrowth = -2;&lt;br /&gt;
 			pos = -30 r60, r30, -30 r60; // These codes are explained below&lt;br /&gt;
 			speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;&lt;br /&gt;
 		}&lt;br /&gt;
 		underwater=0; // should this projectile be created when underwater?&lt;br /&gt;
 		air=0;   // should this projectile be created when in air?&lt;br /&gt;
 		water=1; // should this projectile be created on water?&lt;br /&gt;
 		ground=1; // should this projectile be created when on ground?&lt;br /&gt;
 		count=10; // number of projectiles of this type&lt;br /&gt;
 	}&lt;br /&gt;
 .. other projectiles types can follow here ..&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Defaults for air/underwater/ground/water are zero.&lt;br /&gt;
Default of count is 1.&lt;br /&gt;
&lt;br /&gt;
=== Projectile properties ===&lt;br /&gt;
&lt;br /&gt;
To begin, you should run &lt;br /&gt;
 spring /p      (or &amp;quot;spring -p&amp;quot; on linux) &lt;br /&gt;
to let spring export &amp;quot;projectiles.txt&amp;quot;, which contains all the classes you can use in an explosion script. At the time of writing, this would contain [[projectiles.txt]]&lt;br /&gt;
&lt;br /&gt;
The items listed in &amp;quot;properties&amp;quot; are directly mapped to the class properties in projectiles.txt&lt;br /&gt;
The properties are specified with a bit of a cryptic syntax. You can use extra commands in them (r,d,i). For example this:&lt;br /&gt;
&lt;br /&gt;
 pos = -30 r60, r30, -30 r60; &lt;br /&gt;
&lt;br /&gt;
The x coordinate (specified with -30 r60) will be:  &lt;br /&gt;
 x = -30 + (Random value between 0 and 60);&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
 rX: add a number  between 0 and X&lt;br /&gt;
 iX: multiply the projectile index with X and add it. See the example for this below.&lt;br /&gt;
 dX: multiply the damage with X and add it.&lt;br /&gt;
&lt;br /&gt;
== Explosion script examples ==&lt;br /&gt;
&lt;br /&gt;
This is an example of a script that makes 10 smoke projectiles (yeah they should have been called particles, but they are handled by spring using the projectile system)&lt;br /&gt;
&lt;br /&gt;
 [ARM_HLT_Expl]&lt;br /&gt;
 {&lt;br /&gt;
 	[smoke]&lt;br /&gt;
 	{&lt;br /&gt;
 		[properties]&lt;br /&gt;
 		{&lt;br /&gt;
 			ageSpeed=0.04; // age increase per frame, when age &amp;gt;= 1 the particle is destroyed&lt;br /&gt;
 			size = 40;&lt;br /&gt;
 			sizeGrowth = -2;&lt;br /&gt;
 			pos = -30 r60, r30, -30 r60;&lt;br /&gt;
 			speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;&lt;br /&gt;
 		}&lt;br /&gt;
 		water=1;&lt;br /&gt;
 		ground=1;&lt;br /&gt;
 		count=10;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This particular script would be linked to with &amp;quot;explosiongenerator=custom:ARM_HLT_Expl;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here is an example that uses the index (i) command in the properties:&lt;br /&gt;
&lt;br /&gt;
 [heatcloud]&lt;br /&gt;
 {&lt;br /&gt;
 	[properties]&lt;br /&gt;
 	{&lt;br /&gt;
 		pos = 0, i20, 0;&lt;br /&gt;
 		heat = 10;&lt;br /&gt;
 		maxheat=10;&lt;br /&gt;
 		heatFalloff=1;&lt;br /&gt;
 		size = 30;&lt;br /&gt;
 	}&lt;br /&gt;
 	ground=1;&lt;br /&gt;
 	count=10;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This script creates a tower of heatcloud projectile. The first projectile gets y=0, the second y=20,.. y=40, y=60, and finally y=180&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to link a custom explosion to a weapon ===&lt;br /&gt;
&lt;br /&gt;
The weapon definitions needs to have this in it:&lt;br /&gt;
 explosiongenerator = custom:ExplosionScriptName;&lt;br /&gt;
&lt;br /&gt;
The explosion definition for ExplosionScriptName would be one of the TDF files in gamedata/explosions/&lt;br /&gt;
&lt;br /&gt;
You can also link the weapons for self-destruct and normal destruct to an explosion script.&lt;br /&gt;
&lt;br /&gt;
=== Adding ground flashes ===&lt;br /&gt;
&lt;br /&gt;
The ground flash is currently not an actual projectile, so it&#039;s specified in a different way:&lt;br /&gt;
 [ARM_HLT_Expl]&lt;br /&gt;
 {&lt;br /&gt;
      .. projectiles definitions ..&lt;br /&gt;
&lt;br /&gt;
 	[groundflash]&lt;br /&gt;
 	{&lt;br /&gt;
 		flashSize = 100;   // flash size&lt;br /&gt;
 		flashAlpha = 1;    // initial alpha of the flash&lt;br /&gt;
 		circleGrowth = 60; // size increase/frame&lt;br /&gt;
 		circleAlpha = 1;   // initial alpha of the ring&lt;br /&gt;
 		ttl = 10;          // number of frames&lt;br /&gt;
 		color = 0,0,1;    // color RGB&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG-OldInfo&amp;diff=3813</id>
		<title>CEG-OldInfo</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG-OldInfo&amp;diff=3813"/>
		<updated>2006-06-05T13:52:44Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Custom explosion generators ==&lt;br /&gt;
&lt;br /&gt;
=== What are they? ===&lt;br /&gt;
Custom explosions are small explosion scripts read from gamedata/explosions/*.tdf.&lt;br /&gt;
The explosion script specifies which particles/projectiles have to be created when the explosion happens, and their initial properties (position,speed,...)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Explosion script definition ===&lt;br /&gt;
&lt;br /&gt;
The explosion script directly specifies which C++ projectile classes have to be created, and also which properties the projectiles should have. &lt;br /&gt;
&lt;br /&gt;
The explosion script is structured like this:&lt;br /&gt;
&lt;br /&gt;
 [ExplosionScriptName]&lt;br /&gt;
 {&lt;br /&gt;
 	[projectile scriptname] // this specifies the class of the projectile&lt;br /&gt;
 	{&lt;br /&gt;
 		[properties]&lt;br /&gt;
 		{&lt;br /&gt;
 			size = 40;&lt;br /&gt;
 			sizeGrowth = -2;&lt;br /&gt;
 			pos = -30 r60, r30, -30 r60; // These codes are explained below&lt;br /&gt;
 			speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;&lt;br /&gt;
 		}&lt;br /&gt;
 		underwater=0; // should this projectile be created when underwater?&lt;br /&gt;
 		air=0;   // should this projectile be created when in air?&lt;br /&gt;
 		water=1; // should this projectile be created on water?&lt;br /&gt;
 		ground=1; // should this projectile be created when on ground?&lt;br /&gt;
 		count=10; // number of projectiles of this type&lt;br /&gt;
 	}&lt;br /&gt;
 .. other projectiles types can follow here ..&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Defaults for air/underwater/ground/water are zero.&lt;br /&gt;
Default of count is 1.&lt;br /&gt;
&lt;br /&gt;
=== Projectile properties ===&lt;br /&gt;
&lt;br /&gt;
To begin, you should run &lt;br /&gt;
 spring /p      (or &amp;quot;spring -p&amp;quot; on linux) &lt;br /&gt;
to let spring export &amp;quot;projectiles.txt&amp;quot;, which contains all the classes you can use in an explosion script. At the time of writing, this would contain [[projectiles.txt]]&lt;br /&gt;
&lt;br /&gt;
The items listed in &amp;quot;properties&amp;quot; are directly mapped to the class properties in projectiles.txt&lt;br /&gt;
The properties are specified with a bit of a cryptic syntax. You can use extra commands in them (r,d,i). For example this:&lt;br /&gt;
&lt;br /&gt;
 pos = -30 r60, r30, -30 r60; &lt;br /&gt;
&lt;br /&gt;
The x coordinate (specified with -30 r60) will be:  &lt;br /&gt;
 x = -30 + (Random value between 0 and 60);&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
 rX: add a number  between 0 and X&lt;br /&gt;
 iX: multiply the projectile index with X and add it. See the example for this below.&lt;br /&gt;
 dX: multiply the damage with X and add it.&lt;br /&gt;
&lt;br /&gt;
== Explosion script examples ==&lt;br /&gt;
&lt;br /&gt;
This is an example of a script that makes 10 smoke projectiles (yeah they should have been called particles, but they are handled by spring using the projectile system)&lt;br /&gt;
&lt;br /&gt;
 [ARM_HLT_Expl]&lt;br /&gt;
 {&lt;br /&gt;
 	[smoke]&lt;br /&gt;
 	{&lt;br /&gt;
 		[properties]&lt;br /&gt;
 		{&lt;br /&gt;
 			ageSpeed=0.04; // age increase per frame, when age &amp;gt;= 1 the particle is destroyed&lt;br /&gt;
 			size = 40;&lt;br /&gt;
 			sizeGrowth = -2;&lt;br /&gt;
 			pos = -30 r60, r30, -30 r60;&lt;br /&gt;
 			speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;&lt;br /&gt;
 		}&lt;br /&gt;
 		water=1;&lt;br /&gt;
 		ground=1;&lt;br /&gt;
 		count=10;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This particular script would be linked to with &amp;quot;explosiongenerator=custom:ARM_HLT_Expl;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here is an example that uses the index (i) command in the properties:&lt;br /&gt;
&lt;br /&gt;
 [heatcloud]&lt;br /&gt;
 {&lt;br /&gt;
 	[properties]&lt;br /&gt;
 	{&lt;br /&gt;
 		pos = 0, i20, 0;&lt;br /&gt;
 		heat = 10;&lt;br /&gt;
 		maxheat=10;&lt;br /&gt;
 		heatFalloff=1;&lt;br /&gt;
 		size = 30;&lt;br /&gt;
 	}&lt;br /&gt;
 	ground=1;&lt;br /&gt;
 	count=10;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This script creates a tower of heatcloud projectile. Look at the The first projectile gets y=0, the second y=20,.. y=40, y=60, and finally y=180&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to link a custom explosion to a weapon ===&lt;br /&gt;
&lt;br /&gt;
The weapon definitions needs to have this in it:&lt;br /&gt;
 explosiongenerator = custom:ExplosionScriptName;&lt;br /&gt;
&lt;br /&gt;
The explosion definition for ExplosionScriptName would be one of the TDF files in gamedata/explosions/&lt;br /&gt;
&lt;br /&gt;
You can also link the weapons for self-destruct and normal destruct to an explosion script.&lt;br /&gt;
&lt;br /&gt;
=== Adding ground flashes ===&lt;br /&gt;
&lt;br /&gt;
The ground flash is currently not an actual projectile, so it&#039;s specified in a different way:&lt;br /&gt;
 [ARM_HLT_Expl]&lt;br /&gt;
 {&lt;br /&gt;
      .. projectiles definitions ..&lt;br /&gt;
&lt;br /&gt;
 	[groundflash]&lt;br /&gt;
 	{&lt;br /&gt;
 		flashSize = 100;   // flash size&lt;br /&gt;
 		flashAlpha = 1;    // initial alpha of the flash&lt;br /&gt;
 		circleGrowth = 60; // size increase/frame&lt;br /&gt;
 		circleAlpha = 1;   // initial alpha of the ring&lt;br /&gt;
 		ttl = 10;          // number of frames&lt;br /&gt;
 		color = 0,0,1;    // color RGB&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Projectiles.txt&amp;diff=15530</id>
		<title>Projectiles.txt</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Projectiles.txt&amp;diff=15530"/>
		<updated>2006-06-05T12:11:30Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: Generated listing of classes using spring /p&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; Class: CTracerProjectile.  Scriptname: tracer&lt;br /&gt;
  	length: float&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Class: CSmokeProjectile2.  Scriptname: smoke2&lt;br /&gt;
 	color: float&lt;br /&gt;
 	ageSpeed: float&lt;br /&gt;
 	size: float&lt;br /&gt;
 	startSize: float&lt;br /&gt;
 	sizeExpansion: float&lt;br /&gt;
 	wantedPos: float3&lt;br /&gt;
 	glowFalloff: float&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Class: CSmokeProjectile.  Scriptname: smoke&lt;br /&gt;
 	color: float&lt;br /&gt;
 	size: float&lt;br /&gt;
 	startSize: float&lt;br /&gt;
 	sizeExpansion: float&lt;br /&gt;
 	ageSpeed: float&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Class: CHeatCloudProjectile.  Scriptname: heatcloud&lt;br /&gt;
 	heat: float&lt;br /&gt;
 	maxheat: float&lt;br /&gt;
 	heatFalloff: float&lt;br /&gt;
 	size: float&lt;br /&gt;
 	sizeGrowth: float&lt;br /&gt;
 	sizemod: float&lt;br /&gt;
 	sizemodmod: float&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Class: CGfxProjectile.  Scriptname: gfx&lt;br /&gt;
 	creationTime: int&lt;br /&gt;
 	lifeTime: int&lt;br /&gt;
 	color: uchar[4]&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Class: CDirtProjectile.  Scriptname: dirt&lt;br /&gt;
 	alpha: float&lt;br /&gt;
 	alphaFalloff: float&lt;br /&gt;
 	size: float&lt;br /&gt;
 	sizeExpansion: float&lt;br /&gt;
 	slowdown: float&lt;br /&gt;
 	color: float3&lt;br /&gt;
 	speed: float3&lt;br /&gt;
 	pos: float3&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Projectiles.txt&amp;diff=15529</id>
		<title>Projectiles.txt</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Projectiles.txt&amp;diff=15529"/>
		<updated>2006-06-05T12:09:58Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: Generated listing of classes using spring /p&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Class: CTracerProjectile.  Scriptname: tracer&lt;br /&gt;
	length: float&lt;br /&gt;
	speed: float3&lt;br /&gt;
	pos: float3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Class: CSmokeProjectile2.  Scriptname: smoke2&lt;br /&gt;
	color: float&lt;br /&gt;
	ageSpeed: float&lt;br /&gt;
	size: float&lt;br /&gt;
	startSize: float&lt;br /&gt;
	sizeExpansion: float&lt;br /&gt;
	wantedPos: float3&lt;br /&gt;
	glowFalloff: float&lt;br /&gt;
	speed: float3&lt;br /&gt;
	pos: float3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Class: CSmokeProjectile.  Scriptname: smoke&lt;br /&gt;
	color: float&lt;br /&gt;
	size: float&lt;br /&gt;
	startSize: float&lt;br /&gt;
	sizeExpansion: float&lt;br /&gt;
	ageSpeed: float&lt;br /&gt;
	speed: float3&lt;br /&gt;
	pos: float3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Class: CHeatCloudProjectile.  Scriptname: heatcloud&lt;br /&gt;
	heat: float&lt;br /&gt;
	maxheat: float&lt;br /&gt;
	heatFalloff: float&lt;br /&gt;
	size: float&lt;br /&gt;
	sizeGrowth: float&lt;br /&gt;
	sizemod: float&lt;br /&gt;
	sizemodmod: float&lt;br /&gt;
	speed: float3&lt;br /&gt;
	pos: float3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Class: CGfxProjectile.  Scriptname: gfx&lt;br /&gt;
	creationTime: int&lt;br /&gt;
	lifeTime: int&lt;br /&gt;
	color: uchar[4]&lt;br /&gt;
	speed: float3&lt;br /&gt;
	pos: float3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Class: CDirtProjectile.  Scriptname: dirt&lt;br /&gt;
	alpha: float&lt;br /&gt;
	alphaFalloff: float&lt;br /&gt;
	size: float&lt;br /&gt;
	sizeExpansion: float&lt;br /&gt;
	slowdown: float&lt;br /&gt;
	color: float3&lt;br /&gt;
	speed: float3&lt;br /&gt;
	pos: float3&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG-OldInfo&amp;diff=3812</id>
		<title>CEG-OldInfo</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG-OldInfo&amp;diff=3812"/>
		<updated>2006-06-05T12:08:16Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Custom explosion generators ==&lt;br /&gt;
&lt;br /&gt;
=== What are they? ===&lt;br /&gt;
Custom explosions are small explosion scripts read from gamedata/explosions/*.tdf.&lt;br /&gt;
The explosion script specifies which particles/projectiles have to be created when the explosion happens, and their initial properties (position,speed,...)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Explosion script definition ===&lt;br /&gt;
&lt;br /&gt;
The explosion script directly specifies which C++ projectile classes have to be created, and also which properties the projectiles should have. &lt;br /&gt;
&lt;br /&gt;
The explosion script is structured like this:&lt;br /&gt;
&lt;br /&gt;
 [ExplosionScriptName]&lt;br /&gt;
 {&lt;br /&gt;
 	[projectile scriptname] // this specifies the class of the projectile&lt;br /&gt;
 	{&lt;br /&gt;
 		[properties]&lt;br /&gt;
 		{&lt;br /&gt;
 			size = 40;&lt;br /&gt;
 			sizeGrowth = -2;&lt;br /&gt;
 			pos = -30 r60, r30, -30 r60; // These codes are explained below&lt;br /&gt;
 			speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;&lt;br /&gt;
 		}&lt;br /&gt;
 		underwater=0; // should this projectile be created when underwater?&lt;br /&gt;
 		air=0;   // should this projectile be created when in air?&lt;br /&gt;
 		water=1; // should this projectile be created on water?&lt;br /&gt;
 		ground=1; // should this projectile be created when on ground?&lt;br /&gt;
 		count=10; // number of projectiles of this type&lt;br /&gt;
 	}&lt;br /&gt;
 .. other projectiles types can follow here ..&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Defaults for air/underwater/ground/water are zero.&lt;br /&gt;
Default of count is 1.&lt;br /&gt;
&lt;br /&gt;
=== Projectile properties ===&lt;br /&gt;
&lt;br /&gt;
To begin, you should run &lt;br /&gt;
 spring /p      (or &amp;quot;spring -p&amp;quot; on linux) &lt;br /&gt;
to let spring export &amp;quot;projectiles.txt&amp;quot;, which contains all the classes you can use in an explosion script. At the time of writing, this would contain [[projectiles.txt]]&lt;br /&gt;
&lt;br /&gt;
The items listed in &amp;quot;properties&amp;quot; are directly mapped to the class properties in projectiles.txt&lt;br /&gt;
The properties are specified with a bit of a cryptic syntax. You can use extra commands in them (r,d,i). For example this:&lt;br /&gt;
&lt;br /&gt;
 pos = -30 r60, r30, -30 r60; &lt;br /&gt;
&lt;br /&gt;
The x coordinate (specified with -30 r60) will be:  &lt;br /&gt;
 x = -30 + (Random value between 0 and 60);&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
 rX: add a number  between 0 and X&lt;br /&gt;
 iX: multiply the projectile index with X and add it. See the example for this below.&lt;br /&gt;
 dX: multiply the damage with X and add it.&lt;br /&gt;
&lt;br /&gt;
== Explosion script examples ==&lt;br /&gt;
&lt;br /&gt;
This is an example of a script that makes 10 smoke projectiles (yeah they should have been called particles, but they are handled by spring using the projectile system)&lt;br /&gt;
&lt;br /&gt;
 [ARM_HLT_Expl]&lt;br /&gt;
 {&lt;br /&gt;
 	[smoke]&lt;br /&gt;
 	{&lt;br /&gt;
 		[properties]&lt;br /&gt;
 		{&lt;br /&gt;
 			ageSpeed=0.04; // age increase per frame, when age &amp;gt;= 1 the particle is destroyed&lt;br /&gt;
 			size = 40;&lt;br /&gt;
 			sizeGrowth = -2;&lt;br /&gt;
 			pos = -30 r60, r30, -30 r60;&lt;br /&gt;
 			speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;&lt;br /&gt;
 		}&lt;br /&gt;
 		water=1;&lt;br /&gt;
 		ground=1;&lt;br /&gt;
 		count=10;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This particular script would be linked to with &amp;quot;explosiongenerator=custom:ARM_HLT_Expl;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here is an example that uses the index (i) command in the properties:&lt;br /&gt;
&lt;br /&gt;
	[heatcloud]&lt;br /&gt;
	{&lt;br /&gt;
		[properties]&lt;br /&gt;
		{&lt;br /&gt;
			pos = 0, i20, 0;&lt;br /&gt;
			heat = 10;&lt;br /&gt;
			maxheat=10;&lt;br /&gt;
			heatFalloff=1;&lt;br /&gt;
			size = 30;&lt;br /&gt;
		}&lt;br /&gt;
		ground=1;&lt;br /&gt;
		count=10;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
This script creates a tower of heatcloud projectile. Look at the The first projectile gets y=0, the second y=20,.. y=40, y=60, and finally y=180&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to link a custom explosion to a weapon ===&lt;br /&gt;
&lt;br /&gt;
The weapon definitions needs to have this in it:&lt;br /&gt;
 explosiongenerator = custom:ExplosionScriptName;&lt;br /&gt;
&lt;br /&gt;
The explosion definition for ExplosionScriptName would be one of the TDF files in gamedata/explosions/&lt;br /&gt;
&lt;br /&gt;
You can also link the weapons for self-destruct and normal destruct to an explosion script.&lt;br /&gt;
&lt;br /&gt;
=== Adding ground flashes ===&lt;br /&gt;
&lt;br /&gt;
The ground flash is currently not an actual projectile, so it&#039;s specified in a different way:&lt;br /&gt;
 [ARM_HLT_Expl]&lt;br /&gt;
 {&lt;br /&gt;
      .. projectiles definitions ..&lt;br /&gt;
&lt;br /&gt;
 	[groundflash]&lt;br /&gt;
 	{&lt;br /&gt;
 		flashSize = 100;   // flash size&lt;br /&gt;
 		flashAlpha = 1;    // initial alpha of the flash&lt;br /&gt;
 		circleGrowth = 60; // size increase/frame&lt;br /&gt;
 		circleAlpha = 1;   // initial alpha of the ring&lt;br /&gt;
 		ttl = 10;          // number of frames&lt;br /&gt;
 		color = 0,0,1;    // color RGB&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG-OldInfo&amp;diff=3811</id>
		<title>CEG-OldInfo</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG-OldInfo&amp;diff=3811"/>
		<updated>2006-06-05T12:06:33Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: Explanation of the custom explosion system&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Custom explosion generators ===&lt;br /&gt;
&lt;br /&gt;
== What are they? ==&lt;br /&gt;
Custom explosions are small explosion scripts read from gamedata/explosions/*.tdf.&lt;br /&gt;
The explosion script specifies which particles/projectiles have to be created when the explosion happens, and their initial properties (position,speed,...)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Explosion script definition ==&lt;br /&gt;
&lt;br /&gt;
The explosion script directly specifies which C++ projectile classes have to be created, and also which properties the projectiles should have. &lt;br /&gt;
&lt;br /&gt;
The explosion script is structured like this:&lt;br /&gt;
&lt;br /&gt;
 [ExplosionScriptName]&lt;br /&gt;
 {&lt;br /&gt;
 	[projectile scriptname] // this specifies the class of the projectile&lt;br /&gt;
 	{&lt;br /&gt;
 		[properties]&lt;br /&gt;
 		{&lt;br /&gt;
 			size = 40;&lt;br /&gt;
 			sizeGrowth = -2;&lt;br /&gt;
 			pos = -30 r60, r30, -30 r60; // These codes are explained below&lt;br /&gt;
 			speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;&lt;br /&gt;
 		}&lt;br /&gt;
 		underwater=0; // should this projectile be created when underwater?&lt;br /&gt;
 		air=0;   // should this projectile be created when in air?&lt;br /&gt;
 		water=1; // should this projectile be created on water?&lt;br /&gt;
 		ground=1; // should this projectile be created when on ground?&lt;br /&gt;
 		count=10; // number of projectiles of this type&lt;br /&gt;
 	}&lt;br /&gt;
 .. other projectiles types can follow here ..&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Defaults for air/underwater/ground/water are zero.&lt;br /&gt;
Default of count is 1.&lt;br /&gt;
&lt;br /&gt;
== Projectile properties ==&lt;br /&gt;
&lt;br /&gt;
To begin, you should run &lt;br /&gt;
 spring /p      (or &amp;quot;spring -p&amp;quot; on linux) &lt;br /&gt;
to let spring export &amp;quot;projectiles.txt&amp;quot;, which contains all the classes you can use in an explosion script.&lt;br /&gt;
&lt;br /&gt;
The items listed in &amp;quot;properties&amp;quot; are directly mapped to the class properties in projectiles.txt&lt;br /&gt;
The properties are specified with a bit of a cryptic syntax. You can use extra commands in them (r,d,i). For example this:&lt;br /&gt;
&lt;br /&gt;
 pos = -30 r60, r30, -30 r60; &lt;br /&gt;
&lt;br /&gt;
The x coordinate (specified with -30 r60) will be:  &lt;br /&gt;
 x = -30 + (Random value between 0 and 60);&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
 rX: add a number  between 0 and X&lt;br /&gt;
 iX: multiply the projectile index with X and add it. See the example for this below.&lt;br /&gt;
 dX: multiply the damage with X and add it.&lt;br /&gt;
&lt;br /&gt;
== Explosion script examples ==&lt;br /&gt;
&lt;br /&gt;
This is an example of a script that makes 10 smoke projectiles (yeah they should have been called particles, but they are handled by spring using the projectile system)&lt;br /&gt;
&lt;br /&gt;
 [ARM_HLT_Expl]&lt;br /&gt;
 {&lt;br /&gt;
 	[smoke]&lt;br /&gt;
 	{&lt;br /&gt;
 		[properties]&lt;br /&gt;
 		{&lt;br /&gt;
 			ageSpeed=0.04; // age increase per frame, when age &amp;gt;= 1 the particle is destroyed&lt;br /&gt;
 			size = 40;&lt;br /&gt;
 			sizeGrowth = -2;&lt;br /&gt;
 			pos = -30 r60, r30, -30 r60;&lt;br /&gt;
 			speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;&lt;br /&gt;
 		}&lt;br /&gt;
 		water=1;&lt;br /&gt;
 		ground=1;&lt;br /&gt;
 		count=10;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This particular script would be linked to with &amp;quot;explosiongenerator=custom:ARM_HLT_Expl;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here is an example that uses the index (i) command in the properties:&lt;br /&gt;
&lt;br /&gt;
	[heatcloud]&lt;br /&gt;
	{&lt;br /&gt;
		[properties]&lt;br /&gt;
		{&lt;br /&gt;
			pos = 0, i20, 0;&lt;br /&gt;
			heat = 10;&lt;br /&gt;
			maxheat=10;&lt;br /&gt;
			heatFalloff=1;&lt;br /&gt;
			size = 30;&lt;br /&gt;
		}&lt;br /&gt;
		ground=1;&lt;br /&gt;
		count=10;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
This script creates a tower of heatcloud projectile. Look at the The first projectile gets y=0, the second y=20,.. y=40, y=60, and finally y=180&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to link a custom explosion to a weapon ==&lt;br /&gt;
&lt;br /&gt;
The weapon definitions needs to have this in it:&lt;br /&gt;
 explosiongenerator = custom:ExplosionScriptName;&lt;br /&gt;
&lt;br /&gt;
The explosion definition for ExplosionScriptName would be one of the TDF files in gamedata/explosions/&lt;br /&gt;
&lt;br /&gt;
You can also link the weapons for self-destruct and normal destruct to an explosion script.&lt;br /&gt;
&lt;br /&gt;
== Adding ground flashes ==&lt;br /&gt;
&lt;br /&gt;
The ground flash is currently not an actual projectile, so it&#039;s specified in a different way:&lt;br /&gt;
 [ARM_HLT_Expl]&lt;br /&gt;
 {&lt;br /&gt;
      .. projectiles definitions ..&lt;br /&gt;
&lt;br /&gt;
 	[groundflash]&lt;br /&gt;
 	{&lt;br /&gt;
 		flashSize = 100;   // flash size&lt;br /&gt;
 		flashAlpha = 1;    // initial alpha of the flash&lt;br /&gt;
 		circleGrowth = 60; // size increase/frame&lt;br /&gt;
 		circleAlpha = 1;   // initial alpha of the ring&lt;br /&gt;
 		ttl = 10;          // number of frames&lt;br /&gt;
 		color = 0,0,1;    // color RGB&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17067</id>
		<title>SpringEngineTODO</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17067"/>
		<updated>2006-04-20T20:35:19Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a TODO list for anyone interested in developing the spring code. If you are not involved in the development, please contact one of the developers first, or mail to the mailing list before you add things here.&lt;br /&gt;
&lt;br /&gt;
* Implement saving/loading. There are a lot of direct LoadSave() functions in the game code, but the easier way would probably to finish the serialization in the class registration type interfaces (rts/System/creg), so everything can be serialized automatically. &lt;br /&gt;
&lt;br /&gt;
* [[Syncing System|Implement re-sync]]. After a sync problem is detected, and a re-sync of the random seed does not fix it the game would pause and use the rsync to adjust game state (current plan if for float3 data) to resync, as suggested by Jesse Schoch in [http://lolut.utbm.info/pipermail/taspring-linux/2006-February/000810.html]. After using rsync on it should be able to continue normally until the next sync error is detected.&lt;br /&gt;
&lt;br /&gt;
* Abstract and improve unit rendering:&lt;br /&gt;
** Improve the S3O rendering: It doesn&#039;t generate nice explosion particles like the 3DO system, and it has other issues with drawing as well (refer to the s3o related threads on the forum for this, or test it and see for yourself).&lt;br /&gt;
** 3DO/S3O support is not abstracted, many parts of unit rendering are spread throughout spring and assume 3DO, and the rendering is a messy mixture of 3DO and S3O stuff. Abstracting the model rendering with a sort of IModel and IModelInstance interfaces would allow adding other model formats as well (Such as a skeletal animation format).&lt;br /&gt;
&lt;br /&gt;
* Improve weapon collision detection with more complex shapes for the bigger units. Giving every model a set of convex collision meshes, saved in the S3O file, could be a solution. This will need a change in the s3o format and upspring editor, so you will need some cooperate with me on that part(jcnossen).&lt;br /&gt;
&lt;br /&gt;
* Bind a scripting language to Spring. Fnordia already started on this with lua and luabind, but since luabind does not compile on GCC (so I&#039;ve heard), it&#039;s not an option. &lt;br /&gt;
**Binding LUA could be done in other ways too ofcourse. &lt;br /&gt;
**A lightweight and fast language that can call C/C++ directly is AngelScript ([[www.angelcode.com/angelscript]]), class support with inheritance is however not yet supported (WIP), but is already a good choice because it doesn&#039;t require wrapper functions.&lt;br /&gt;
**Squirrel is a more game orientated derivative of LUA and would be worth looking into. It supports classes directly as opposed to lua which &amp;quot;simulates&amp;quot; classes.&lt;br /&gt;
**It would be more work, but it could be possible to create a stripped down version of mono to integrate into spring. Then you can use any language Mono supports, with higher speed than the non-JIT scripting systems mentioned above.&lt;br /&gt;
&lt;br /&gt;
* Make more elements of spring data-driven. Explosion bitmaps, trees, etc... A lot of graphics are hardcoded and should be changeable with scripts or config files (FBI/TDF).&lt;br /&gt;
&lt;br /&gt;
* Add a dynamic-lighting system: Allow units to have dynamic lights on them that affect lighting of other units and landscape, with sort of &amp;quot;approximating lights&amp;quot; for cases where a lot of units get close together. This is a big thing, but it would improve spring graphics a lot if done well.&lt;br /&gt;
&lt;br /&gt;
* Get a mac version working. Contact the developers on the mailing list for this, as there are people looking into this already.&lt;br /&gt;
&lt;br /&gt;
* Abstract the rendering and add an orthographic renderer for OTA style play on lower end systems.&lt;br /&gt;
&lt;br /&gt;
Even though this isn&#039;t really about the Spring engine:&lt;br /&gt;
&lt;br /&gt;
* Get a working multi platform lobby client capable of joining battles, hosting battles, browsing maps, etc. (everything TASClient [the windows lobby] is capable off). Language/Toolkit doesn&#039;t matter. There&#039;s omni (Python and WxWidgets) and qspring (C++ and Qt 4) in the works.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source development]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17061</id>
		<title>SpringEngineTODO</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17061"/>
		<updated>2006-02-06T17:47:54Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a TODO list for anyone interested in developing the spring code. If you are not involved in the development, please contact one of the developers first, or mail to the mailing list before you add things here.&lt;br /&gt;
&lt;br /&gt;
* Implement saving/loading. There are a lot of direct LoadSave() functions in the game code, but the easier way would probably to finish the serialization in the class registration type interfaces (rts/System/creg), so everything can be serialized automatically. &lt;br /&gt;
&lt;br /&gt;
* Implement re-sync. Assuming the game is allowed to be paused (Seems the only good option so far), it would be possible to generate a savegame in memory and use the rsync code on this to resync, as suggested by Jesse Schoch in [http://lolut.utbm.info/pipermail/taspring-linux/2006-February/000810.html]. After using rsync on it, the game could be loaded from the savegame again.&lt;br /&gt;
&lt;br /&gt;
* Abstract and improve unit rendering:&lt;br /&gt;
** Improve the S3O rendering: It doesn&#039;t generate nice explosion particles like the 3DO system, and it has other issues with drawing as well (refer to the s3o related threads on the forum for this, or test it and see for yourself).&lt;br /&gt;
** 3DO/S3O support is not abstracted, many parts of unit rendering are spread throughout spring and assume 3DO, and the rendering is a messy mixture of 3DO and S3O stuff. Abstracting the model rendering with a sort of IModel and IModelInstance interfaces would allow adding other model formats as well (Such as a skeletal animation format).&lt;br /&gt;
&lt;br /&gt;
* Improve weapon collision detection with more complex shapes for the bigger units. Giving every model a set of convex collision meshes, saved in the S3O file, could be a solution. This will need a change in the s3o format and upspring editor, so you will need some cooperate with me on that part(jcnossen).&lt;br /&gt;
&lt;br /&gt;
* Bind a scripting language to Spring. Fnordia already started on this with lua and luabind, but since luabind does not compile on GCC (so I&#039;ve heard), it&#039;s not an option. &lt;br /&gt;
**Binding LUA could be done in other ways too ofcourse. &lt;br /&gt;
**A lightweight and fast language that can call C/C++ directly is AngelScript ([[www.angelcode.com/angelscript]]), class support with inheritance is however not yet supported (WIP), but is already a good choice because it doesn&#039;t require wrapper functions.&lt;br /&gt;
&lt;br /&gt;
* Make more elements of spring data-driven. Explosion bitmaps, trees, etc... A lot of graphics are hardcoded and should be changeable with scripts or config files (FBI/TDF).&lt;br /&gt;
&lt;br /&gt;
* Add a dynamic-lighting system: Allow units to have dynamic lights on them that affect lighting of other units and landscape, with sort of &amp;quot;approximating lights&amp;quot; for cases where a lot of units get close together. This is a big thing, but it would improve spring graphics a lot if done well.&lt;br /&gt;
&lt;br /&gt;
* Get a mac version working. Contact the developers on the mailing list for this, as there are people looking into this already.&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5552</id>
		<title>Development:Main</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5552"/>
		<updated>2006-02-06T12:28:54Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outlined below is information on assisting with the development of the Spring source itself.&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;small&amp;gt;NOTE: For information about developing a mod (units, maps, etc.) see the [[Mod Development]] page.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below you can find information on how to work with the Spring source in the current mainline (Windows platform) if you like to work on another platform (Linux &amp;amp; Mac) please look at the bottem of this page under &amp;quot;Multiplatform development&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Starting Development==&lt;br /&gt;
To start development, you&#039;ll need&lt;br /&gt;
#The latest version of the source &lt;br /&gt;
#A good code manipulation program&lt;br /&gt;
#Compiling your modified source&lt;br /&gt;
&lt;br /&gt;
===Source Code Documentation===&lt;br /&gt;
A good place to start is the source code documentation, which can be found here: [http://taspring.clan-sy.com/doxygen/ doxygen]&lt;br /&gt;
&lt;br /&gt;
An explanation on how the code is executed ingame can be found in the [[Spring Engine Code]]&lt;br /&gt;
page.&lt;br /&gt;
&lt;br /&gt;
===Obtaining the Source===&lt;br /&gt;
&lt;br /&gt;
If you just want to take a look at the code you can use [http://svn.berlios.de/viewcvs/taspring-linux/trunk/ HTTP based viewing of the repository]&lt;br /&gt;
&lt;br /&gt;
Another option is to manually download it along with the latest released version of the game. However, for serious developers, a better way would be to download the source straight from the subversion(SVN) repository. This will also allow you to make a patch out of the changes you make to the code, and send it to one of the developers with SVN access.&lt;br /&gt;
&lt;br /&gt;
More information about downloading from the svn repository is avaiable at the &lt;br /&gt;
[http://developer.berlios.de/projects/taspring-linux BerliOS Project page]&lt;br /&gt;
Two good windows SVN clients are SmartSVN and TortoiseSVN.&lt;br /&gt;
&lt;br /&gt;
===Learning C++===&lt;br /&gt;
You will need to know C++ to modify or understand Spring&#039;s source code. If you&#039;re interested in learning C++, see [[Learning_CPP]]&lt;br /&gt;
&lt;br /&gt;
However please note that badly designed code (code created by a C++ novice for example), will even if working not be included in the spring code. Spring is a large project, and therefore it is necessary to stay away from hackjobs and create general solutions to problems.&lt;br /&gt;
&lt;br /&gt;
===Modifying and Compiling the Source===&lt;br /&gt;
See [[Development_IDEs]]. You either have to use the SCons buildsystem that is used on linux, or use the vcproj for building spring in Visual Studio 2003.&lt;br /&gt;
Currently the build is actively updated for linux and for Visual Studio 2003 &lt;br /&gt;
You will needs these libraries:&lt;br /&gt;
&lt;br /&gt;
*[http://www.boost.org Boost C++ library]&lt;br /&gt;
*[http://www.openal.org OpenAL Audio library]&lt;br /&gt;
*[http://glew.sf.net GLEW (OpenGL extension loading)]&lt;br /&gt;
*[http://www.winimage.com/zLibDll/ zlib + minizip]&lt;br /&gt;
*[http://www.libsdl.org SDL]&lt;br /&gt;
*[http://openil.sf.net DevIL (Image loading)]&lt;br /&gt;
*[http://www.freetype.org Freetype font rendering]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Development Suggestions==&lt;br /&gt;
&lt;br /&gt;
Before starting to make modifications to the source, take a look at the [[development guidelines]] which outlines some important things to think about. To find something interesting to work on, look at the list of [[example projects]]. You can also check the list of [[whois doing what]] to see what others are doing. If you do edit the code, please add [[Doxygen style comments]] to the code, which will then enhance the source code documentation.&lt;br /&gt;
&lt;br /&gt;
===How to get your code included===&lt;br /&gt;
If you create something that you think should be included in the official source tree, you can send an email to the development mailing list shown at [[Linux]] page. Sending your code in the form of a patch (also known as a .diff file), will make the chances of including it in the main code.&lt;br /&gt;
It&#039;s also considered standard practice to post one&#039;s modifications in the [http://taspring.clan-sy.com/phpbb/viewforum.php?f=12 development forum] and get feedback.&lt;br /&gt;
&lt;br /&gt;
==Multiplatform development==&lt;br /&gt;
Current development is done on the portable code only, located at [http://developer.berlios.de/projects/taspring-linux Berlios]&lt;br /&gt;
All future releases will be based on this code.&lt;br /&gt;
The current spring code is being developed on Windows and linux. A mac port, as well as other unixes, is very possible, but currently no developers are working on this. &lt;br /&gt;
Use the mailing list listed on the [[Linux]] page to reach all developers (windows and linux). However if you have a feature request or bug report, the mantis bugtracker is probably a better way.&lt;br /&gt;
Development information about the portable code can be found here: [[MultiplatformSpring]]&lt;br /&gt;
&lt;br /&gt;
==Spring Engine TODO list==&lt;br /&gt;
There is a TODO list for developers who want to contribute to the engine itself:&lt;br /&gt;
[[SpringEngineTODO]]&lt;br /&gt;
&lt;br /&gt;
See [[Glossary]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17060</id>
		<title>SpringEngineTODO</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17060"/>
		<updated>2006-02-05T16:52:21Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a TODO list for anyone interested in developing the spring code. If you are not involved in the development, please contact one of the developers first, or mail to the mailing list before you add things here.&lt;br /&gt;
&lt;br /&gt;
* Implement saving/loading. There are a lot of direct LoadSave() functions in the game code, but the easier way would probably to finish the serialization in the class registration type interfaces (rts/System/creg), so everything can be serialized automatically. &lt;br /&gt;
&lt;br /&gt;
* Implement re-sync. Assuming the game is allowed to be paused (Seems the only good option so far), it would be possible to generate a savegame in memory and use the rsync code on this to resync, as suggested by Jesse Schoch in [http://lolut.utbm.info/pipermail/taspring-linux/2006-February/000810.html]. After using rsync on it, the game could be loaded from the savegame again.&lt;br /&gt;
&lt;br /&gt;
* Abstract and improve unit rendering:&lt;br /&gt;
** Improve the S3O rendering: It doesn&#039;t generate nice explosion particles like the 3DO system, and it has other issues with drawing as well (refer to the s3o related threads on the forum for this, or test it and see for yourself).&lt;br /&gt;
** 3DO/S3O support is not abstracted, many parts of unit rendering are spread throughout spring and assume 3DO, and the rendering is a messy mixture of 3DO and S3O stuff. Abstracting the model rendering with a sort of IModel and IModelInstance interfaces would allow adding other model formats as well (Such as a skeletal animation format).&lt;br /&gt;
&lt;br /&gt;
* Improve weapon collision detection with more complex shapes for the bigger units. Giving every model a set of convex collision meshes, saved in the S3O file, could be a solution. This will need a change in the s3o format and upspring editor, so you will need some cooperate with me on that part(jcnossen).&lt;br /&gt;
&lt;br /&gt;
* Bind a scripting language to Spring. Fnordia already started on this with lua and luabind, but since luabind does not compile on GCC (so I&#039;ve heard), it&#039;s not an option. &lt;br /&gt;
**Binding LUA could be done in other ways too ofcourse. &lt;br /&gt;
**A lightweight and fast language that can call C/C++ directly is AngelScript ([[www.angelcode.com/angelscript]]), class support with inheritance is however not yet supported (WIP), but is already a good choice because it doesn&#039;t require wrapper functions.&lt;br /&gt;
&lt;br /&gt;
* Make more elements of spring data-driven. Explosion bitmaps, trees, etc... A lot of graphics are hardcoded and should be changeable with scripts or config files (FBI/TDF).&lt;br /&gt;
&lt;br /&gt;
* Add a dynamic-lighting system: Allow units to have dynamic lights on them that affect lighting of other units and landscape, with sort of &amp;quot;approximating lights&amp;quot; for cases where a lot of units get close together. This is a big thing, but it would improve spring graphics a lot if done well.&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17059</id>
		<title>SpringEngineTODO</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17059"/>
		<updated>2006-02-05T16:25:01Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a TODO list for anyone interested in developing the spring code. If you are not involved in the development, please contact one of the developers first, or mail to the mailing list before you add things here.&lt;br /&gt;
&lt;br /&gt;
* Implement saving/loading. There are a lot of direct LoadSave() functions in the game code, but the easier way would probably to finish the serialization in the class registration type interfaces (rts/System/creg), so everything can be serialized automatically. &lt;br /&gt;
&lt;br /&gt;
* Implement re-sync. Assuming the game is allowed to be paused (Seems the only good option so far), it would be possible to generate a savegame in memory and use the rsync code on this to resync, as suggested by Jesse Schoch in [http://lolut.utbm.info/pipermail/taspring-linux/2006-February/000810.html]. After using rsync on it, the game could be loaded from the savegame again.&lt;br /&gt;
&lt;br /&gt;
* Abstract and improve unit rendering:&lt;br /&gt;
** Improve the S3O rendering: It doesn&#039;t generate nice explosion particles like the 3DO system, and it has other issues with drawing as well (refer to the s3o related threads on the forum for this, or test it and see for yourself).&lt;br /&gt;
** 3DO/S3O support is not abstracted, many parts of unit rendering are spread throughout spring and assume 3DO, and the rendering is a messy mixture of 3DO and S3O stuff. Abstracting the model rendering with a sort of IModel and IModelInstance interfaces would allow adding other model formats as well (Such as a skeletal animation format).&lt;br /&gt;
&lt;br /&gt;
* Improve weapon collision detection with more complex shapes for the bigger units. Giving every model a set of convex collision meshes, saved in the S3O file, could be a solution. This will need a change in the s3o format and upspring editor, so you will need some cooperate with me on that part(jcnossen).&lt;br /&gt;
&lt;br /&gt;
* Bind a scripting language to Spring. Fnordia already started on this with lua and luabind, but since luabind does not compile on GCC (so I&#039;ve heard), it&#039;s not an option. &lt;br /&gt;
**Binding LUA could be done in other ways too ofcourse. &lt;br /&gt;
**A lightweight and fast language that can call C/C++ directly is AngelScript ([[www.angelcode.com/angelscript]]), class support with inheritance is however not yet supported (WIP), but is already a good choice because it doesn&#039;t require wrapper functions.&lt;br /&gt;
&lt;br /&gt;
* Make more elements of spring data-driven. Explosion bitmaps, trees, etc... A lot of graphics are hardcoded and should be changeable with scripts or config files (FBI/TDF).&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17058</id>
		<title>SpringEngineTODO</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17058"/>
		<updated>2006-02-05T16:23:27Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a TODO list for anyone interested in developing the spring code. If you are not involved in the development, please contact one of the developers first, or mail to the mailing list before you add things here.&lt;br /&gt;
&lt;br /&gt;
* Implement saving/loading. There are a lot of direct LoadSave() functions in the game code, but the easier way would probably to finish the serialization in the class registration type interfaces (rts/System/creg), so everything can be serialized automatically. &lt;br /&gt;
&lt;br /&gt;
* Implement re-sync. Assuming the game is allowed to be paused (Seems the only good option so far), it would be possible to generate a savegame in memory and use the rsync code on this to resync, as suggested by Jesse Schoch in [http://lolut.utbm.info/pipermail/taspring-linux/2006-February/000810.html]. After using rsync on it, the game could be loaded from the savegame again.&lt;br /&gt;
&lt;br /&gt;
* Abstract and improve unit rendering:&lt;br /&gt;
** Improve the S3O rendering: It doesn&#039;t generate nice explosion particles like the 3DO system, and it has other issues with drawing as well (refer to the s3o related threads on the forum for this, or test it and see for yourself).&lt;br /&gt;
** 3DO/S3O support is not abstracted, many parts of unit rendering are spread throughout spring and assume 3DO, and the rendering is a messy mixture of 3DO and S3O stuff. Abstracting the model rendering with a sort of IModel and IModelInstance interfaces would allow adding other model formats as well (Such as a skeletal animation format).&lt;br /&gt;
&lt;br /&gt;
* Improve weapon collision detection with more complex shapes for the bigger units. Giving every model a set of convex collision meshes, saved in the S3O file, could be a solution. This will need a change in the s3o format and upspring editor, so you will need some cooperate with me on that part(jcnossen).&lt;br /&gt;
&lt;br /&gt;
* Bind a scripting language to Spring. Fnordia already started on this with lua and luabind, but since luabind does not compile on GCC (so I&#039;ve heard), it&#039;s not an option. &lt;br /&gt;
**Binding LUA could be done in other ways too ofcourse. &lt;br /&gt;
**A lightweight and fast language that can call C/C++ directly is AngelScript (www.angelcode.com/angelscript), class support with inheritance is however not yet supported (WIP), but is already a good choice because it doesn&#039;t require wrapper functions.&lt;br /&gt;
&lt;br /&gt;
* Make more elements of spring data-driven. Explosion bitmaps, trees, etc... A lot of graphics are hardcoded and should be changeable with scripts or config files (FBI/TDF).&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17057</id>
		<title>SpringEngineTODO</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringEngineTODO&amp;diff=17057"/>
		<updated>2006-02-05T16:23:00Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: tasks for spring engine developers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a TODO list for anyone interested in developing the spring code. If you are not involved in the development, please contact one of the developers first, or mail to the mailing list before you add things here.&lt;br /&gt;
&lt;br /&gt;
* Implement saving/loading. There are a lot of direct LoadSave() functions in the game code, but the easier way would probably to finish the serialization in the class registration type interfaces (rts/System/creg), so everything can be serialized automatically. &lt;br /&gt;
&lt;br /&gt;
* Implement re-sync. Assuming the game is allowed to be paused (Seems the only good option so far), it would be possible to generate a savegame in memory and use the rsync code on this to resync, as suggested by Jesse Schoch in [http://lolut.utbm.info/pipermail/taspring-linux/2006-February/000810.html]. After using rsync on it, the game could be loaded from the savegame again.&lt;br /&gt;
&lt;br /&gt;
* Abstract and improve unit rendering:&lt;br /&gt;
** Improve the S3O rendering: It doesn&#039;t generate nice explosion particles like the 3DO system, and it has other issues with drawing as well (refer to the s3o related threads on the forum for this, or test it and see for yourself).&lt;br /&gt;
** 3DO/S3O support is not abstracted, many parts of unit rendering are spread throughout spring and assume 3DO, and the rendering is a messy mixture of 3DO and S3O stuff. Abstracting the model rendering with a sort of IModel and IModelInstance interfaces would allow adding other model formats as well (Such as a skeletal animation format).&lt;br /&gt;
&lt;br /&gt;
* Improve weapon collision detection with more complex shapes for the bigger units. Giving every model a set of convex collision meshes, saved in the S3O file, could be a solution. This will need a change in the s3o format and upspring editor, so you will need some cooperate with me on that part(jcnossen).&lt;br /&gt;
&lt;br /&gt;
* Bind a scripting language to Spring. Fnordia already started on this with lua and luabind, but since luabind does not compile on GCC (so I&#039;ve heard), it&#039;s not an option. Binding LUA could be done in other ways too ofcourse. &lt;br /&gt;
A lightweight and fast language that can call C/C++ directly is AngelScript (www.angelcode.com/angelscript), class support with inheritance is however not yet supported (WIP), but is already a good choice because it doesn&#039;t require wrapper functions.&lt;br /&gt;
&lt;br /&gt;
* Make more elements of spring data-driven. Explosion bitmaps, trees, etc... A lot of graphics are hardcoded and should be changeable with scripts or config files (FBI/TDF).&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5551</id>
		<title>Development:Main</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5551"/>
		<updated>2005-12-27T02:41:50Z</updated>

		<summary type="html">&lt;p&gt;Jcnossen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outlined below is information on assisting with the development of the Spring source itself.&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;small&amp;gt;NOTE: For information about developing a mod (units, maps, etc.) see the [[Mod Development]] page.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below you can find information on how to work with the Spring source in the current mainline (Windows platform) if you like to work on another platform (Linux &amp;amp; Mac) please look at the bottem of this page under &amp;quot;Multiplatform development&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Starting Development==&lt;br /&gt;
To start development, you&#039;ll need&lt;br /&gt;
#The latest version of the source &lt;br /&gt;
#A good code manipulation program&lt;br /&gt;
#Compiling your modified source&lt;br /&gt;
&lt;br /&gt;
===Source Code Documentation===&lt;br /&gt;
A good place to start is the source code documentation, which can be found here: [http://taspring.clan-sy.com/doxygen/ doxygen]&lt;br /&gt;
&lt;br /&gt;
An explanation on how the code is executed ingame can be found in the [[Spring Engine Code]]&lt;br /&gt;
page.&lt;br /&gt;
&lt;br /&gt;
===Obtaining the Source===&lt;br /&gt;
&lt;br /&gt;
If you just want to take a look at the code you can use [http://svn.berlios.de/viewcvs/taspring-linux/trunk/ HTTP based viewing of the repository]&lt;br /&gt;
&lt;br /&gt;
Another option is to manually download it along with the latest released version of the game. However, for serious developers, a better way would be to download the source straight from the subversion(SVN) repository. This will also allow you to make a patch out of the changes you make to the code, and send it to one of the developers with SVN access.&lt;br /&gt;
&lt;br /&gt;
More information about downloading from the svn repository is avaiable at the &lt;br /&gt;
[http://developer.berlios.de/projects/taspring-linux BerliOS Project page]&lt;br /&gt;
Two good windows SVN clients are SmartSVN and TortoiseSVN.&lt;br /&gt;
&lt;br /&gt;
===Learning C++===&lt;br /&gt;
You will need to know C++ to modify or understand Spring&#039;s source code. If you&#039;re interested in learning C++, see [[Learning_CPP]]&lt;br /&gt;
&lt;br /&gt;
However please note that badly designed code (code created by a C++ novice for example), will even if working not be included in the spring code. Spring is a large project, and therefore it is necessary to stay away from hackjobs and create general solutions to problems.&lt;br /&gt;
&lt;br /&gt;
===Modifying and Compiling the Source===&lt;br /&gt;
See [[Development_IDEs]]. You either have to use the SCons buildsystem that is used on linux, or use the vcproj for building spring in Visual Studio 2003.&lt;br /&gt;
Currently the build is actively updated for linux and for Visual Studio 2003 &lt;br /&gt;
You will needs these libraries:&lt;br /&gt;
&lt;br /&gt;
*[http://www.boost.org Boost C++ library]&lt;br /&gt;
*[http://www.openal.org OpenAL Audio library]&lt;br /&gt;
*[http://glew.sf.net GLEW (OpenGL extension loading)]&lt;br /&gt;
*[http://www.winimage.com/zLibDll/ zlib + minizip]&lt;br /&gt;
*[http://www.libsdl.org SDL]&lt;br /&gt;
*[http://openil.sf.net DevIL (Image loading)]&lt;br /&gt;
*[http://www.freetype.org Freetype font rendering]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Development Suggestions==&lt;br /&gt;
&lt;br /&gt;
Before starting to make modifications to the source, take a look at the [[development guidelines]] which outlines some important things to think about. To find something interesting to work on, look at the list of [[example projects]]. You can also check the list of [[whois doing what]] to see what others are doing. If you do edit the code, please add [[Doxygen style comments]] to the code, which will then enhance the source code documentation.&lt;br /&gt;
&lt;br /&gt;
===How to get your code included===&lt;br /&gt;
If you create something that you think should be included in the official source tree, you can send an email to the development mailing list shown at [[Linux]] page. Sending your code in the form of a patch (also known as a .diff file), will make the chances of including it in the main code.&lt;br /&gt;
It&#039;s also considered standard practice to post one&#039;s modifications in the [http://taspring.clan-sy.com/phpbb/viewforum.php?f=12 development forum] and get feedback.&lt;br /&gt;
&lt;br /&gt;
==Multiplatform development==&lt;br /&gt;
Current development is done on the portable code only, located at [http://taspring-linux.berlios.de Berlios]&lt;br /&gt;
All future releases will be based on this code.&lt;br /&gt;
The current spring code is being developed on Windows and linux. A mac port, as well as other unixes, is very possible, but currently no developers are working on this. &lt;br /&gt;
Use the mailing list listed on the [[Linux]] page to reach all developers (windows and linux). However if you have a feature request or bug report, the mantis bugtracker is probably a better way.&lt;br /&gt;
&lt;br /&gt;
See [[Glossary]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Jcnossen</name></author>
	</entry>
</feed>