← Back to context

Comment by zzo38computer

2 years ago

Most of the pictures are not displayed. (This seems to be because they are WebP format even though the file name is ".png".)

Do you have a full description of the rules, and do you have the FEN? I like to know the rules if I want to play game, and, it is not working so I made up my own, and if the levels is available then I can play game.

The below is I made up my own (I don't even know, if it is the real rules or not; but it is what I had understood):

  ; Echo Chess
  
  (InputXY)
  
  (Control
    Input
    (INIT $Cursor 1 1 0 0 Create =@cur)
    (KEY IgnoreKey)
  )
  
  ($Cursor
    (Image "Cursor0" "Cursor1")
    (DefaultImage ())
    (Density -10)
    (CREATE LOOP 0 1 50 Animate)
  )
  
  ($Tile
    (Image "Tile0" "Tile1")
    (Density 10)
    (INIT Loc + 1 band =Image)
    (CLICK @cur ,ObjBelow #Move Loc ,Send . 1)
  )
  
  ($White
    (Image "P" "N" "B" "R" "Q" "K")
    (CLICK @cur Loc ,MoveTo)
    (#Move
      fork
        Image (case
          (0 :pawn)
          (1 :knight)
          (2 :bishop)
          (3 :rook)
          (4 :queen)
          (5 :king)
        )
      then
      if
        Arg1 Arg2 MoveTo .
        Arg3 if
          From ,Image =Image
          From ,Destroy .
          (=P $Black) lnot if WinLevel then
        then
        @cur Loc ,MoveTo .
      then
    )
    (:pawn Yloc Arg2 1 + eq Xloc Arg1 Delta Arg3 eq land)
    (:knight Xloc Arg1 Delta dup * Yloc Arg2 Delta dup * + 5 eq)
    (:bishop Xloc Arg1 Delta Yloc Arg2 Delta eq if =:queen else 0 then)
    (:rook Xloc Arg1 Delta Yloc Arg2 Delta land if 0 else =:queen then)
    (:queen From Seek =%d Loc begin %d NewXY over over ObjTopAt dup From eq if . . ret then ,Class $Tile ne until . . 0)
    (:king From Chebyshev 1 eq)
  )
  
  ($Black
    (Image "PB" "NB" "BB" "RB" "QB" "KB")
    (CLICK @cur ,ObjBelow #Move Loc 1 ,SendEx . 1)
  )

Are you referring to the images in the post or the actual game? Looks good on my side, might be the unexpected extra traffic. Sorry about that! In any case, you can try the game directly here: https://echochess.com/

The rules are really simple:

1) You are playing White, there's no opponent. You must capture all pieces to win.

2) You become the "echo" of any piece you capture. Captured a bishop? Become that bishop.

3) You can’t pass through red obstacles. Find the best move order to clear the board.

You can play it on any device, just drag and drop the white piece to move around. Let me know if you have any issues.

p.s. love that you just made your own!

  • I can't "play it on any device". It doesn't work on my computer. (It is why I asked if there is some way to access the FEN, in case of it won't work and you want to play game on another computer, or by actual chess pieces on a board instead of on the computer, etc)

    I read the rules like you wrote it here too, it is same thing, and I understand that. Nevertheless, it does not answer all of the questions (e.g. pawns promotion). From the example, it seems to not be check/mate, but I that short explanation won't explain everything. Capture all pieces? Do you mean capture the black pieces only? You cannot capture the white pieces, isn't it (otherwise there won't be any to capture it)? Is the code I wrote, the correct rules of the game?

    • Yes, I found those rules unclear.

      My version:

      1. The goal is to capture all the black pieces, which never move.

      2. Move one white piece each turn, using the basic rules of chess piece movement. You can't move through red obstacles. Pawns don't promote. There is no check.

      3. When you capture a piece (black or white), your white piece turns into the type of piece you just captured.

      2 replies →