Recent Changes - Search:

Main.SideBar (edit)

PmWiki

Guidelines

When writing code or scripts for boson, please follow a few general guidelines. For C++ code, also have a look at the coding style page.

  • Don't use the class Player or player.h if it can be avoided. This class provides direct access to the player and using it easily results in broken network or an unfair game (due to cheating). You should usually use the PlayerIO class instead.
  • The same goes for BosonCanvas, although not that strict. Please do not use canvas->findUnitAt() or similar methods - unless you really know what you are doing. Most of the time you should be using playerIO->findUnitAt() . This is because BosonCanvas does not know about fog of war and similar things, whereas PlayerIO does.
  • In short: use PlayerIO whenever possible. For script authors this should be ensured already.
Edit - History - Print - Recent Changes - Search
Page last modified on January 15, 2005, at 15:34