Jump to content
IGNORED

Chess


Andrew Davie

Recommended Posts

14 hours ago, thank you said:

this topic is awesome.

 

en-passant in 4 bits:  3 bits set to the file on the advance of a pawn, and 4th bit set or cleared on whether the most recent move advanced a pawn two ranks?

That would work - but expanding on that, you don't need to know if the move advanced a pawn two ranks. We already know the colour of the side to move, so any en-passant would be for the other side. And if we know the column, there can only be one valid square for the pawn involved (the '2-square'), and furthermore the '1-square' must be empty. So I reckon that extra bit is not required, and just the file is all that's required = 3 bits.  And if there's no en-passant just set the file to one where the above conditions don't apply (The only gotcha would be a board position where ALL pawns have moved +2 but ... how likely is that?).  But taking this further, an earlier suggestion to store the last made move (so it can be displayed) means that we don't actually need to save the en-passant square at all because the immediately becomes obvious from the last move made.

 

Link to comment
Share on other sites

4 hours ago, Andrew Davie said:

That would work - but expanding on that, you don't need to know if the move advanced a pawn two ranks. We already know the colour of the side to move, so any en-passant would be for the other side. And if we know the column, there can only be one valid square for the pawn involved (the '2-square'), and furthermore the '1-square' must be empty. So I reckon that extra bit is not required, and just the file is all that's required = 3 bits.  And if there's no en-passant just set the file to one where the above conditions don't apply (The only gotcha would be a board position where ALL pawns have moved +2 but ... how likely is that?).  But taking this further, an earlier suggestion to store the last made move (so it can be displayed) means that we don't actually need to save the en-passant square at all because the immediately becomes obvious from the last move made.

 

 

Either way, when the last move was a pawn to the relevant rank (4 or 5 depending on color), you do need to know whether that move was 1 or 2 squares. But if you store the last move made anyway, you can do that in one bit (which I think would save you a byte vs. using 3 or more bits, since you previously only had 2 bits available).

Link to comment
Share on other sites

On 7/28/2020 at 11:06 AM, Karl G said:

I was not able to see a difference with the switch in either setting, unfortunately.

I had the same issue initially, try reloading the binary after you change the the PAL/NTSC switch setting, it seems to be detected on startup.

 

The other switch for interlace can be thrown anytime during play to compare - I can see a subtle difference in scanline thickness.

 

Link to comment
Share on other sites

4 hours ago, Mr SQL said:

I had the same issue initially, try reloading the binary after you change the the PAL/NTSC switch setting, it seems to be detected on startup.

 

The other switch for interlace can be thrown anytime during play to compare - I can see a subtle difference in scanline thickness.

 

Correct; NTSC/PAL is only detected at startup. I could/should change that, I guess.

 

Link to comment
Share on other sites

I'm toying with the idea of making a few "special" units on release. I'd like to include a mini-portable chessboard + pieces which would fit inside a regular-sized '2600 box. I've done some scouting for pieces/board and haven't really found anything really suitable. But then I got to thinking maybe I could have a go at 3D-printing some sets. I could do them in the blue/black/white/yellow colour scheme. Would take forever, and be pretty hackish in appearance. But hey, isn't that what homebrew is about?  I could see perhaps doing 10 - too much work/effort. But 10 would be nice.


Looking at the Creality LD-002R resin printer as a purchase for this task. I have a "bunch" of FDM printers, my favourite being the Ender 3. But a resin printer - for about $250 - the LD-002R seems to be very well reviewed. It would make superb chess pieces for such an inclusion into a '2600 game box.

 

The burning smell coming from my current printer isn't really comforting/calming. I had to turn it off; something's wrong. More motivation for a new machine.

 

Edited by Andrew Davie
  • Like 4
Link to comment
Share on other sites

3 hours ago, Andrew Davie said:

I'd like to include a mini-portable chessboard + pieces which would fit inside a regular-sized '2600 box.

 

Why not use a foldable chess box with the same format as a 2600 box and the board printed inside and the 2600 boxart outside?

  • Like 1
Link to comment
Share on other sites

Just now, Al_Nafuur said:

Why not use a foldable chess box with the same format as a 2600 box and the board printed inside and the 2600 boxart outside?

Yes, that would work, but getting the art onto the box would be hard.

I was thinking just a foldable chess box exactly the size to fit inside a standard box. You could store the cart, manual, and chess pieces inside the foldable chess box.

  • Like 1
