Getting Started with Brick

Before we go into anything Brick-related, I'll list out the assumptions this page makes: that you know a little about programming, that you know your chosen programming language pretty well, and that you're comfortable editing code and so on. If you're looking for a GUI-driven game-making toolkit, the Brick engine isn't for you (yet).

What this page will cover is, in a nutshell, getting Brick going in your development environment of choice, and then a basic outline of how to start putting together the Brick API calls to make a game.

Downloading and installing the library

Before going any further, make sure you've downloaded the Brick Engine library for your platform (see the binaries page) and installed the shared library and header file in the appropriate place for your system.

Where might the header/library go? I'm on Linux

It's a safe bet to put the header into /usr/local/include and the library into /usr/local/lib, though you'll likely need to run ldconfig after doing so.

And if I'm on Windows? I'm using MinGW

If you're using MinGW, try putting the header into C:/mingw/include and the library anywhere in your system path.

Compiling from source..

If you're building the Brick Engine from source, I'll assume you've read the NOTES file in the source tarball and know enough about compiling software to get going. If you need help working with CMake, send me an email and I'll do my best to help you out.

Language bindings

Installing the language bindings is another matter. Every language provides its own way of doing things within its development environment, so I'll provide a real quick rundown of each.

C

This one is easy: include brick.h in your source and link your program with -lbr.

Tcl

The Brick Engine can be loaded as a module into a Tcl interpreter, and also provides a simple executable (br in the bindings tarball) that embeds a Tcl interpreter with the extension already loaded. If you want to use the Brick Engine module, place br.so and pkgIndex.tcl somewhere in your $auto_path. If you want to use the embedded Tcl interpreter, you can load and execute your game script by calling br myscript.tcl. If you don't provide a name, br looks for a file called main.tcl.

The basic order of operations

There are a few basic subsystems in the Brick Engine that you'll want to know inside and out when making games: graphics, sound, and input.

Note to steve: finish this later - June 4, 2010.

 
getting_started.txt · Last modified: 2010/06/04 15:07 by steve