Build An Online Chess Game

Learn how to use NodeJs & SocketIO to create online games

4.25 (17 reviews)
Udemy
platform
English
language
Game Development
category
Build An Online Chess Game
146
students
14 hours
content
Oct 2022
last update
$54.99
regular price

What you will learn

How to use NodeJs to create a backend

How to use SocketIO

How to use MySQL with NodeJs

How to use Redis with NodeJs

How to create an online game using NodeJs and SocketIO

How to use a view engine with NodeJs

How to use VanillaJs to update or create DOM Elements

How to make client-server communication using SocketIO

How to make a Chess game using Javascript

Description

         In this course we are going to create from scratch a complete online chess game. Also we are going to setup a MySQL database to store the users info (username, email, score, played games etc.) and we are going to use also Redis. We are going to set up a basic express server, and for our view engine we are gonna use ejs. For our server we are going to use different routes to displaying the pages and different routes for the api. We are going to use a lot of socket events so by the end of this course you'll have mastered SocketIO. I will provide all the styling in the resources folder in the first section because this isn't going to be a CSS tutorial, because I want this tutorial to help you focus on your javascript skills. What you will learn in this course:


  1. How to create a server with nodejs

  2. How to connect to your MySQL database from your nodejs server

  3. How to connect to a Redis client from your nodejs server

  4. How to use SocketIO for client-server communication

  5. How to use VanillaJs to create or update DOM Elements

  6. How to create a complete chess game using javascript

  7. How to setup a MySQL database for your game

  8. How to create and use MySQL procedures

  9. How to create middlewares to authenticate users

  10. How to store cookies

  11. How to use jwt authentication

  12. How to hash user passwords


*************************************************************************************************

Since some of the npm packages may have updated when you take this course, it would be better if you used the same versions with me. Also you should have locally installed MySQL and Redis. I use MySQL 8 and Redis 3.0.5 (I used msi installer for redis), but you can use newer versions for redis.

*************************************************************************************************

Content

Introduction & setting up the project

Introduction
Creating the server
Using Nodemon & ENV Variables
Setting up the MySQL Database
Setting up Redis
Setting up Ejs for our view engine
Startup files

User Login & Register

Creating Register & Login Page
Creating user & user_info tables in DB
Creating the register controller
Displaying form error messages
5. Creating the login controller

Lobby Page

Creating the lobby page
Connecting to server with socket.io
Creating functions to handle connections
Getting user info from server
Creating our spinner
Implementing the chat functionality

Games Page

Creating the games page
Displaying the games page
Creating functions to handle room connections
Adding functionality to games page part-1
Adding functionality to games page part-2
Adding functionality to games page part-3
Adding functionality to games page part-4

Room Page

Creating the room page
Initializing game variables
Displaying the chess pieces
user-connected event
Displaying pawn possible moves
Moving the pieces
Getting rook possible moves
Getting bishop possible moves
Getting knight possible moves
Getting king & queen possible moves
Continuing with move logic
Checkmate logic
Displaying moves to other player part-1
Displaying moves to other player part-2
Updating the timer part-1
Updating the timer part-2
Fixing timer error
Castling
Finishing room page design
Pawn promotion part-1
Pawn promotion part-2
King under attack warning
El passant part-1
El passant part-2
Draw functionality
Creating a procedure to update scores
Finishing all socket events in the server
Testing & finishing the game functionality

Stats Page

Games controller
Creating the stats page
Finishing games controller
Played game moves pages

Profile Page

Finishing the user controller
Creating the profile page
Adding functionality to the profile page

Hosting our game

Docker files + SQL file + .gitignore file
Hosting on Digital Ocean droplet using Docker

Reviews

Frank
August 2, 2022
Great content, instructor answers questions very fast. Sometimes the code is hard to read, because the font size is quite small and the instructor doesn´t use zoom.

Charts

Price

Build An Online Chess Game - Price chart

Rating

Build An Online Chess Game - Ratings chart

Enrollment distribution

Build An Online Chess Game - Distribution chart
4593056
udemy ID
3/12/2022
course created date
4/21/2022
course indexed date
Bot
course submited by