Mancala in C
Maintained by Kevin Riggle [SourceForge.net Project Page] [Site Feed] [e-mail]
Download the latest version. [text] [graphical]
"What is mancala?" and other Frequently Asked Questions.
Saturday, January 31, 2004
Quick status update:
The project is still alive -- the transition to a new semester was a bit bumpy, the weather has been nasty, SourceForge has been grouchy, and I've just plain been busy. I did manage to find the time to add a time-based random seed, so the AI should be less predictable, and I imported the Vera Serif-Bold font into the repository, so you won't have to install the Vera fonts any more.
This will probably end up packaged as a 0.1.1 release, though I probably won't post it to
freshmeat or anything like that. I would really
like to have a proper autoconf-based configure script, and there's a nasty memory leak I need to fix, but I may need to wait until 0.2.0 to do that. It seems dumb to release a point upgrade with just two changes, but the others may take some time. I'll see what I end up doing.
Saturday, January 17, 2004
I've made the first release of the graphical version of Mancala. Get it
here. It's only a start -- use it at your own risk. You'll need
SDL,
SDL_image,
SDL_ttf, and the
Bitstream Vera fonts to compile mancala from source.
I've only compiled it successfully on my Fedora box. Other Linux distributions shouldn't be too problematic, but make sure to read the INSTALL file and check main.h if you're having problems. I attempted to compile it under mingw on Windows but was unsuccessful -- if anyone has better luck, please e-mail me.
(Note: If you recompile, you *must* run 'make uninstall' before 'make install'. It's a kludge, but it works for now. I'm going to make mancala play with autoconf and automake Any Day Now).
Enjoy!
Tuesday, January 13, 2004
Happy happy happy. Very very happy. This project is coming together so nicely I keep pinching myself. Sure, the code's a little gnarly yet, it needs better comments and documentation, etc. etc. Sure, I need to rework it so it will compile across computers and platforms (it's currently my-Linux-box-centric :). But it's coming -- man, is it coming!
Observe:
Notice how the computer's side of the board is grayed out, since you can't move from it. Notice how the stones under my mouse cursor (which you can't see in the screenshot) are highlighted. Notice how it's chewing up a really reasonable amount of CPU, which is again only obvious offscreen. This, friends, ROCKS, if I do say so myself. Happy happy happy.
Monday, January 12, 2004
I am now able to
dim and highlight stones! Man, was that interesting to write. (and now I need sleep... will update with more later :)
Thursday, January 08, 2004
Haha! At long last, I have the code cleaned up!
sprintf() was quite helpful in the integer->string department, thanks. The program *still* doesn't do anything or actually play the game, but the board-drawing code is in its own function now, so it should be trivial (heh) to write the game-playing code. Witness the
latest screenshot, with nifty titled and non-titled versions to show off the new stone tilesets which are not random at all. Cool, huh?
Wednesday, January 07, 2004
Stone placement is no longer random. I spent a couple hours last night figuring out what I wanted each number of stones to look like and making the graphics for it. Works pretty well. Now all I have to do is figure out a convenient way to turn an integer into a string. grr... I need my K&R book.
Will post screenshots once I get that issue worked out and get back to my home computer, where all my libraries are. Dang, graphics programming sucks when you can't compile your program to test it out. Oh, and you will
for sure need SDL_ttf to compile mancala now. It installs to /usr/local/lib, so either set the LD_LIBRARY_PATH environment variable or edit /etc/ld.so.conf and rerun ldconfig if you aren't already set up to use libraries from that location. I should probably write an INSTALL file with that information.
Monday, January 05, 2004
Hmm... more screenies.
I'm not sure I like the randomized stone placement. I was trying to make it look a little more "realistic," and the code is pretty simple, but to my mind it looks ugly. It's also hard to tell how many stones you have, since you have to actually count them. You can't say, "oh, that's the 'four' shape." I think I may do the sensible thing and make separate images for each number of stones I have. At least it worked -- I wasn't sure it was going to. (happy dance) I wish colorkey blitting didn't leave those black dots around the edges of the stones. I need to figure out a way to do it all with alpha. Hmm...
All right, bed now.
Saturday, January 03, 2004
Well, the GUI stuff is in CVS. Checkout the 'gui' branch if you're interested in hacking on it. You'll need
SDL, SDL_image, libPNG, and zlib. Future versions will more than likely require SDL_ttf and FreeType. I'm hoping to have statically-linked binaries available once this gets going -- nobody wants to install half-a-dozen software packages just to play a *game*.
Just in case you are wondering, it doesn't actually do much... yet.
For example. I'm just happy I've managed to get something on the screen.
Archives
December 2003
January 2004
February 2004