How to Code Chess in Java

Published: 04 December 2023
on channel: RyiSnow
95,700
2k

I coded chess in Java and this is how I did it.

It looked simple enough but boy, it was much more complicated than I thought! I was surprised at how much you can learn by coding this little old game.

You can download the chess piece images in the video from here:
https://ryisnow.itch.io/pixel-art-che...

About Game Loop:
   • Game Loop and Key Input - How to Make a 2D...  

Thanks for watching!

Timestamps:
0:00:00 Introduction
0:01:08 Window
0:04:03 Game Loop
0:07:15 Drawing the Chessboard
0:12:17 Drawing Pieces
0:24:36 Moving Pieces
0:37:20 Setting Each Piece's Movement Rules
0:38:04 King
0:54:06 Knight
0:56:15 Rook
1:03:00 Bishop
1:08:35 Queen
1:10:52 Pawn
1:17:18 Changing Turns
1:20:43 Castling
1:29:28 En Passant
1:36:36 Promotion
1:44:51 Illegal Movement
1:48:28 Detecting Check
1:53:50 Another Illegal Movement
1:55:58 Detecting Checkmate
2:12:03 Detecting Stalemate

#gamedev #javatutorial #programming


On this page of the site you can watch the video online How to Code Chess in Java with a duration of hours minute second in good quality, which was uploaded by the user RyiSnow 04 December 2023, share the link with friends and acquaintances, this video has already been watched 95,700 times on youtube and it was liked by 2 thousand viewers. Enjoy your viewing!