BombSquad Modding Guide Episode 1: Hello World

Alright let’s do this.  Its time to mod the squad.

In this first tutorial we’re going to learn how to issue commands to BombSquad as it is running, which is very useful for modding and tinkering purposes.

What you’ll need:

  • BombSquad version 1.3.15 or newer (the version number is visible at the bottom right of the screen when you launch the game) Grab an update from the Mac/OUYA/etc app store if you’re out of date.
  • Python scripting knowledge.  BombSquad’s game logic is written in Python, so you’ll need to be familiar with the language. It’s pretty nifty and useful outside of the game too; go to python.org to learn about it.  BombSquad uses Python 2.7.

Option 1: The In-Game Console

If you are running BombSquad on Mac, Windows, or Linux, you can simply press backquote (`) or F2 to bring down the system console which will let you issue Python commands directly to the game. This is convenient, though functionality is a bit basic at the moment (no copy/paste, etc). For that reason you may still want to opt for option 2 even on these OSs.

Option 2: Telnet

The second option for talking to BombSquad is via a telnet client from your Mac/PC/etc. This is handy when you’re running BombSquad on a machine without a keyboard attached, such as an OUYA. Macs and Linux machines should have command-line telnet clients installed already; on Windows you may have to download a client such as ‘Putty’. Note that BombSquad’s telnet support is pretty rudimentary, so you may need to configure your client to connect in the most simple way possible to avoid strange errors.

Telnet Step 1: Find the game host’s IP address

We’ll need to know where to connect our telnet client to.  If you’re running BombSquad on an OUYA, go to MANAGE->SYSTEM->CONSOLE INFO to find its IP Address.  If you’re running BombSquad on the same machine you’ll be telneting from, you can just use ‘localhost’ as your address.

Telnet Step 2: Connect

Make sure BombSquad is running on your OUYA/Mac/etc, and then open a terminal on your computer and type the following to connect to the game, replacing ‘192.168.1.5’ with the address you found in the previous step:

telnet 192.168.1.5 43250

This will attempt to establish a telnet connection to the game on port 43250.  If this works, you should see a message pop up on your BombSquad game asking if you want to allow the telnet client to connect.  Hit ‘Allow’.

You should now see a prompt such as this:

bombsquad>

Ok, you’re connected; now say hello.

At this point you can enter python commands for the game to run.  As an example, type the following and hit return:

dir(bs)

This will print a list of everything in the ‘bs’ module, which contains bombsquad’s core functionality.  To learn more about something, you can use the builtin Python help.  For instance, type the following to learn about the ‘bs.screenMessage’ function:

help(bs.screenMessage)

As you can see via help, this function lets us print stuff to the screen.  Let’s give it a whirl by typing the following:

bs.screenMessage("HELLO WORLD!")

When you hit return you should see that message pop up in BombSquad.  Ta-da!

And that’s it for our first tutorial.  In the next tutorial we’ll build on that by looking at BombSquad’s internal scripts and starting to modify them for our nefarious purposes.  Cheers!

Ok now what?

I realize it’s been forever and a day since I updated this blog, but it’s time to get started again. A year and a half ago I released BombSquad on the Mac App Store. A lot has happened since then:

  • BombSquad was featured by Apple and briefly hit #1 paid in several countries on the Mac App Store. (woohoo!)
  • Over the following months I added lots more single player content, a Free-For-All mode, and GameCenter support.  I got featured again.  (woohoo #2!)
  • I began work porting the game to mobile devices, which required completely rewriting the graphics engine and various other parts.  This took a *lot* of time and effort but should be worth it in the end.  Last month I released the first results of this effort: BombSquad for OUYA.  If you’re not aware, the OUYA is a $99 console based on the Android operating system.  I plan on releasing the game for general iOS/Android devices but want to hold off until I get network-games working.  I went ahead and pulled the trigger on OUYA, however, since it works well with local ‘couch multiplayer’ type games.  The response so far has been great.

So what’s next?

Customization.

BombSquad was meant to be totally mod-able, and it’s time to get started with that.  I’ll be releasing a series of tutorials showing how to completely rip the game apart and turn it into whatever you want to.  This should be fun.  Stay tuned.

-eric

Getting serious for a moment…

Here I sit on a cloudy wednesday afternoon at Pixar with the news of Steve Jobs’ passing spreading from office to office around me, and it makes me think of how much he’s affected my life. I’m here working at a job I love because Steve bought and kept Pixar afloat through early difficult times. When I leave here in a few hours I’ll listen to some music or read a bit on my phone during the train ride home, or maybe stop for dinner and watch some online videos while I eat. Then later at home I might tinker with some coding on my Mac. As a technophile, pretty much every waking moment of this day has been made possible or heavily influenced by one visionary human being.

Thanks Steve.
Rest in Peace.

The stuff of Eric Froemling