Learn how to program a C# Snake game!
Download the assets here:
Source code is available here:
In this video you will learn how to write a Snake game in C# without using any game engine. We go over everything you need to know to program Snake step-by-step. The video even includes helpful animations to help you understand everything! The code for the game is written in C#, but the is well decoupled from the UI and can be adapted for other programming languages like Java and C . Have fun developing a Snake game in C#!
Chapters:
0:00 - The Game
0:28 - Project Setup
1:37 - Importing Assets
3:04 - Grid Representation
4:26 - GridValue Enum
5:31 - Directions
9:53 - Positions
12:10 - The Game State
15:27 - Adding The Snake
16:49 - Adding Food
19:40 - Snake Helpers
21:10 - Snake Modification
23:20 - Moving The Snake
29:36 - Loading Images
32:10 - Color/Font Resources
34:30 - Coding UI
37:33 - Image Grid
41:28 - Adding Grid Images
44:35 - Bitmap Scaling & Removing Gaps
46:00 - Drawing The Game State
49:54 - Changing Direction (User Input)
51:33 - Moving Snake (Game Loop)
53:07 - Updating The Score
53:37 - A Strange Bug
56:13 - Changing Direction Properly
1:00:53 - Fixing Scaling
1:02:26 - Intro/End Screen
1:09:31 - Countdown
1:10:56 - Restarting The Game
1:12:56 - Googly Eyes!
1:16:08 - What The ****?
1:16:26 - Fixing Image Rotation
1:17:28 - RIP Animation
1:20:19 - Other Grid Sizes?
1:21:49 - Thanks!
1 view
829
248
1 month ago 00:02:01 1
Mission: Impossible – The Final Reckoning | Teaser Trailer (2025 Movie) - Tom Cruise
1 month ago 00:03:02 1
SPX Options Trading : Strategies for Big Gains!
1 month ago 00:40:25 1
40MIN Unilateral Leg Strength - Lower Body Workout
1 month ago 00:19:01 1
WHOLE Restaurant Got CRAZY Hearing Me Speaking Fluent Chinese, Korean, and Russian
1 month ago 00:03:37 1
Dangerous | EPIC: The Musical Animatic
1 month ago 00:00:19 1
Сомелье #Медведев @zapovednik
2 months ago 00:25:43 1
Low Impact CARDIO (No Jumping, No Equipment Workout)
2 months ago 00:13:25 41
Смертельный трафик-стоп: история гибели офицера NMSP Дэриана Джерротта
2 months ago 00:44:35 1
40MIN Total Body Strength Training (Dumbbell Workout At Home)
2 months ago 00:10:54 1
Interstellar | Hans Zimmer’s Universe
2 months ago 01:23:58 1
Symbols of an Alien Sky, Episode 2: The Lightning-Scarred Planet Mars
2 months ago 01:18:26 1
Symbols of an Alien Sky (Full Documentary)
2 months ago 00:59:39 13
Проспер Мериме. Литератор, мистификатор, сенатор. Литературный подкаст “Закладка“. Выпуск 6