Sunday, August 7, 2022
Google search engine
HomeSalesForceSnake Game built with LWC, without Canvas

Snake Game built with LWC, without Canvas

We build the classic Snake game using Lightning Web Components and then deploy it to Salesforce, Heroku, and GitHub Pages.
Source Code: https://github.com/adityanaag3/snake-game-lwc

Play the Game on Heroku – https://snake-game-lwc.herokuapp.com/
Play the Game on GitHub Pages – https://adityanaag3.github.io/snake-game-lwc/
Make sure you join our Telegram Channel https://t.me/salesforcedevsindia
Follow Aditya Naag Topalli on Twitter https://bit.ly/3jBSLuX or LinkedIn https://bit.ly/3jBSNTB

00:00:00 – Start
00:00:15 – Introduction
00:02:02 – The inspiration
00:04:59 – Whiteboarding the Component Architecture
00:08:37 – Creating the Game Area
00:22:59 – Fixing Infinite renderedCallback() calls
00:26:49 – Creating and moving the snake
00:39:09 – Adding Keyboard Controls
00:43:21 – Optimizing for performance
00:48:06 – Adding Food Particles
00:53:19 – Making the snake longer
01:07:06 – Adding “Game Over” logic
01:09:28 – Deployment to Salesforce
01:12:25 – Deployment to Heroku and GitHub Pages

This video is from our streaming platform, Trailhead Live. Join us there to get Live learning content where your questions can be answered in real-time and view the learning content as it happens. trailhead.salesforce.com/live

RELATED ARTICLES

18 COMMENTS

- Advertisment -spot_img

Most Popular