Link between Prog&Play and Spring
For each interface available with Prog&Play (Ada, C, Java, OCaml, Python and Scratch), an example is supplied in order to easily test interactions with the game. For each programming interface, you can read the "README.txt" file that details the procedure to execute the example.
Example for the first mission of
KP Campaign: Digital War with Scratch
Remark: Editing of programs is not performed in the game environment. An IDE is required and depends on the programming language you want to use (for example use Eclipse for Java, DevCpp or Visual Express for C/C++, Idle for Python or updated Scratch version). Also, you can use a text editor with a compiler for the desired programming language.
Do not hesitate to draw heavily on these examples as a starting point to create your own programs in order to use them in multiplayer games or solve missions.
Good game and good programming...
Documentations
In addition to interfaces comments that describe each available function, we export web documentation for C and Java interfaces:
More games...
Several games are available for Spring engine. You will find an official list here. Most mods are compatibles with the Prog&Play system. If you want to use another mod than "Kernel Panic", you must generate the constants list for the chosen mod:
- Find the "CstList.sdz" file in the "mods" folder
- Rename the file with a ".zip" extension
- Unpack this archive on the directory of your choice
- Edit "ModInfo.lua" file
- Find "depend={...}" string
- Modify dependency and write between quotes the mod it depends on (do not use filename but name printed on Spring menu instead)
- Rebuild "CstList.zip" archive
- Rename this file with "sdz" extension
- Put this archive in the "mods/" directory of your game
- Launch "Spring" and select "Gives Constants List 1.0" mod
This "mod" lists all units as well as their respective commands for the mod it depends on. These data are logged in "infolog.txt" file. Then you have to identify constants that you think interesting for your algorithm (This procedure hes been used to generate the "constantList_..." files).