Apple's Chess 2.0 Source Code Available
Petrochard writes "For all of you programmers who are big chess fans, check out Apple's release of Chess 2.0's source code. It would be cool if somebody could make a Simpson's Chess mod." Chess is based on sjeng (logic) and glChess (interface).
I think it would be more interesting if someone somehow skinned the Woz for this.
Not to mention how much they improved KHTML while working on Safari. Apple does really do a lot for OSS.
The gentleman who wrote sjeng also wrote prototype Vorbis 1.0 encoder that can go down to bitrates of 4kbps that he claims can give a listenable stereo stream. IMHO that's bigger news than source to Chess.app 2.0.
http://tinyurl.com/4ny52
Is this Chess game one that ships with OSX ? or is it an ancient forgotton version lost in the sands of its "pre-unix" days?
...
nick
Electronic Music Made Using Linux http://soundcloud.com/polyp
I think I'd be too intimidated to play chess against "the world's most powerful computer." Gosh. :)
Joke aside, I'm eagerly awaiting the 970FX PowerMac, and VERY eagerly awaiting the 3gHz (980?) machines this summer. Ohhh yeahhh...
I think it'd be sweet if somebody made the application so that the board just floated over the other windows, not inside of it's own window. I thought that's how it was supposed to be originally, but unfortunately I was wrong.
This is the source code for Apple's Chess.app Version 2.0, as shipped
in MacOS X 10.3 "Panther". This project consists of two components:
The Chess engine, "sjeng", and the graphical frontend.
"sjeng", contained in the "sjeng" subdirectory, is distributed under the
terms of the GNU General Public License. See sjeng/COPYING for
details.
The graphical frontend, i.e., all files not in the "sjeng"
subdirectory (including files derived from glChess which Apple has
permission to relicense under the following terms), are distributed
under the terms of the Apple Sample Code License:
IMPORTANT: This Apple software is supplied to you by Apple Computer,
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
this Apple software constitutes acceptance of these terms. If you do
not agree with these terms, please do not use, install, modify or
redistribute this Apple software.
In consideration of your agreement to abide by the following terms,
and subject to these terms, Apple grants you a personal, non-exclusive
license, under Apple's copyrights in this original Apple software (the
"Apple Software"), to use, reproduce, modify and redistribute the
Apple Software, with or without modifications, in source and/or binary
forms; provided that if you redistribute the Apple Software in its
entirety and without modifications, you must retain this notice and
the following text and disclaimers in all such redistributions of the
Apple Software. Neither the name, trademarks, service marks or logos
of Apple Computer, Inc. may be used to endorse or promote products
derived from the Apple Software without specific prior written
permission from Apple. Except as expressly stated in this notice, no
other rights or licenses, express or implied, are granted by Apple
herein, including but not limited to any patent rights that may be
infringed by your derivative works or by other works in which the
Apple Software may be incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Electronic Music Made Using Linux http://soundcloud.com/polyp
The reason I wonder is that when I click on the "About Chess" menu item in Chess 2.0 as installed on OS X 10.3, I notice that in the lower right hand corner of the About window there is a button labeled "Download Source Code...". The button opens this page Apple - Public Source - Miscellaneous.
So, while still cool, this is not likely to be "news". I do appreciate the pointer, though. It'll be nice to check out for programming ideas, as I'm getting back into Objective-C programming again.
For folks wanting Simpsons mods and other simple image changes, though, you probably don't need the source for that, you just need to realize that the images are in the .app package... changing those really shouldn't require a recompile, should it?
You're telling him to get a life... while you're the one who dug back into the archives to cross-reference a cut-n-paste troll?
Nice.
Does anyone remember that when 10.3 was in Beta, some people mentioned that it was possible to play the Chess game windowless, with a transparent background?
This functionality didn't seem to make it to the Chess.app in the final 10.3... Can anyone restore it?
Sarcasm noted.. but you can get your iPod battery replaced for like $50. The fish was THIS BIG!
http://www.rustyrazorblade.com
i have a question.
can you play against a friend?
my iBook creams me.
I'll be able to win against the computer by making it stupider than myself. Bwahahahahahaha....
One of the cornerstones of the current Cocoa-y way of doing things is that the front-end and back-end are separate beasts.
Don't like the back-end? It's possible to build the app to use a program other than sjeng as its brain. It's just a matter of building with a new shell tool (and a little glue so the front-end knows how to use it).
Don't like the front end? It's also possible to build a new wrapper app for sjeng that looks however you want it to. Use the source for the existing Chess program as a template for sjeng, and then go completely nuts. Screw reskinning, design a completely different and abstract chess game!
But the windowless interface might be confusing to some users...
55 W. P - e555 B. P x P
56 W. N x P
56 B. B x System Preferences ?
57 W. BitTorrent - A4 !!
Kernel Panic in 4 moves
You cannot truly appreciate Dilbert until you read it in the original Klingon.
Could somebody figure out how to re-enable the transparent effect that was in the Panther betas? It was a preference before, but now it's gone. In case some haven't seen it before, the board was floating with no background window. I don't remember if the window was transparent or actually able to be clicked-through, but it was very cool. :)
:)
I can't figure it out myself since I'm not a coder, but I've narrowed it down to MBCFloatingBoardWindow... no idea what to do with it tho. Any pointers?
Cwm, fjord-bank glyphs vext quiz
if someone would make this network multiplayer then youd have something!!!! Rendezvous... and the floating board idea is awesome , a big second form me on that...
If you are interested in this, you might be also interested in Xboard/Winboard by Tim Mann... They are open source interfaces to text based chess engines... This allows you to write a chess program using text interface and use winboard for your GUI... lets you focus on the fun stuff like bitboards and hashtables...
the link for xboard/winboard can be found here
And as a shameless plug you might be interestd in checking out my chess engine (BCE) that can be run under xboard that can be found here
My Stuff: pspChess and foobar2000 plugins
to anyone who hasnt checked this out, do so.
it sounds a lot better than i would have thought at the bitrate it is at. this is insane.
After taking a look at the source I found out that the floating window can be activated without making any modifications to the application. Here's how to enable the transparent window:
/Applications/Chess.app/
Open Terminal.app and set MBC_DEBUG as an environment variable to 16:
With bash:
set MBC_DEBUG=16
with tcsh:
setenv MBC_DEBUG 16
Now, open Chess.app from the Terminal:
open
There will be a new menu item (Floating Board) under the "Game" menu. Selecting this menu item will toggle the floating board on and off.
There seems to be a bug with the mouse behavior (I can't move any pieces) and I assume this is why this feature was removed. I found that you can get around this bug by doing the following:
Start a game with the normal window.
Play at least one move.
Switch to the floating board.
Select "Take Back Move" from the "Moves" window.
You should now be able to move the pieces as normal.
infested with jello like fishes no melotron wishes
Now we can find out how how it cheats.
I'm a big retard who forgot to log out of Slashdot on Mike's computer! LOOK AT ME.
Seriously, those tracks sound amazing for that bitrate. That's real news!
A friend and I were rooting through the code and decided to work with it a little. We've got grand ideas about networked chess, but haven't really done a whole lot besides draw lots of little complex diagrams. The chess code lends itself very well to lots of little complex diagrams.
But we did notice some redundency in the code, probably because of the layering in the design. The position of the pieces, for example, are stored in several places (each of which is updated with each move). All of the validation routines pratically are screaming at us to go ahead and make modifications (even bad ones), because a surprising amount of errors are caught later on.
When Apple released its first Panther beta, I was disappointed to discover that Chess was not included. However, Xcode was so I went to Apple, downloaded the source for Chess and had it up and running in under 5 minutes without reading any documentation (guilty). Suffice it to say, I was quite impressed with Xcode but that's another story. This is news, old news.
It's interesting to note that previous versions of MacOSX shipped a version based on GNU Chess and not sjeng. Does someone know why they changed the engine for this version?
if there were any mod points still being spent in tis thread i'd recommend you get +5 Funny :)
That's classic.
I've got more mod points and GMail invi