Friday, December 26, 2008

Some news about SoundRTS

A new test version might be released before February:
- It would include the files for a metaserver (just in case the
current one disappeared for good).
- The URL of the metaserver and of the what-is-my-ip server would be
defined in a text file.

A new unstable version might be released before April:
- The rules of the game would be defined in text files (and the AI
probably too).

Friday, August 1, 2008

[log] SoundRTS 1.0 beta 10 o released (test version)

Available at:
http://jlpo.free.fr/soundrts

The main changes since beta 9 are:

Optimizations:
- in multiplayer games, the clients and the server communicate in a more efficient way: only the orders are sent to the server, and each client simulates the game, so the multiplayer games are much faster and allow much more units.
- in solo and multiplayer games, important speed improvements, especially for big maps or games with many units

Interface:
- new: press control + tab to cycle through woods, gold mines and meadows
- now the units emit a signal when they are given an impossible order or when the order is no longer possible
- change: press F9 instead of F12 to check the objectives
- change: press F11 instead of F9 to check the players (in a multiplayer game)

Game rules:
- the food provided by farms is 8 instead of 4
- the training time is divided by 2 (the research time stays the same)
- the global food limit is not dynamically shared among the players anymore, but is simply the food limit for each player and for the entire game (for example, instead of having, in a map with 2 players and a global limit of 80 food, 80 divided by 2 equals 40 food for each player, now each player simply have a maximum of 80 food.)
- now a mage don't try to teleport to his current square (useful to save mana when giving the same teleportation order to many mages)
- removed HP auto-regeneration (instead of 1 HP every 15 seconds)
- added a cost to repairing; repairing a building costs less resources than building a new one but takes more time
- improved wood gathering (lumber mill): now a peasant brings back 3 wood instead of 2.5 wood

Multiplayer:
- about 50 multiplayer maps (thanks to the contributors!)
- added a very fast speed (4 times) for multiplayer games
- list players and games when login
- say the players list of a game when a player registers or unregisters for this game
- the server will disconnect players who pause or timeout for too long (20 s), so the other players can continue to play

Wednesday, July 30, 2008

[log] SoundRTS 1.0 beta 10 n released (unstable version)

Warning: if you have edited the file style.txt, make a backup copy of it before updating.

Available at:
http://jlpo.free.fr/soundrts

The changes from beta 10 m are:
- bug fix: an error could occur when the unit's menu changed during the sending of an order
- bug fix: the save option could appear in the multiplayer game menu (when the game had only one human player)
- now the default square_width is 12 (previously, the maps would not work without defining it)
- bug fix: problem if a player tried to register to an already started multiplayer game
- bug fix: problem if a player tried to register to a full multiplayer game
- bug fix: the game probably stopped when a unit was given a "patrol" order to an object that didn't exist anymore

Monday, July 28, 2008

[log] SoundRTS 1.0 beta 10 m released (unstable version)

Warning: if you have edited the file style.txt, make a backup copy of it before updating.

Available at:
http://jlpo.free.fr/soundrts

The changes from beta 10 l are:
- bug fix: the game could stop when air units arrived in an enemy base (for example in map Z1)

Saturday, July 26, 2008

[log] SoundRTS 1.0 beta 10 l released (unstable version)

Warning: if you have edited the file style.txt, make a backup copy of it before updating.

Available at:
http://jlpo.free.fr/soundrts

The changes from beta 10 k are:
- bug fix: knights would flee dragons even if they were protected by archers; this caused the units to unnecessarily scatter over several squares, leading to a weaker defence
- change: in the official maps, the title is automatically deduced from the file name ("title" is ignored)
- updated readme.txt from the multi platform version (added installation instructions for Debian GNU/Linux)
- updated the game's manual (updated the food amount provided by farms; removed the time needed to train a unit)
- feature temporarily removed : the client will not automatically update the maps (this feature is not mature enough for the imminent stable version; it will be back in the unstable version when the stable version is released)

