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
663
201
4 months ago 00:30:38 1
‘We want to become Russian citizens’ | Family with 6 Children Fled the USA |@homeinrussia
4 months ago 00:53:46 1
Ukraine Collapsing, Russia-China Alliance Tightens, NATO in Decline | Richard D. Wolff
4 months ago 00:00:33 1
Stumpy’s Epic Adventure: Episode 1 (Introduction)
4 months ago 00:03:06 1
TEBEY Blinding Lights (Country Version) Lyric Video
4 months ago 01:09:25 1
Program Ocalenia i Odrodzenia Polaków i Polski, czyli 30stka i WBIJCIE TO SOBIE DO SERC
4 months ago 00:06:39 1
Burn Every Muscle with a Full-body Workout at Least Once a Week.
4 months ago 00:10:48 1
This is Why Programming Is Hard For you
4 months ago 00:17:11 1
Mel Bonis - Flute Sonata (1904)
4 months ago 00:03:40 1
Make Them Suffer - Epitaph
4 months ago 00:07:17 1
Crypto Wallet 🔥 Which is the Safest Crypto Wallet?
4 months ago 00:36:01 1
Чем отличается закон об иноагентах в США от российского
4 months ago 00:00:48 1
Робот СОФИЯ о ВОЙНЕ! // ИИ отвечает! #робот #софия #aitube #искусственныйинтеллект #ии
4 months ago 00:08:13 1
Why Marriott, Hilton and Hyatt Don’t Actually Own Most of Their Hotels | WSJ The Economics Of
4 months ago 00:06:15 1
ESL Warm Up Activities – Simple ESL warm up Activities
4 months ago 00:04:12 1
How to Fix BSOD Memory Management Error 0X0000001A In Windows
4 months ago 00:00:14 1
MISERY X CPR X REESE’S PUFFS MEME // TIKTOK TREND (16+)
4 months ago 00:00:35 1
Полоска света за 30 секунд в Photoshop #фотошоп
4 months ago 00:03:45 1
CAPTAIN HAWK - GHOSTS OF THE SEA “Diamonds, Emeralds & Rubies“
4 months ago 02:09:36 1
Творческий вечер Елены Образцовой (1989)
4 months ago 00:00:46 1
NOT IMPRESSED- “THOR x SUPERMAN“ Edit | lady gaga- bloody mary
4 months ago 00:02:37 1
Project Raptor: My mechanical dinosaur costume
4 months ago 00:01:58 1
XT30-R remote robotic camera systems for broadcast and live production houses