Link to comment
Share on other sites

14 minutes ago, Andrew Davie said:

Yes, that would work, but getting the art onto the box would be hard.

If you would use a wooden chessbox like one of these: https://www.etsy.com/de/listing/528892947/vintage-chesschess-boxwooden-chess
The boxart could be done by laser engraving, but the boxart would be limited to greyscale.

 

Link to comment
Share on other sites

I've spent some time scouting suitable chess boards...  I would prefer to fit inside a standard '2600 box and be not too expensive.

AliExpress is a good place to look. Here are some candidates...

 

320680650_ScreenShot2020-08-03at1_19_20am.thumb.png.076eea19c92349d4b7db85c49bfa91c3.png

20cm x 18cm --> presumably 10cm x 18cm folded. Cost about US$5

 

 

437264848_ScreenShot2020-08-03at1_21_24am.thumb.png.7bb6164d3de29b0874a57e28ef51dd26.png

19cm x 19cm x 1.4cm --> presumably 19cm x 9.5cm x 2.8cm folded. Maybe too thick. How thick are '2600 boxes, and would a thick box be an acceptable compromise?  Cost about US$15

 

If I went bigger it would be easier. But half the fun is finding/designing something that fits inside that standard box. Pieces included!

Oh, and cartridge/manual, of course!

 

 

I'm inclined at this stage to do a 3D printed board like this one (pieces, too!)

https://www.thingiverse.com/thing:957958

 

1287958632_ScreenShot2020-08-03at1_32_01am.thumb.png.df9e078023529176d6e284fdcc3ba8c2.png

 

That could be packed as a bunch of snap-together pieces, and easily scaled to the perfect size for the box.

Just imagine the white squares printed/coloured in blue, instead, and the pieces cream and orangish, just like the game.

Part of the reason I want need a resin printer.


 

 

  • Like 4
Link to comment
Share on other sites

59 minutes ago, Gray Defender said:

Yeah, seconded!  Hopefully though it won't be TOO cheap so that it is playable ..

 

Agreed. I think, with the screen going black, having a real-world board to hold the game position as you play would be a real plus.

 

  • Like 2
Link to comment
Share on other sites

Pretty sure I'm going to buy a LD-002R resin printer, as I have permission from she-who-must-be-obeyed.

 

In any case, I had a go at printing the "hardest" piece - a knight - at slightly smaller than the size that I'd need. Just to see how much detail I could push my machine to produce. It's a Creality Ender 3, filament printer... and I've printed the piece at 0.1 mm layer height, 60 mm/s speed, using mamorubot PLA filament. It came out looking surprisingly good.  Quite nice detail, not much evidence of layer lines, and not too many faults at the overhang (chin) area. At a pinch I could do an entire set, but I think I'll hang out for the resin printer.

 

  • Like 4
  • Haha 1
Link to comment
Share on other sites

 

 

I've done a quick "folding" board design, which is essentially a two-part box to hold the pieces, but also a board. Lots of neodymium magnets - designed with 10mm x 0.5mm size. In fact, the whole board would take 112 magnets.. ! ... but they're as cheap-as, so no issue. The video shows a quick preview of the model. I used OpenSCAD; a programmer's 3D modelling language that I'm rather partial to.


First, I'll print this upside-down on the printer tray, so the squares are flat to the print bed. The separate squares-on-top in the video will be printed first, in one colour. I'm going to have to live-swap filament colours on my printer, but I have done this before so it's not a drama.  When the squares for one colour are done, I'll swap the filament and then the next squares will be printed. Then swap filament again, next layer, etc. A bit of a pain, but it works.  To do this, I'll divide the print into multiple 'jobs' each starting at a different z-height.

 

Note that this is one half of the board (of course) and that the other half is symmetrical. I've put magnet-holes in the wall adjoining the board halves, so it should be pretty firmly locked in place by those, when the two parts are placed together.  There's just enough clearance inside the box for a cartridge, and for the bases of the pieces lying flat. I'll probably put in some guides to hold the cartridge nicely. Obviously this is just a model at this stage. Tomorrow I'll do a test print and refine.

 

1925209351_ScreenShot2020-08-03at11_12_57pm.thumb.png.c07f5e2c229c7edae09a583e3c851067.png

 

 

Edited by Andrew Davie
  • Like 6
