Chess10 (BBC Micro) by Alci
A downloadable game
Chess10
by Alci
Platform: BBC Micro Model B or later models
Language: BBC Basic
Category: Extrem-256 or Schau, both are valid cases.
Instructions:
To play you have to enter your move using board coordinates. You can do it in 2 ways :
?E2 then
?E4
or
?E2,E4
Checkmate is signaled by "#" and stalemate by "=" as in standard chess notation.
Beware there is no validation of the legality of the move. The player must know the rules of chess.
And that's it !
You can also test it in your browser with the url provided in a separate file.
Detailed description:
This a full chess game with a proper engine in 10 lines of BASIC !
BBC BASIC is one of the few BASIC of the 8-bits era allowing recursion. It's also fast, thanks to the "powerful" hardware (2mhz 6502) and clever implementation by Sophie/Roger Wilson. It allows a lot of abbreviation but lines are limited to 239 characters. So I guess it's fair.
It's still in use today and this program can run on BBC BASIC for Windows for maximum performances on modern hardware.
This program is slow by today standards (between 5s and 5 minutes in the worst case by play) but it would have been more acceptable in the eighties. And it would have provided a great educative value !
Features:
- Semi-graphical display
- Clocks for player and computer
- Moves history
- Castling and en passant support for the player
- A proper chess engine
What it lacks:
- A full validation of the player move
- Draw detection by repetition or insufficient material
- underpromotion (Always promote to queen)
- Castling and en passant by the computer
The engine:
- Negamax framework with 2 plies depth
- Quiescent search up to 7 plies depth
- Move ordering
- Square values table (the same for all pieces)
- Mobility score
- Accurate piece and promotion values
See the commented listing for more details.
Download
Install instructions
I recommand using BeebEm emulator. By default, it emulates a BBC model B. You can select a BBC Master 128 in hardware/BBC Model for a slight improvement in speed (5% to 10%). You can even use an ARM second processor for a large improvement but it's out of the scope of this challenge.
To load the program, go to File/Load Disc 0 and browse for the provided file chess.ssd.
Then type LOAD"CHESS10".
Now you can "LIST" the program and "RUN" it.
Development log
- Updated16 days ago
Comments
Log in with itch.io to leave a comment.
Amazing job! I had also a go and played the game on the Acorn Electron; of course it plays even slower but seems to be playing fine. I usually code in machine code for the Elk, but recently I started to have a look at its basic and I think it is the best I have every used on an 8 bit machine! I especially like the way it is possible to use inline machien code. I am curious how you paint the chess pieces I know we can only have monochrome user defined characters, by any chance is there a way to plot them with transparency? thanks
The pieces are indeed redefined characters with background swapping to make the board in text mode. Acorn computers like Amstrad ones use a real frame buffer. The character font is independant of the background color. With VDU5, you can put them anywhere on screen (no 8 pixels boundaries) and characters overwrite whatever is on screen.
Try this on the ELK :
10 MODE 5:GCOL 0,130:FOR N=1TO100:GCOL0,RND(2):DRAW RND(1200),RND(1000):NEXT:VDU5:MOVE12,510:GCOL0,3:PRINT "CHARACTERS ON TOP"
Ah right, very interesting and useful, it is great to know that we can plot chars anywhere on the screen. thanks. I was asking because I have a friend who coded a game for the Amstrad CPC and as the BASIC also only allows to create monochrome user defined characters; he plots 3 chars on the same place to get as it were one char in four colours as there is a way to plot them with transparency. with VDU5 and GCOL we can do the same, awesome.
Wow, impressive, great! ♕
very good
This is amazing...!!! Will conversions be coming for other computers like C64...??? : )
It uses a lot of specific properties of BBC Basic, I don't think there will be conversions to Microsoft BASIC.