Thursday, October 15

Chris and his Black Box: A Night with Python

In our ongoing efforts to welcome new members and arm them with some tools they might employ to create their own games, we tried a new activity last night: Chris (aka Southpaw Hare) created a small shell of a Python game, where you select what kind of bullet, target, and explosion you want to use. Lo and behold, the game begins and prompts you to shoot your chosen bullet at your target-box-blob-DeathStar-Cow-HowardDean-thing, and it explodes with not-so-predictably hilarious results.

This activity was designed to introduce members new to Game Development to the concept of The Black Box, or, more textbook-like, modular development. Members wrote new definitions for bullets, targets, and explosions in simple Python files, and just imported them into Chris' base code (without any knowledge of how that base code works) to create new functionality in the game. This activity encapsulates, on a small scale, how a larger-scale game would be put together: one programmer writes the physics, another writes the display, another writes the movement controls, each module treating the others as 'Black Boxes': knowing only the input and output, not having to worry about the specific implementation. When brought together, these modules create a game.

Hopefully, new members, namely those who might be intimidated by the scope of creating an entire game, can now expand the concept of the Black Box from this activity to their own projects, and think about how to design the game as a series of connected components.

Happy component-plugging!!

Fig 2: From time to time, you'll find yourself with many components.

1 comment:

  1. Death Star Run definitely won the Python Achievement.... and the First Achievement Achievement.

    ReplyDelete