Link to comment
Share on other sites

18 hours ago, Andrew Davie said:

In any case, I had a go at printing ...

 

 

Nice. Looks like a little chocolate horse.  :)  Can the future buyers then choose between a whole-milk and a dark-chocolate variant and will these two versions then have different covers? ?

Edited by AW127
Link to comment
Share on other sites

1 hour ago, AW127 said:

 

Nice. Looks like a little chocolate horse.  :)  Can the future buyers then choose between a whole-milk and a dark-chocolate variant and will these two versions then have different covers? ?

No, it will be what it will be.

I may include the STL files so you can print your own if you're so inclined.

 

Link to comment
Share on other sites

Mid-print. I made a mistake with the blue squares and made them too tall -- so I aborted that halfway through but left them on the bed. A bit of a hack, in other words. Then I started printing the black, which is the point at which this picture was taken. It doesn't look too bad. I might see if this one can go to completion so I have a full-sized model to test for fit to the box, and general visuals....

IMG_20200804_132039.thumb.jpg.d57a17ed0fc7ff2bb3d9e2346322f43f.jpg

Link to comment
Share on other sites

First prototype done. It's OK. A few places lifted off the print bed. That's hard to avoid, so in a production environment I'd have junked this print and started again.  Still, a good first effort which gives me some clear ideas as to what to change.

I found some standard chess pieces and they fit perfectly.

I think instead of printing, my best bet is to buy sets of pieces. Just print the board/case to fit the '2600 box.

 

IMG_20200804_163638.thumb.jpg.5b67c7094e1fad32b4ae0b7a1f3b9283.jpg

 

IMG_20200804_163632.thumb.jpg.32792fc5ac1fb3625b82db40de2d91b1.jpg

 

IMG_20200804_162546.thumb.jpg.92e98b1b90590ce9d4b07112de03d0e8.jpg

 

A few things to change...

 

1. increase width to width of standard atari box. There will be a black area in front/behind board when unfolded. I may use this area for storage of captured pieces. In any case, the box should be bigger. Note that a standard cart only fits inside in one direction at the moment. Whereas now it's about 19x19cm, the new version will be about 28(deep)x19(wide).  That's 4.5cm extra for each side. Will see how it looks.

2. Edge walls should be a lot thicker to give it some substance.

3. length about 1mm less.

4. I have the black/white squares cackhanded again!!!

5. put some cross-bracing under the middle - perhaps for holding the cart in place. The board is sturdy enough but there's a bit of flex there in the middle that I'd like to get rid of.

6. maybe a thin 1mm border around the whole board to clearly deliniate the black squares.

7. Could use a third colour for the box itself.

 

Edited by Andrew Davie
  • Like 3
Link to comment
Share on other sites

Here's the new design. The center compartment holds the atari cartridge, and there are two compartments for the black/white pieces. It's now the correct size to snug-fit into a standard box. Tomorrow I'll print and confirm that, and also that there is room in there for all the pieces.

As to magnets - I've dropped them. 112 magnets per box seemed... excessive... even for me.  Now there are none. I figure this is not a travel chess set, and it doesn't need to be magnetic.  I'm thinking about a little U-shaped "clip" and some holes at the edge of the board where it joins the other board. You just insert the U-clip into the holes (one/board) and that will do nicely to hold the boards together firmly.  I might do the holes before a print tomorrow. Lazy.

 

 

As to pieces, these ones look OK... about $4 from AliExpress (including shipping).

 

2001205083_ScreenShot2020-08-04at11_43_00pm.thumb.png.537e1422b46ae8dfde2e2500ae9af767.png
They have hollow bases, so I'd need to fill those and perhaps put some felt on.

The base size is 20mm.  All I need to do is find a set I like that's not too expensive, with a maximum base of 20mm diameter.

 

This fits inside the 3D box (almost) with total height 21.5mm minus 2x board thickness 0.8mm= 19.9mm. Close.

I will have to reduce the board thickness a bit or increase the 3D box height.  Depends how tight it is in the cardboard outer.

But also because the pieces will lay flat on a very slight angle, I think this will make the difference required and no adjustment needed.

 

The next prototype will determine that.

 

i briefly toyed with the idea of having no outer box at all, but I nixed that idea after a short while.

So, I'm going to need to find out how to print/manufacture cardboard boxes, I guess.

 

