Fatrat's BeOS Projects: Absolute Zero
2001.03.19 - My first planned project is a BeOS version of Absolute Zero, a little puzzle game I saw on the Atari ST long, long ago. It's a simple game that can be implemented with a 5x5 array of push button widgets. This will give me a chance to get a feel for the BeIDE with a very bare-bones project, get the feel of views and layouts, etc.
I spent a couple of hours pouring over the examples in Programming the Be Operating System to figure out how windows, events, messaging, etc. work under BeOS, and then leafed through the Be Developer's Guide to figure out how to get mouse button click info out of mouse-down event structures. There are enough similarities to how X and MS Windows do their GUI components that I didn't have a problem seeing how things work, and don't expect too many problems putting this project together - in fact I think half the time will be spent learning how to use the BeIDE thingie ;)
2001.03.25 - I put in a couple of hours coding and reading examples, and got my window up and have buttons being drawn... getting there. I've got a Makefile setup and I'm doing my project from the command line instead of using the BeIDE, so that I can get something completed quickly - I already know how to use Makefiles, etc. Things I learned so far:
- It's REALLY easy to accidentally type Brect instead of BRect
- The sample code that's on the BeOS R5 CD (optional install) is indispensible... The source code examples make figuring things out much easier, especially since the books I have assume you're following along on your own copy of their example programs with the code on the CD-ROM included with the book, and so don't give source listings in each chapter - just snippets of what changed from one project to the next. The articles on Be's website intended for newbies at programming on BeOS were useful too, but mostly repeat the info I already had.
- You have to add a "-lbe" at the end of your compile line to get the Be classes to compile (no default LD_LIBRARY_PATH in BeOS I guess :) )
- g++ gives out a lot of uninformative error messages. I think I'm too used to (or just spoiled by) the default IRIX development setup.
At this point I just need to wrangle up some code to make all my buttons nicely and stick them in a view, and some of the game logic to control the buttons. Menus are going to be a breeze, they remind me a lot of the way the Windows GDI handles messages and menu stuff - a nice change from the callback-hell of Xt/Motif! The pervasive OO design of the APIs is reminding me of my Java experience, too. Yay.
I'll update this page when I have something to show... :)