FreeCraft (fka ALE Clone) Version 1.17
___________ _________ _____ __
\_ _____/______ ____ ____ \_ ___ \____________ _/ ____\/ |_
| __) \_ __ \_/ __ \_/ __ \/ \ \/\_ __ \__ \\ __\\ __\
| \ | | \/\ ___/\ ___/\ \____| | \// __ \| | | |
\___ / |__| \___ >\___ >\______ /|__| (____ /__| |__|
\/ \/ \/ \/ \/
______________________ ______________________
T H E W A R B E G I N S
FreeCraft - A free fantasy real time strategy game engine
(C) Copyright 1998-2002 by The FreeCraft Project. Distributed under the
"GNU General Public License"
Contents
Please refer to the GNU General Public License
document provided with this distribution. To proceed beyond this point,
is to agree with the license agreement.
The self extracting archive contains ZIP code, read the
ZIP-LICENSE.
The binaries could contain SDL code, read the
README-SDL.txt and the
GNU LGPL license.
The source and binaries contains SIOD code, read
and siod.html for
copyright and informations.
This software is provided as-is. The author(s) can not be held liable for
any damage that might arise from the use of this software.
Use it at your own risk.
Read this for the introduction:
readme.html
Read this how to install FreeCraft:
install.html
If you upgrade from an older beta version to a new one, please
always run build.sh. Some graphics or formats may have been
changed. Don't forget to backup your modified files.
Read this how to upgrade FreeCraft:
install.html
Read this for the history of FreeCraft:
ChangeLog.html
This file contains the known bugs and what we plan in the future:
todo.html
A more up to date list of known bugs are here:
SourceForge: FreeCraft real-time strategy game engine - Tracker - Bugs
A more up to date list of planned tasks are here:
SourceForge: FreeCraft real-time strategy game engine - Tasks
Read this, if you have problems compiling, installing or playing FreeCraft
faq.html or use the
help forum for questions.
- Health and mana and orders could be shown on the map.
- Better path finder routines.
- Loading of compressed (gzip or bzip2) puds.
- Configuration language.
- Scripting language.
- Easy replace of unit graphics and sounds.
- 64 times greater maps.
- Training queues.
- Way-points.
- Correct fog of war (terrain changes are not shown).
- Nice looking fog of war (alpha-gray-scale)
- More resolutions 640x480, 800x600, 1024x768 and 1600x1200.
- Support for up to 6 resources.
- Internet play.
Following projects are not assigned: (Please ask before start working)
- Write a map editor. (with support of greater maps)
- Write a AI editor.
- Write front end to FreeCraft. (Scenarios, puds, videos...)
- Write a video player. (fli or own format)
- Create own tilesets and unit graphics.
- Create own sounds, voices, videos and campaigns.
- Create an icon for window-manager.
- Create a jingle for startup and home-page.
- Write better documentation. (correct my English :-)
- Improved network support (viewer, proxy, automatic lag detection)
- Write better sound routines. (with mp3 or ogg and midi or xmi support)
- Write "build.sh" for demo-version.
- Port to X11 8bpp or 32bpp, full-screen and DGA support.
- Port to ggi.
- Port to msdos/djgpp.
- Write clone of the new game from the same company.
(Graphic and sound formats are mostly the same.)
- Multi-language support
- And any other help is welcome.
If you want to help, please join the FreeCraft mailing list and check
if not already somebody is working on your project. Than tell what you
want to make.
Look into the original game documentation for playing instructions.
Look into the sources for more informations.
freecraft [OPTIONS] [map.pud|map.pud.gz]
- OPTIONS
You can currently give following command line options. Use "freecraft -h" to
get an up to date information.
- -c "file.ccl"
Load FreeCraft config file "file.ccl" instead of the default
"librarypath/ccl/freecraft.ccl".
- -d "path"
Change the FreeCraft library path to "path" instead of the
default "./data" or "/usr/share/games/freecraft/default".
- -f factor
Adjust the build costs of units for the computer players by factor.
- -h
Show command line help.
- -l
Enable command log to "command.log"
- -p players
Number of network players to connect. This computer be
comes the game server.
- -n [localport:]serverhost[:port]
Connect to FreeCraft server serverhost.
serverhost is the name of the server like "freecraft.org"
or the IP number like "192.168.1.1". localport
is the port number on the local computer, port is the
port on the game server. The default ports are 6660. If you have a
firewall please let the port 6660/UDP through.
- -N name
Name of the player, for network play.
- -s frames
The AI sleeps 'frames' before it starts working.
- -t factor
Adjust the build time of units for the computer players by factor.
- -w
Wait until sound device comes available. (Only supported with linux OSS
driver)
- -D
Video depth = pixel pro point. Only useful if not automatic
detected.
- -S speed
Want to play slower? Use for 50 to play with half speed. Want to play
faster? Use 200 to play at double speed. (default is 100% which are
30 frames/second)
- -F
Full-screen video-mode. (Not supported on all platforms, just test)
- -W
Windowed video-mode.
- map.pud
Load the map "map.pud" instead of the default
"librarypath/default.cm".
- map.pud.gz
Load the compressed map "map.pud.gz" instead of the default
"librarypath/default.cm".
- map.cm
Load the FreeCraft map "map.cm" instead of the default.
- map.cm.gz
Load the compressed FreeCraft map "map.cm.gz" instead of the default.
If no file is given the default map
"librarypath/default.cm" will be loaded.
Keyboard commands
- cursor-left
Scroll map left. With control scroll faster.
- cursor-right
Scroll map right. With control scroll faster.
- cursor-up
Scroll map up. With control scroll faster.
- cursor-down
Scroll map down. With control scroll faster.
- RETURN
Enter command line.
- TAB
Toggle mini-map mode, with/without terrain.
- +
Increase game speed.
- -
Decrease game speed.
- ALT+B, CTRL+B
Toggle big map mode on/off.
- ALT+C, CTRL+C, c (if unused)
Center on selected units.
- ALT+X, CTRL+X
Exit program.
- ALT+Q, CTRL+Q
Quit level.
- ^
Unselect all units.
- # (1-9,0)
Recall unit group. All units in the group becomes the current selection.
If unit group is already selected, center on group.
- SHIFT + # (1-9,0)
Add the units of the group to the current selection.
- CTRL + # (1-9,0)
Define unit group. All currently selected units become the new group.
- SHIFT+CTRL + # (1-9,0)
Add to unit group. All currently selected units are added to the group.
- ALT + # (1-9,0)
Alternate unit group. All currently selected units are also added to the
new group.
- SHIFT+ALT + # (1-9,0)
Add to alternate unit group. All currently selected units are also added to
the group.
- F1,F2,F3,F4
Recall saved map position.
- SHIFT+F1,SHIFT+F2,SHIFT+F3,SHIFT+F4
Save current map position for later recall.
- ALT+G, CTRL+G
Toggle mouse grab mode.
- ALT+F, CTRL+F
Toggle fullscreen mode. (only with SDL under X11 supported)
- ALT+P, CTRL+P or pause
Toggle pause mode.
- CTRL+S
Toggle sound on/off.
- ALT+S, F11
Save complete state.
- ALT+L, F12
Load complete state.
- ALT+M, F10
Enter game menu.
- SPACE
Center on last message.
- ALT+I, CTRL+I
Find an idle worker.
Mouse commands
Clicking on minimap
Clicking on map
- Single click with left mouse button
Select unit.
- SHIFT Single click with left mouse button
Add or remove unit from selection. Could be combined with any other
modifier.
- CTRL Single click with left mouse button
Select all units of the same unit-type.
- ALT Single click with left mouse button
Select all units of the previous group.
- Double click with left mouse button
Select all units of the same unit-type.
- Click & Hold with left mouse button
Not supported.
- CTRL Single click with right mouse button on unit
Selected unit follows this unit.
- Single click with right mouse button
Does automatic action of the current selected unit.
- SHIFT Single click with right mouse button
Add automatic action of the current selected unit to the command queue,
this means the current order is first finished, than the unit starts
with this order.
- CTRL Single click with right mouse button
Does second automatic action of the current selected unit.
- ALT Single click with right mouse button
Not supported.
- Double click with right mouse button
Not supported.
- Click & Hold with right mouse button
Not supported.
The CCL is scheme. I use SIOD for this.
(The most recent release is available from
this web page)
. You can also enter CCL commands at the message prompt. Each
line starting with "(" is taken as CCL command.
New documentation
Here I have started a new documentation.
Please help me writing it.
Files
- librarypath/ccl/freecraft.ccl is loaded before any initialization.
Contains general configuration.
- librarypath/ccl/missile.ccl is loaded from freecraft.ccl.
Contains missile configuration.
- /ccl/sound.ccl is loaded from freecraft.ccl.
Contains sound configuration.
- librarypath/ccl/tilesets.ccl is loaded from freecraft.ccl.
Contains tileset configuration.
- librarypath/ccl/units.ccl is loaded from freecraft.ccl.
Contains units configuration.
Functions
Without any order:
Map CCL functions/variables
- reveal-map
- Reveal the complete map.
- set-fog-of-war!
- Enable or disable the fog of war.
- fog-of-war
- Enable the fog of war.
- no-fog-of-war
- Disable the fog of war.
- minimap-terrain
- Enable display of terrain in the minimap window.
- no-minimap-terrain
- Disable display of terrain in the minimap window.
- original-fog-of-war
- Enable original like fog of war style.
- gray-fog-of-war
- Enable gray fog of war style.
- fog-of-war-contrast contrast
- Set the gray style fog of war contrast.
Contrast could be from 0 to OO.
A contrast of 100 didn't change anything.
- fog-of-war-brightness brightness
- Set the gray style fog of war brightness.
Brightness could be from -100 to 100.
A brightness of 0 didn't change anything.
- fog-of-war-saturation saturation
- Set the gray style fog of war saturation.
Saturation could be from -100 to 200.
A saturation of 100 didn't change anything.
Unsorted CCL functions/variables
- show-health-bar
Show the health as bar on the map.
- show-health-dot
Show the health as dot on the map.
- show-mana-bar
Show the mana as bar on the map.
- show-mana-dot
Show the mana as dot on the map.
- show-full
Show full health or mana on the map.
- show-no-full
Show no full health or mana on the map.
- set-show-sight-range!
Show the sight range of the selected unit on map.
- set-show-reaction-range
Show the reaction range of the selected unit on map.
- set-show-attack-range
Show the attack range of the selected unit on map.
- speed-mine
Decrease the mining time by this factor.
- speed-gold
Decrease the time in a gold deposit by this factor.
- speed-chop
Decrease the time for chopping a tree by this factor.
- speed-wood
Decrease the time in a wood deposit by this factor.
- speed-haul
Decrease the time for haul oil by this factor.
- speed-oil
Decrease the time in an oil deposit by this factor.
- speed-build
Decrease the time to build a unit by this factor.
- speed-train
Decrease the time to train a unit by this factor.
- speed-upgrade
Decrease the time to upgrade a unit by this factor.
- speed-research
Decrease the time to research by this factor.
- speeds
Decrease the time off all by this factor.
- missile-type
Defines the missile types.
(missile-type slot name file width height)
- slot
The missile slot number.
- name
The missile name.
- file
The graphic sprites file.
- width
The width of a sprite.
- height
The height of a sprite.
Example:
(missile-type MissileLightning "Lightning" "lightning.png" 32 32)
Define the missile slot 0 as "Lightning".
- define-unit-type
unittype.html
- print-unit-type-table
unittype.html
- unit-type
Get the pointer to the unit type structure.
(unit-type ident)
- ident
- The unit-type unique identifier.
Example:
(unit-type "unit-peon")
Get the unit type structure of the peon. #
- unit-type-array
Get an array of all currently defined unit type structures.
(unit-type-array)
- get-unit-type-ident
Get the unique identifier of the unit type structure.
(get-unit-type-ident type)
- type
- Unit type pointer
Example:
(get-unit-type-ident (unit-type "unit-peon"))
Get the identifier of the unit type peon.
- define-map
Define the size of a new map.
(define-map width height)
- width
The width of the new map.
- height
The height of the new map.
Example:
(define-map 256 256)
Define a new map of the size 256 x 256.
- load-pud
Load a map in pud format.
(load-pud name)
Example:
(load-pud "data/default.pud.gz")
Load "default.pud.gz".
- freecraft-map
Define a map in FreeCraft own format.
(freecraft-map ...)
FIXME: Must write docu
- key-scroll-speed
Set the speed of keyboard scrolling.
(key-scroll-speed speed)
- speed
Number frames to wait between scrolls.
Example:
(key-scroll-speed 1)
Sets keyboard scrolling speed to fastest.
- mouse-scroll-speed
Set the speed of mouse scrolling.
(mouse-scroll-speed speed)
- speed
Number frames to wait between scrolls.
Example:
(mouse-scroll-speed 10)
Sets mouse scrolling speed to pretty slow ( 3 times / second.)
- Sound part
- sound-thread
Tells FreeCraft engine to use a threaded sound server. MUST be used in the
sound.ccl file, BEFORE the game fully starts. As no effect during the
game.
- sound-volume
Set global volume.
(set-sound-volume volume)
- volume
The volume from 0 (min=quiet) to 255 (max).
Example:
(set-sound-volume 128)
Set volume to 1/2.
- sound-off
Turn sound off. Can be later turned on by sound-on.
- sound-on
Turn sound on.
- sound-for-name
Return a SIOD sound id to be used in other functions.
(sound-for-name name)
- name
The name of the sound (a string).
Example:
(sound-for-name "tree chopping")
Returns the sound id of the tree chopping sound.
- set-global-sound-range
Set the cut off distance.
(set-global-sound-range distance)
- distance
The maximum range of a sound in tiles.
Example:
(set-global-sound-range 64)
Set the maximal sound range to 64 tiles. Sound events happening more
than 64 tiles away from the viewpoint won't be eared.
- set-sound-range
Set the cut off distance for a given sound.
(set-sound-range sound ratio)
- sound
The sound either described by its name (a string) or by its SIOD sound
id.
- ratio
This value (between 0 and 255) allows to compute the range of the
sound. 255 means an infinite range. Any number strictly below 255 is a
coefficient that will be applied to the cut off distance: the cut off
distance for this sound is ratio/254*cut off distance.
Example:
(set-sound-range "tree chopping" 50)
Set the sound range for "tree chopping" to 50/254 times the cut off
distance.
- define-game-sounds
Allows to define what sounds are going to be used for some game level
events (such as the click sound).
FIXME: Must write docu
- display-sounds
Test function. Dump on stdio all the client side mappings between sound
names and sound ids.
- map-sound
Defines a new mapping between a sound name (a string) and a sound id.
FIXME: Must write docu
- make-sound
Ask the sound server to register a new sound. Ask the sound client to store
the mapping between the obtained sound id and the given sound name.
FIXME: Must write docu
- play-sound
Ask the sound server to play a sound.
FIXME: Must write docu
The tileset graphic is loaded from 'png'-files. Only files with 256
indexed colors are currently supported.
The format of the tileset graphic is:
32x32 pixels of a tile.
16 tiles are stored per row.
The pixels (7,6),(7,14),(7,22),(7,30), (15,6),(15,14),(15,22),(15,30),
(23,6),(23,14),(23,22),(23,30) and (31,6),(31,14),(31,22),(31,30)
are used for the minimap picture. For a 32x32 map all 16 Pixels are used.
For a 128x128 map only the first one.
The colors of the palette reserved for the tileset:
HELPME: I don't know!
The conversion table from pud file to the internal format could be
changed with ccl.
More tileset informations
More user interface informations
The graphics are loaded from 'png'-files. Only files with 256 indexed
colors are currently supported.
The format of an unit sprite is:
FIXME: more to come
Look into tileset documentation, what I have found.
The sounds are loaded from 'wav'-files. Files with 8 or 16 bit, mono and
11025hz sample frequency are currently supported.
extract
Extract a compressed entry out of the original game data file.
Read the knowledge bases which entry contains what.
Usage: extract data-file entry output
- data-file
Compressed input data file. (normally maindat.war)
- entry
Entry number of the data-file.
- output
Output file for the uncompressed entry.
gfx2png
Convert compressed graphic (unit sprites) to png graphic file.
Usage: gfx2png palette file.gfx
- palette
Use palette in png file. "palette" is a raw file containing 768
bytes for 256 colors of r g b.
- file.gfx
File.gfx contains the graphics of the sprites. The output file is
file.png.
gfu2png
FIXME: must write docu.
img2png
FIXME: must write docu.
cur2png
FIXME: must write docu.
fnt2png
FIXME: must write docu.
tile2png
FIXME: must write docu.
aledoc
FIXME: must write docu.
Following things are used from other peoples. If not other mentioned,
protected by the following license "OpenContent License"
- cross.png, health.png, mana.png.
- (c) Copyright 1998-2002 by Johns.
- food.png
- Food resource icon (c) Copyright 2000 by the Guardian.
- score.png
- Score icon in resource (c) Copyright 2000 by the Guardian.
- ore,stone,coal.png
- Orc, Stone and coal icon in resource (c) Copyright 2000 by the Guardian.
- freecraft.bmp, freecraft.ico
- The FreeCraft icon (c) Copyright 2000 by Kyle.
Thanks to following people for helping me develop FreeCraft:
- Ari
- Edgar
- Valery Shchedrin
- Iftikhar Rathore
- Charles K Hardin
- Fabrice Rossi
- DigiCat
- Josh Cogliati
- Patrick Mullen
- Vladi Shabanski
- Cris Daniluk
- Patrice Fortier
- FT Rathore
- Trent Piepho
- Jon Gabrielson
- Lukas Hejtmanek
- Steinar Hamre
- Ian Farmer
- Sebastian Drews
- Jarek Sobieszek
- Anthony Towns
- Stefan Dirsch
- Al Koskelin
- George J. Carrette
- Guardian
- Michael O'Reilly
- Dan Hensley
- Sean McMillian
- Mike Earl
- Ian Turner
- David Slimp
- Iuri Fiedoruk
- Luke Mauldin
- Nathan Adams
- Stephan Rasenbergver
- Dave Reed
- Josef Spillner
- James Dessart
- Jimmy Salmon
- Jan Uerpmann
- Aaron Berger
- Latimerius
- Antonis Chaniotis
- Samuel Hays
- Nehal Mistry
- Patrick Beasley
- David Martinez Moreno
- Flavio Silvestrow
- Daniel Burrows
- Dave Turner
And to all I have forgot to write up!
Please drop me an email, if I forgot you.
All trademarks and copyrights on this page are owned by their respective owners.
The FreeCraft Project