And, there's the artwork....

 

 

 

Edited by Andrew Davie
  • Like 4
Link to comment
Share on other sites

Here's the OpenSCAD source code, for posterity/anyone interested.

 

// Chess Box for Atari 2600 
// Andrew Davie, August 2020

// Note: Warning "object may not be a valid 2-manifold and may need repair!"
//  - this can safely be ignored at least for this instance
//  - caused inside the 'boardSquares' code, of all places

$fn=32;                         // Smoothness of curves

// To create the 3 separate models, set MODE to 0/1/2 and render/save.
// These models are presented with a "+" for alignment when slicing/printing.

// DO NOT CHANGE MODE TYPES
MODE_TILES = 0;
MODE_BOX = 1;
MODE_BORDER = 2;
MODE_ALL = 3;

// DO CHANGE THIS TO THE ONE YOU WANT...
MODE = 1;

// Constants for size adjustments

BOX_WIDTH = 189;
BOX_LENGTH = 137*2;
BOX_HEIGHT = 21.5;
SURROUND = 4;                   // thickness of edge around board

BOARDER = 1.2;                  // outer border width around squares
BOARDER_Z = 0.4;                // depth of border

CORNER_RADIUS_INTERNAL = 5;     // Internal curve of box outer round edge
CORNER_RADIUS_EXTERNAL = 6;     // External curve of box outer round edge

UPPER_LAYER_THICKNESS = 0.4;
SQUARES_THICKNESS = 0.4;

BOX_WALL_THICKNESS = 5;
DIVIDER_Y = BOX_WALL_THICKNESS*2;       // The crosspiece between board halves

// Size of an Atari Cartridge for the insert holder/well

CART_X = 82;
CART_Y = 98;
CART_Z = 19;
CART_WALL = 4;

// Other config constants (calculated or internal - do not modify)

ZAZZ = 1;                   // for fixing quick-view inaccuracies in plane masking

BSQ = (BOX_WIDTH-(2*SURROUND))/8;
GRID_SIZE = BSQ * 8;
HIGHLIGHT_SIZE = GRID_SIZE + BOARDER*2;


// And now the magic...

function bit_set(b, n) = floor(n / pow(2, b)) % 2;


module curvedBlock(width, length, height, edgeRoundness=6) {

    // Builds a solid with curved corners
    // Based around origin
    
    translate([-width/2,-length/2,0])
        linear_extrude(height)
            hull(){
                translate([edgeRoundness,edgeRoundness,0])
                    circle(r=edgeRoundness);
                translate([width-edgeRoundness,edgeRoundness,0])
                    circle(r=edgeRoundness);
                translate([width-edgeRoundness,length-edgeRoundness,0])
                    circle(r=edgeRoundness);
                translate([edgeRoundness,length-edgeRoundness,0])
                    circle(r=edgeRoundness);
            }
}


module highlightSquare() {

    // The thin border square around the squares
    // Drawn around origin

    if (BOARDER > 0)
            translate([-HIGHLIGHT_SIZE/2, -HIGHLIGHT_SIZE/2, 0])
            difference() {
                cube([HIGHLIGHT_SIZE, HIGHLIGHT_SIZE, BOARDER_Z]);
                translate([BOARDER,BOARDER,0])
                    cube([GRID_SIZE, GRID_SIZE, BOARDER_Z]);  
            }
}


module boardSquares(size, height) {

    // The 8x8 grid of squares
    // Drawn around origin
    
    translate([-size*4, -size*4, 0])
        for (x = [0:7])
            for(y = [0:7])
                translate([x*size, y*size, 0])
                    if (bit_set(0, x+y) == 0)
                        cube([BSQ, BSQ, height]);
}


module boxProper() {
   
    // The main box
    difference(){
        
        union() {
            difference(){
            
                curvedBlock(BOX_WIDTH, BOX_LENGTH, BOX_HEIGHT/2, CORNER_RADIUS_EXTERNAL);

                // hollow out the block internals
                
                translate([0, 0, SQUARES_THICKNESS+UPPER_LAYER_THICKNESS])
                    curvedBlock(BOX_WIDTH-BOX_WALL_THICKNESS*2, BOX_LENGTH-BOX_WALL_THICKNESS*2,
                        BOX_HEIGHT/2+ZAZZ, CORNER_RADIUS_INTERNAL);
            }
        
            divider();
        }

        // Remove the board squares (other colour)
        boardSquares(BSQ, SQUARES_THICKNESS);
    }