About maps:
- removed "multi" from the map file names
- renamed maps 1 to 3 to JL1 to JL3
- renamed maps 101 and 102 to BS1 and BS2
- updated maps KEL1 to KEL4
- updated SG2 map (now the computer-only units must be destroyed too)

Wednesday, July 23, 2008

[log] SoundRTS 1.0 beta 10 k released (unstable version)

Warning: if you have edited the file style.txt, make a backup copy of it before upgrading.

Available at:
http://jlpo.free.fr/soundrts

The changes from beta 10 j are:
- the client plays an "upgrade" sound when it is checking for map updates or is updating maps
- bug fix: on maps where square_width is not 12, some movements with the arrow keys on the map were incorrectly allowed
- bug fix: sometimes the AI wouldn't complete a building and would start a new one

About maps:
- added 1 map by Onj: ONJ1
- added 3 maps by Jason Symes: JS8 to JS10
- added 3 maps by Steady Goh: SG2 to SG4 (warning: SG3 and SG4 are still slow with the current beta 10 version; I will improve the speed in the beta 11)
- updated CE1 to CE5 (essentially the number of farms)
- minor update of KEL6 (converted to DOS mode instead of UNIX mode)

[maps] 07/22/2008

- added 3 maps by Steady Goh: SG2 to SG4 (warning: SG3 and SG4 are still slow with the current beta 10 version; I will improve the speed in the beta 11)

More information available at http://jlpo.free.fr/soundrts/maps.htm (or in each map file, of course).

Monday, July 21, 2008

[maps] 07/21/2008

