You are browsing as a guest. Sign up (or log in) to start making projects!

chess-framework

  • 4 Devlogs
  • 4 Total hours

my implementation of the classic game of chess with hopefully better optimization than my last attempt

Open comments for this post

52m 22s logged

before list of changes, i just wanna say that the hardest part is wrapping my head around the bit shifting logic and figuring out how to represent moves and pieces in a single integer. because the main focus of this is gonna be performance so that i can build a chess bot on top of this and have decent speeds.

anyways:

  • optimized piece enum to use 1 less bit for color
  • use bit shifts in piece.color to better understand
  • rename utils.ts to game.ts and update imports
  • tweaked enums to integrate more with the movegen system im going to implement
  • added Promotion, Capture, and MoveFlag enums

not much changes to the ui so here is screenshot of the code

0
0
4
Open comments for this post

58m 35s logged

  • change board turn variable to whiteTurn for value to be bool
  • rename Board class to Game
  • fully implement fen parser
  • add extra debug details in side panel
  • add ways to subscribe to game instance updates
  • add function to convert algebraic notation to board index (for enpassant fen parsing)
  • change image display for fs readability (use char instead of raw number representation)
  • move some constants for char and number conversion to utils.ts
  • remove comments and unused code
  • add ascii representation of board in sidebar
  • add function to get ascii representation of board
0
0
7
Open comments for this post

53m 32s logged

  • fen parsing (partial, only for the board part)
  • dump button to dump board object
  • view/board ui updating
  • button styling
  • adjusted index label position
0
0
6
Open comments for this post

1h 29m 24s logged

  • init sveltekit with tailwind
  • made a basic chessboard display looping through a 64 length array
  • downloaded chess pieces to static assets
  • show index toggle
  • show board pieces based of array value
  • disable ssr for future debugging in browser
  • define types and class for chess board

(screenshot may not show any pieces but thats because im working on fen parsing as im writing this)

0
0
4

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…