BombSquad Release Notes for Developers

This page contains a detailed change-list of BombSquad changes; specifically those that pertain to modding the game.

Version 1.4.99 (API 4)

  • Obviously this page has been lapsing for a while but am trying to get back in the habit of updating it.  The big change in 1.4.99 is the api-version changing from 3 to 4.  This means you’ll need to modify the bsGetAPIVersion() call in any custom scripts in order for them to work with new builds.  In api 4 I’ve removed the following functions from the bs module: bs.translate(), bs.getResource(), bs.getStringWidth(), and bs.getStringHeight().  In their place is the new bs.Lstr() class (short for localized-string).  This functions largely the same as translate() or getResource() but instead of immediately returning a translated string it allows one to be generated in any language at a later time.  This means that if you host a game and create a bunch of text nodes on-screen, any connected client will see them in their own language instead of everyone seeing the language the host is set to.  getStringWidth() and getStringHeight() are removed for related reasons: if a string can display in any language then it is not going to have a single width or height.  Use things like ‘maxWidth’ and ‘scale’ to ensure text fits where you want it to.  Handy pro-tip:  when laying out text, set its value to dummy values that are twice as long as you expect them to be to make sure maxWidth values are doing their thing.  Handy pro-tip #2: on keyboard-enabled builds you can press F9 to toggle between English and Gibberish languages; if things are wired up correctly with Lstr() values you should see everything on the screen update live.

Version 1.4.0

  • This release adds network play, replays, and lots of other stuff, but doesn’t make any significant API changes. For net-play, just keep in mind that low level node operations (creating nodes, setting their attributes, etc.) have to be sent over the network, so when possible minimize the amount of calls being made. As an example, a node.connectAttr() call is much more efficient than a setattr() wrapped in a repeating timer. The connectAttr() only needs to be sent over the network once, whereas each setattr() call must be sent individually, requiring additional network bandwidth.

Version 1.3.29

  • Mainly just minor bug fixes related to all the changes in 1.3.28; nothing really new here.

Version 1.3.28

  • bs.Activity constructors no longer take a ‘session’ argument (current session is now managed under-the-hood)
  • bs.Actor constructors no longer take an ‘activity’ argument (current activity is now managed under the hood)
  • also removed the RETAINED/UNRETAINED argument to bs.Actor.  If you want your actor to be automatically retained by the activity, you can call its autoRetain() method.
  • game classes now need to implement a getAPIVersion() method to indicate which game api-version they’re targeted for.  This will prevent out-of-date game scripts from loading and potentially failing in mysterious ways; instead a warning is issued that the script needs updating. The api-version is currently set at 2.
  • on the mac version, logging now go through NSLog instead of just printf/stderr, so you can view errors/etc in the Console app with timestamps and all that nice stuff.
  • the ‘scale’ attr on the ‘text’ node is now a single float; not an array.
  • bs.playSound() can no longer take a node/attr pair as position; it now just takes a 3-float position
  • There’s now a new concept of ‘Contexts’ under the hood, in preparation for net-play and dynamic downloads.  An activity class such as a game has its own context and all media/nodes/etc need to be created in that context.  This should be mostly automatic from a modding perspective (i.e.: Timers/etc will automatically restore the correct context when running their payloads, etc) but just something to be aware of for corner cases.  See bs.Context in the docs.
  • lots of classes that used to take an Activity as an explicit argument no longer do (they operate on the current context activity implicitly instead)
  • ‘translate’ attributes have been renamed to ‘position’ on all nodes and actors
  • there’s now the concept of ‘finalized’ actors, activities, etc.  This happens when an activity is shutting down, and is a cue that no more actions should occur (node creation, media loading, etc) in the activity.  See bs.Actor.onFinalize()
  • bs.newMaterial() is no more; you now just call bs.Material() to instantiate one
  • added several attributes to the prop node which can be used to get a variety of physical behavior: ‘density’,’maxSpeed’,’damping’,’extraAcceleration’, ‘gravityScale’, and ‘bodyScale’
  • running is now an analog value instead of True/False, so analog triggers can give a finer degree of control
  • low level spaz node controls are all just attributes on the spaz node now (‘punchPressed’, etc) instead of message based

Version 1.3.27

  • added bs.reloadMedia()
  • bs.Activity.onTeamLeaving is now onTeamLeave
  • bs.Activity.onTeamJoined is now onTeamJoin
  • bs.Activity.onPlayerLeaving is now onPlayerLeave
  • bs.Activity.onPlayerJoined is now onPlayerJoin
  • cleaned up arg names for many UI functions (buttonWidget, etc): stuff like ‘valueCall’ is now ‘onValueChangeCall’, etc.  Also removed some unused args to simplify things.

Version 1.3.26

  • (just created this page).  At this point, BombSquad is midway through a re-organization of the Python layer.  This is intended to simplify the modding process and prepare the game for net-play.  Expect some substantial API changes in the next few versions, but hopefully things will stabilize a bit after that.

Leave a Reply

Your email address will not be published. Required fields are marked *