- added 2 maps by Jason Symes: JS9 (Death's Doorstep) and JS10 (Shifting Alliances)

More information available at http://jlpo.free.fr/soundrts/maps.htm (or in each map file, of course).

Sunday, July 20, 2008

[maps] 07/20/2008

- updated CE1 to CE5 (essentially the number of farms)
- minor update of KEL6 (converted to DOS mode instead of UNIX mode)
- added 1 map by Jason Symes: JS8 (Mage Menagerie)
- added 1 map by Onj: ONJ1 (4000)

More informations are available at http://jlpo.free.fr/soundrts/maps.htm (or in the comments of each map file, of course).

[log] SoundRTS 1.0 beta 10 j released (unstable version)

Warning: if you have edited the file style.txt, make a backup copy of it before upgrading.

Available at:
http://jlpo.free.fr/soundrts

The changes from beta 10 i are:
- bug fix: the game could stop in some circumstances during the training of a unit
- feature fixed: the town hall, the keep and the castle have different sounds
- optimization: the initialization of a game will be faster, especially for maps where several computer_only opponents are defined
- bug fix: the peasants would always return the resources to the same town hall or lumber mill

Saturday, July 19, 2008

[log] SoundRTS 1.0 beta 10 i released (unstable version)

Warning: if you have edited the file style.txt, make a backup copy of it before upgrading the program.

Available at:
http://jlpo.free.fr/soundrts

The changes from beta 10 h are:
- bug fix: the sword started whistling in the fight after it was upgraded
- bug fix: in maps like CE2 (without a town hall available from the start), having to return the gold caused the game to freeze
- bug fix: in a multiplayer game, if the map requires more than 20 seconds of initialization, the clients with the slowest computers (even with only a 5 seconds difference) would be disconnected by the server
- added 2 maps by QuentinC : QC2 and QC3
- renamed the map 8QC (now QC1)
- added 1 map by Kelvin Tan: KEL6
- added 5 maps by Valentin: Z1 to Z5 (zombie planet)

[maps] 07/19/2008

- added 1 map by Kelvin Tan: KEL6
- added 5 maps by Valentin: Z1 to Z5 (zombie planet)

More informations are available at http://jlpo.free.fr/soundrts/maps.htm (or in the comments of each map file, of course).

Friday, July 18, 2008

[maps] 07/18/2008

- added 2 maps from QuentinC : QC2 and QC3
- renamed 8QC (now QC1)
- fixed: the maps MB1 to MB9 didn't appear in the list

Thursday, July 17, 2008

[log] SoundRTS 1.0 beta 10 h released (unstable version)

Available at:
http://jlpo.free.fr/soundrts

The main changes from beta 10 g are:
- fixed feature: save and restore a game
- new feature: the multiplayer maps are automatically updated
- new feature: the sound effects are now declared in a file called style.txt
- new maps: 9 maps from Martin Blythe (note to map makers: more maps will be added or updated soon, using the auto-update feature)

Other changes:
- bug fix: the computer AI wasted resources since the beta 10g
- fixed feature: the attacks make a different sound after a weapon upgrade
- bug fix: now the server inserts silences between the names when listing the players
- bug fix: in multiplayer maps with monsters, the winner had a defeat message
- bug fix: when hitting F3, the time was incorrect
- bug fix: the minute bell rang too often (control + F3 to set it)
- minor change: when a player quits a game by using the F10 menu twice (useful in the rare case where the server doesn't reply), the full score will be given (instead of a laconic "defeat" message)

Monday, July 14, 2008

07/15/2008 (working on the future beta h version)

Here are the changes since the previous post:
- fixed feature: the attacks make a different sound after a weapon upgrade
- new feature: the sound effects are now formally described in a file called style.txt ; this file is not only useful as a documentation about the use of each sound effect: it can also be edited to change the level of detail of the client and add new sounds (for example: different sounds to reply to an order, depending on the unit type)
- bug fix: the computer AI wasted resources since the change of the peasant's resource gathering behavior that appeared in the beta 10g, leading to a very slow development (for example in map 2); now, the peasant's cargo is remembered, so it will be rarely wasted; for example, when a peasant who is transporting gold is given the order to build a farm, he will start to build it immediately, but he will not forget to go to a townhall as soon as he is ordered to gather gold or wood again

Saturday, July 5, 2008

07/05/2008 (working on the future beta h version)

Here are the changes since the previous post:
- new feature: every time a client or a server is started, the multiplayer maps are automatically updated if needed; the latest maps are still available by default in the installation packages, so Internet access is not mandatory
- bug fix: in multiplayer maps with monsters, the winner had a defeat message
- bug fix: now the server inserts silences between the names when listing the players

Monday, June 23, 2008

06/23/2008 (working on the future beta h version)

These 3 days, I have fixed the save and restore feature. At the moment, it won't be possible to restore from within a game: restoring will be done only from the single player menu. At least this feature is back.

Friday, June 20, 2008

06/20/2008 (working on the future beta 10 h version)

Yesterday and today, I have started to refactor the code, with the aim of restoring... the save and restore game feature! At the moment, the only external change is:
- minor change: when a player quits a game by using the F10 menu twice (useful in the rare case where the server doesn't reply), the full score will be given (instead of a laconic "defeat" message)

Wednesday, June 18, 2008

06/18/2008

Today I have fixed the following bugs:
- bugfix: when hitting F3, the time was incorrect
- bugfix: the minute bell rang too often (control + F3 to set it)

Sunday, May 4, 2008

[log] SoundRTS 1.0 beta 10 g released (unstable version)

The main changes from beta 10 f are:
- optimization: important speed improvements, especially for big maps or games with many units; will have an effect in solo and multiplayer games
- the server will disconnect players who pause or timeout for too long (20 s), so the other players can continue to play
- in the world simulation, replaced floating point numbers with integers, necessary to guarantee the synchronization between the clients (for example: x, y, gold, wood, HP, mana)
- fixed a synchronization error that sometimes appeared during a fight, when a unit must choose a target
- more detailed checking of the synchronization between clients in multiplayer games
- better logging of the synchronization errors
- added multiplayer map SG1

Other changes:
- fixed bug: some Russian TTS sounds were missing
- now the units emit a signal when they are given an impossible order or when the order is no longer possible
- now mages don't try to teleport to the same place (useful to save mana when giving the same teleportation order to many mages)
- removed HP auto-regeneration (instead of 1 HP every 15 seconds)
- now the units stop after 5 seconds even if they have not reached the center of the square or the object that they were told to go to
- now the peasants that are mining gold and are told to chop wood will immediately stop mining gold
- when a building order is given, the resources are reserved, until the construction site is set or canceled
- now the building time and the maximum number of hit points of a building are 2 independent parameters (useful later)
- now the buildings are placed exactly where the meadow was
- added a cost to repairing; repairing a building costs less resources than building a new one but takes more time
- improved wood gathering (lumber mill): now a peasant brings back 3 wood instead of 2.5 wood

Sunday, April 6, 2008

[log] SoundRTS 1.0 beta 10 f released (unstable version)

The changes from beta 10 e are:
- this version is unstable again, in order to allow users to play in multiplayer games with beta 9 if they find too many problems with the beta 10 versions
- bug fixed: synchronization errors in multiplayer games were not written on the server log

Monday, March 31, 2008

[log] SoundRTS 1.0 beta 10 e released (test version)

The only change from beta 10 d is:
- annoying bug fixed: when being attacked or when attacking enemy squares, several knights would always spill over to adjacent squares

Sunday, March 30, 2008

[log] SoundRTS 1.0 beta 10d released (test version)

The changes from beta 10c are:
- added a map (JS4)
- test version (instead of unstable)

Because of temporary problems of the version control system, this version is only available in English. When this version is stable enough, the other languages will be added, and a stable version of the beta 10 will be released. Until this happens, the version alert ("a new version is available") will be switched off.

Friday, March 28, 2008

[log] SoundRTS 1.0 beta 10c released (unstable version)

SoundRTS 1.0 beta 10c (unstable version) is available in English at the following URL:

Windows installer:
http://jlpo.free.fr/soundrts/soundrts-1.0-b10c-en.exe

Multi platform:
http://jlpo.free.fr/soundrts/soundrts-1.0-b10c-en.zip

The single player "save and restore" feature is broken, but the rest of the single player features should work.

The changes from the beta 10b version are:
- fixed intro sequence in mission chapters
- fixed version alert (must be read)
- now a standalone beta 10 server doesn't require pygame
- fixed bug: now registering too many players for a game isn't possible any more
- added 12 multiplayer maps
- removed "multiplayer" from the map names (faster menus)
- added a very fast speed (4 times) for multiplayer games (might not work that much, though; try it)
- the food provided by farms is 8 instead of 4
- the training time is divided by 2 (the research time stays the same)
- list players and games when login
- say the registered players list of a game when a player registers or unregisters for this game

If you find a server called JL, please use it, so I will be able to check if, for example, there are synchronization problems between the clients.

Sunday, March 23, 2008

[log] SoundRTS 1.0 beta 10b released (unstable version)

SoundRTS 1.0 beta 10b (unstable version) is available in English at the following URL:

Windows installer:
http://jlpo.free.fr/soundrts/soundrts-1.0-b10b-en.exe

Multi platform:
http://jlpo.free.fr/soundrts/soundrts-1.0-b10b-en.zip

This unstable version is only meant to test the new multiplayer architecture. The single player part is probably broken (essentially the "save and restore" feature).

The changes from the beta 10a version are:
- the server asks for the game speed before the game start
- sub menu for map choice in the server menu
- the delay between an order and its execution is computed at the game start
- now the player can set the voice relative volume from the menu (and not only from the game interface)
- the global food limit is not dynamically shared among the players anymore, but is simply the food limit for each player and for the entire game (for example, instead of having, in a map with 2 players and a global limit of 80 food, 80 divided by 2 equals 40 food for each player, now each player simply have a maximum of 80 food.) This will allow me to simplify the code which is not required anymore because of the higher network speed.
- tried to solve the blocking problems of collisions (more place between buildings, and lowered the radius of the units)
- the client quits when its server (previously opened from this client) quits
- bug fix: the game never started if aggressive AI
- fixed bug with menu updates: if a mage is trained, then if teleportation is researched next, the mage menu still don't have this power until he moves (even in the same square)

If you find a server called JL, please use it, so I will be able to
check if, for example, there are synchronization problems between the
clients.

Saturday, March 22, 2008

First results of the multiplayer tests

Thanks to the testers, I have fixed a bug that happened rarely when I tested the game, and happened all the time when the testers started a multiplayer game against the computer (the game never started). It happened all the time for the testers because they chose systematically the "aggressive" computer, because it's their favorite level, while I chose most of the time the "passive" one, because it's earlier in the menu list. In fact, due to a misspelling, the "aggressive" computer was not initialized correctly.

Most testers didn't find any player to play against, so I logged in once and played against the player called: "teleportation sound". Well, it was fun, at least for me, even if I didn't win. At a moment of the game, I would have said "wow" or "lol" to express a surprise. Maybe a limited chat with some classic expressions would be good: hi, gl, hf, gg, lol, bye. Or maybe a 3 letters chat.

In the next version the "create game" menu will start with a submenu to choose a map, so that the player can easily enter a game where he has just been invited to, without being overwhelmed by the maps list.

For the moment, no coordination error between game clients has been noticed.

Thursday, March 20, 2008

[log] SoundRTS 1.0 beta 10a released (unstable version)

SoundRTS 1.0 beta 10a (unstable version) is available in English at
the following URL:

Windows installer:
http://jlpo.free.fr/soundrts/soundrts-1.0-b10a-en.exe

Multi platform:
http://jlpo.free.fr/soundrts/soundrts-1.0-b10a-en.zip

This unstable version is only meant to test the new multiplayer architecture. The single player part is probably broken.

The main change is the way the clients and the server communicate in multiplayer games: only the orders are sent to the server, and each client simulates the game. This way the game should be faster and allow more units. New bugs might appear, though.

Other changes:
- now the player can invite the aggressive computer even if he has not completed the single player campaign
- map making: removed old single player example map
- map making: single player campaigns (victory unlocks the next chapter)
- map making: mission chapters (in a campaign)
- map making: custom sounds (in a campaign)
- map making: cut scene chapters (in a campaign)
- map making: introduction cut scene (in a mission) (for example: a briefing)
- map making: cut_scene (play a cut scene during a mission)
- added a "victory, do you want to continue?" menu and a "defeat, do you want to restart?" menu after a single player chapter of a campaign
- change: press F9 instead of F12 to check the objectives
- change: press F11 instead of F9 to check the players (in a multiplayer game)
- new: press control + tab to cycle through woods, gold mines and meadows
- map making: several objectives (in a mission); can be added during a mission
- map making: new trigger condition: has_entered (example: "has_entered b2" is true when the player enters b2)
- removed the "Ctrl + F6: wait for combat sounds" option
- fixed a bug where the player couldn't always build after a game is restored
- map making: new trigger action: add units in a square (for example: reinforcements)

Known bugs:
- sometimes, the multiplayer game doesn't start (check this by
pressing control shift f3: you should hear the heartbeat of the game);
if you have this problem, ask to quit twice (the second time will
work) and start a new game; feel free to report this problem, though.
- if you start a server and stop it, and start it again without
closing the program, the server will not start the second time; close
the program if you have to restart the server.

About the speed of the game, you will find that there is a fixed delay between the moment where you give an order and the moment where you have the confirmation. This delay is necessary when there is latency, so every player plays in the same conditions even if some of them have higher latency delays. Later, I will make this delay adjustable, probably automatically, so the delay is near zero in a LAN game, while it will be higher in an Internet game, depending on the actual
latency.

If you find a server called JL, please use it, so I will be able to check if, for example, there are synchronization problems between the clients.

Monday, March 10, 2008

[planning] future SoundRTS 1.0 beta 10a (unstable)

The main change of the beta 10a will be:
- improved population limit and faster multiplayer games; requires a big architecture change

The following changes, initially included in the beta 9i, will be in the beta 10a:
- now the player can invite the aggressive computer even if he has not completed the single player campaign
- map making: removed old single player example map
- map making: single player campaigns (victory unlocks the next chapter)
- map making: mission chapters (in a campaign)
- map making: custom sounds (in a campaign)
- map making: cut scene chapters (in a campaign)
- map making: introduction cut scene (in a mission) (for example: a briefing)
- map making: cut_scene (play a cut scene during a mission)
- added a "victory, do you want to continue?" menu and a "defeat, do you want to restart?" menu after a single player chapter of a campaign
- change: press F9 instead of F12 to check the objectives
- change: press F11 instead of F9 to check the players (in a multiplayer game)
- new: press control + tab to cycle through woods, gold mines and meadows
- map making: several objectives (in a mission); can be added during a mission
- map making: new trigger condition: has_entered (example: "has_entered b2" is true when the player enters b2)
- removed the "Ctrl + F6: wait for combat sounds" option
- fixed a bug where the player couldn't always build after a game is restored
- map making: new trigger action: add units in a square (for example: reinforcements)

The following changes will probably be in the beta 10b or later:
- easier way to start multiplayer games
- a new single player map illustrating the new map making features
- map making: custom units (for example: a hero unit, or special units)

The following changes are planned for after the beta 10:
- add lesson 1 of a very easy in-game tutorial (doing many things in the same square first)
- add scout towers, mutable to arrow-throwing towers or to cannon towers
- catapults can attack units in adjacent squares but only if the unit is seen, but cannot attack units in the same square
- add limited persistence of enemy units in fog of war
- add lessons for the tutorial
- the player can select allied computers or not
- the players can ally during a multiplayer game
- the player can choose between more than one race
- a player can replay and examine a recorded multiplayer game
- an observer can examine a multiplayer game being played
- difficulty levels?

Friday, January 4, 2008

Some pygame examples for audiogame programming

While there are tutorials for pygame, they often contain graphic examples. So I have started to write some very simple examples focused on audiogames programming.

To use this tutorial, you should already know Python. The Python tutorial is a good start; there is Dive into Python too. To run the examples, you must have Python and pygame installed.

You can download all the examples (with the sounds) here.

Example 1: play a sound and change its stereo position


The example 1 shows how to play a sound and pan it. To go further:
Edit: warning! nowadays, it might be necessary to initialize the display or no sound will be heard! for example: pygame.display.set_mode((200,100))

# example1.py
# play a sound to the left, to the right and to the center

# import the time standard module
import time

# import the pygame module
import pygame


# start pygame
pygame.init()

# load a sound file into memory
sound = pygame.mixer.Sound("bird.ogg")

# start playing the sound
# and remember on which channel it is being played
channel = sound.play()
# set the volume of the channel
# so the sound is only heard to the left
channel.set_volume(1, 0)
# wait for 1 second
time.sleep(1)

# do the same to the right
channel = sound.play()
channel.set_volume(0, 1)
time.sleep(1)

# do the same to the center
channel = sound.play()
channel.set_volume(1, 1)
time.sleep(1)



Example 2: read keyboard events


The example 2 shows how to read events from the keyboard. To go further:

# example2.py
# start playing a sound when a key is pressed
# exit if the letter "q" or the "escape" key is pressed

# import the pygame module
import pygame


# start pygame
pygame.init()

# load a sound file into memory
sound = pygame.mixer.Sound("bird.ogg")

# start the display (required by the event loop)
pygame.display.set_mode((320, 200))

# loop forever (until a break occurs)
while True:
  # wait for an event
  event = pygame.event.wait()
  # if the event is about a keyboard button that have been pressed...
  if event.type == pygame.KEYDOWN:
      # ... then start playing the sound
      sound.play()
      # and if the button is the "q" letter or the "escape" key...
      if event.unicode == "q" or event.key == pygame.K_ESCAPE:
          # ... then exit from the while loop
          break

That's all for the moment!