    translate([0,-BOX_WALL_THICKNESS-CART_Y/2,0])
        cartCradle();
}
    

module halfMask() {
            
    // mask out 1/2 with a cube
    translate([-BOX_WIDTH/2-ZAZZ/2,0,-ZAZZ/2])
        cube([BOX_WIDTH+ZAZZ,BOX_WIDTH,BOX_HEIGHT+ZAZZ]);
}


module divider() {
    
    translate([-BOX_WIDTH/2, -DIVIDER_Y/2, 0])
        cube([BOX_WIDTH, DIVIDER_Y, BOX_HEIGHT/2]);
}


module cartCradle() {
    
    translate([0,0,SQUARES_THICKNESS+UPPER_LAYER_THICKNESS]) {
        difference(){
            curvedBlock(CART_X+CART_WALL, CART_Y+CART_WALL, BOX_HEIGHT/2-SQUARES_THICKNESS-UPPER_LAYER_THICKNESS, 2);
            curvedBlock(CART_X, CART_Y, BOX_HEIGHT/2-SQUARES_THICKNESS-UPPER_LAYER_THICKNESS, 1);
        }
        
        // The small cross-beam dividing the black/white pieces
        // Kind of tricky to calculate, so kludged
        translate([-CART_WALL/4,-CART_Y/2,0])
            rotate([0,0,180])
                cube([CART_WALL/2, BOX_LENGTH/2-CART_Y-CART_WALL*2,
                    BOX_HEIGHT/2-SQUARES_THICKNESS-UPPER_LAYER_THICKNESS]);

    }
}


module alignCross() {
    
    // An alignment mark for slicer positioning

    color("red") {
        translate([-5,14.9,0])
            cube([10,0.2,0.2]);
        translate([-0.1,10,0])
            cube([0.2,10,0.2]);
    }
}


// HERE STARTS THE ACTUAL RENDERERS
// SWITCHED BY "MODE"

// Draw the main box half only
if (MODE == MODE_BOX || MODE == MODE_ALL) {
    difference(){
        boxProper();
        highlightSquare();
        halfMask();
    }
    alignCross();
}

// Draw just the 2nd-colour squares
if (MODE == MODE_TILES || MODE == MODE_ALL) {
    
    // Draw the odd-squares only
    difference(){
        boardSquares(BSQ, SQUARES_THICKNESS);
        halfMask();
    }
    alignCross();
}

// Draw the board margin
if (MODE == MODE_BORDER || MODE == MODE_ALL) {
    
    // The surround border for the squares
    difference(){
        highlightSquare();
        halfMask();
    }
    alignCross();
}

    

 

  • Like 2
Link to comment
Share on other sites

Proto#2 printed OK. I mis-registered the squares - now have a proper technique to get this sorted from now on - so there's a little bit of a mismatch. This feeds through to the inside of the shell, where you see some bumpy bits due to excess filament. Will be fixed next version. I printed the highlight (gold) first - this should be second from now on, so it doesn't impinge on the squares, and the squares will hold it down better while printing. The cartridge cradle is a tad too small, so the cart doesn't quite sit in - needs to be a millimetre bigger.  The holders for the pieces are just big enough -- as long as I choose similar-sized pieces, we'll be good to fit it all inside. The board shell itself fits nicely inside a box. As it happens, the only '2600 box I have handy is boulder dash, so I used that for fit-testing.

 

IMG_20200805_175157.thumb.jpg.bb86710463c4f38e034d29964ae412b3.jpg

 

IMG_20200805_175102.thumb.jpg.46c71bae86acb2aef639f4495ba1f1e9.jpg

 

IMG_20200805_174914.thumb.jpg.315be6c007e1fb7539b9429fe6c1f808.jpg

 

IMG_20200805_174845.thumb.jpg.95defafda966436d7d65541cb79d523b.jpg

 

The outer walls are a tad too thick, so I'll reduce those a bit.  The cart cradle has given the stability to the board surface that was lacking in the last version. Other than those things, it's pretty good.

I think I'll change the box colour from black - it shows up oil from fingerprints too easily. Perhaps a light colour instead, next test.

Toying with the idea of only making these available to people who send in an actual, genuine, mail-order card to me here in Oz.

 

 

 

  • Like 6
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...