Building a Chess Game in Unity

Marcel Jurtz
9 min readJun 20, 2018

In this post, I’ll be covering the basics of building a simple chess game in Unity and C#.

The MVP of this project will be a fully playable 3D chess game for two players. Each character will only be able to make moves that comply with the rules. After slaying a king, the game is reset. To improve the game, menu scenes, statistics and a simple AI will be added later. The final project and its source code is available on my GitHub-profile.

Since this article became quite large, I split it into different parts:

  1. Loading the Assets - for programmers lacking 3d-modeling skills
  2. Setting up the Scene - to create a basic setting
  3. Drawing the Chessboard - to make testing easier
  4. Initializing the Characters - and move them to their default location
  5. Movement Control - to differentiate between selecting and moving characters
  6. Board Highlighting - to mark all fields to which can be moved
  7. Obey the Rules - to implement each characters movesets

Loading the Assets

I think it is quite common that programmers are bad designers. At least that’s the case for me, which is why I try to get the graphic elements for my chess game from the Asset Store. I found Arcane Cyber’s Classic Chess Set to look pretty nice and decided to give it a shot. This asset pack contains three different types of figures (metallic, marble &…

--

--

Marcel Jurtz
Marcel Jurtz

Written by Marcel Jurtz

Software Developer (C#, Java / Desktop, Web, Mobile, Games (VR)), Triathlete & Coach - mjurtz.com — Sign up to my newsletter: coding.mjurtz.com