Halo Section Bg

Snake Game

Learn Linked Lists through Snake - make your snake grow dynamically as you learn essential linked list operations. Implement node creation, deletion, and traversal while building this classic game with SFML.

What you'll learn

  • Nodes & Linked List Structure

  • Implementation of a Singly Linked List

  • Arrays vs Linked Lists

  • Doubly Linked List & its Operations

  • Circular Linked List & its Operations

  • Using Linked Lists to Create a Dynamic Snake

  • Insertion: Head, Middle, Tail

  • Deletion: Head, Middle, Tail

  • Reversing a Linked List

  • Time Complexity of Linked List Operations

  • Implementing STL Lists

  • Implementing Grid-Based Movement

Requirements

  • Understanding of Arrays and its operations.

  • Intermediate to Advanced proficiency in C++.

  • Ability to read and understand existing C++ game code.

  • Prior experience working on C++ game projects.

  • A system with at least 8 GB RAM, i5 Processor, and 2 GB dedicated GPU.

  • Passionate about making games with a burning desire to become a game developer.

About This Course

Learn Linked Lists by creating the classic Snake game! Learn dynamic data structures while implementing snake growth, movement, and collision detection. Build an engaging game that perfectly demonstrates linked list operations through hands-on development with SFML.

This course offers an exciting, hands-on approach to learning Linked Lists in C++. Instead of just theory, you’ll apply data structures to game mechanics, making learning both engaging and practical.

You’ll start by implementing Singly and Doubly Linked Lists, understanding nodes, insertion, deletion, and traversal. The game’s food system dynamically modifies the snake’s structure using linked list operations—junk food increases size, healthy food removes nodes, alcohol reverses direction, and poison cuts the snake in half.

By the end of this course, you'll not only master Linked Lists but also build a feature-rich Snake game, showcasing data structures in action!

Show More

Curriculum

4 materials
  • Project Goal
  • Preview

  • Getting Started - Snake
  • Configuring Project
  • Branching Instructions
2 materials
10 materials
  • Understanding Level
  • Managing Levels
  • Drawing a Level
  • Starting off with the Level
  • Creating Model and Controller
  • [⏳Quiz]
  • Adding Level Model and Controller
  • Level Selection UI
  • Using Level Service
  • Solution for Level Creation Branch
8 materials
  • Creating a Player Service
  • Create Player Service
  • Understanding the requirements of our Snake
  • Understanding Snake
  • Setup Snake
  • Position and Direction of Snake
  • Setup Position and Direction
  • Are arrays the best solution?
4 materials
  • What is a Linked List?
  • [⏳Quiz]
  • Arrays vs Linked List
  • [⏳Quiz]
13 materials
  • Chain of Body Parts
  • Data for Body Parts
  • Create BodyPart
  • Reference for next Body Parts
  • Create Node
  • [⏳Quiz]
  • Drawing a Body Part
  • Draw BodyPart
  • Calculating Position and Rotation
  • Calculate Position and Rotation
  • Making a Body Part Move
  • Move BodyPart
  • [⏳Quiz]
7 materials
  • Creating a Singly Linked List
  • Starting off with Linked List
  • Spawn Snake’s Head
  • Spawning Snake Head
  • Adding more Body Parts to Snake
  • Spawning Snake Body
  • [⏳Quiz]
  • Preview

9 materials
  • Chapter Goal
  • Changing Directions with Input
  • Making the Snake Move
  • Implement Snake Movement
  • Use Time Service for Snake Speed
  • Time and Speed
  • Implementing Screen Wrapping
  • Add Screen Wrapping
  • [⏳Quiz]
12 materials
  • Time to Die Snake!
  • Death Condition
  • Implementing Collisions
  • Implement Body Collision
  • Deleting Snake after Death
  • Delete Snake
  • [⏳Quiz]
  • Re-spawning Snake
  • Re-spawn Snake
  • Figuring out Input Bug
  • Fix Input Bug
  • Solution: Bug in Snake Collision
11 materials
  • Understanding Obstacles
  • Creating Elements
  • Creating Obstacles
  • Create Obstacles
  • Element Service
  • Using Element Service
  • Implemente Element Service
  • Creating Level 2
  • Create Level 2
  • Solution for Linked List Branch
  • [⏳Quiz]
  • Preview

12 materials
  • Understanding Food
  • Food Items
  • Starting off with Food
  • Understanding Food Spawning
  • Spawn 1 Food
  • Spawn Food
  • Spawning Random Food Items
  • Spawn Random Food
  • Handling Spawn Timer
  • Food Spawning In Intervals
  • Solution for Food Spawning Branch
  • [⏳Quiz]
7 materials
  • Chapter Goal
  • Refactoring Snake Collision Logic
  • Refactor Snake Collision
  • Collision with Elements
  • Collision with Food Items
  • Collision in Elements and Food Items
  • [⏳Quiz]
25 materials
  • Insertion at the Beginning
  • Initializing a Node
  • Initialize Node
  • Insertion at the Beginning Continued
  • Insert at Beginning
  • Insertion at the End
  • Insert at End
  • Insertion at an Index
  • Insert at Index
  • Insertion at the Middle
  • Insert at Middle
  • [⏳Quiz]
  • Deletion at the Beginning
  • Delete at Beginning
  • Deletion at the Middle
  • Deletion at the End
  • Delete at End
  • [⏳Quiz]
  • Splitting in Half
  • Split in Half
  • Reversing Linked List
  • Reverse Linked List
  • Sync with Food Collision
  • Sync Food Collisions
  • [⏳Quiz]
4 materials
  • Player Score
  • Operation and Time Complexities
  • Create Gameplay UI Controller
  • Solution for Linked List Operations Branch
5 materials
  • What is a Doubly Linked List
  • Singly vs Doubly Linked List
  • [⏳Quiz]
  • Relevance of Doubly Linked List
  • [⏳Quiz]
12 materials
  • Prepare for Restructuring
  • Understanding New Structure
  • [⏳Quiz]
  • Creating Base Node Class
  • Creating Single and Double Nodes
  • Create Single and Double Nodes
  • Creating Base Linked List Class
  • Implement Base Linked List Class
  • Refactoring Single Link List
  • Creating Double Linked List
  • Create Double Linked List
  • [⏳Quiz]
17 materials
  • Insertion at the Beginning
  • Insert at Beginning - DLL
  • Insertion at the End
  • Insert at End- DLL
  • Insertion at the Middle - DLL
  • [⏳Quiz]
  • Deletion at the Beginning
  • Delete at Beginning - DLL
  • Deletion at the End
  • Delete at End - DLL
  • Deletion at the Middle - DLL
  • [⏳Quiz]
  • Delete All Nodes
  • Delete All Nodes - DLL
  • Splitting in Half - DLL
  • Reversing Linked List - DLL
  • [⏳Quiz]
10 materials
  • Creating Linked List Type
  • Create Linked List Type
  • Linked List Selection UI Screen
  • Create LL Selection Screen
  • Using Selected LL for Snake
  • Creating Selected LL
  • STOP Food Spawning
  • Stop Food Spawning
  • Solution for Doubly Linked List Branch
  • [⏳Quiz]
5 materials
  • What is a Circular Linked List
  • Why use a Circular Linked List
  • How to use Circular Linked List
  • Time Complexities of a Circular Linked List
  • Implement CLL and it’s operations in Repel
3 materials
  • What is STL’s List
  • Using std::list
  • Linked List Loop
7 materials
  • Bonus Assignment Instructions
  • Create More Levels
  • High on Energy
  • Badass Boss Battle
  • Animation for eating food and digesting
  • Different food spawning algo
  • Moving Obstacles
1 materials
  • Cheat Sheet - Linked List

Instructor

Mayank Grover

Founder, Teacher @ Outscal | EA, Kixeye, DeNA, Junglee, D.E. Shaw

Why you should learn from me:

  • Over 10 years of experience building games for major companies like EA, Junglee, DeNA.
  • Founder of Outscal, a thriving 9000+ member community dedicated to game development and career growth.
  • Proven track record of mentoring developers, with a focus on practical, career-accelerating skills.

Outscal Alumni

Vinay Kashyap
Gameplay Programmer at Ubisoft

Outscal delivers an unmatched journey into game programming: exceptional instructors, real-world projects, and a supportive community.

Sethunath R
Gameplay Engineer 2 at Zynga

The project-oriented approach at Outscal helped me make my portfolio and gave me a boost in getting my resume shortlisted with the studios I applied with.

Flemin Johnson
Consultant at Sagility

In a short span of 6 months, Outscal’s game development course helped me excel in my career and crack into one of the top gaming companies in India.

Swapnil Rane
Game Developer at Voodoo

Outscal boosted my confidence and taught me how to express my thoughts through game development.

Komal K
ASE at Light & Wonder

’I was a born genius, education ruined me.’ Outscal helped me rise again like a Phoenix contributing to my career transition from a sketch artist.

Ranjit Panjwani
Game Developer at Image Devices

Outscal helped me transition to my dream career in game development at the age of 32, highly recommended if you are looking to build a career in games.

Joy Kumar
Senior Software Engineer at Wildace

Outscal’s unique approach to online learning prepared me for future hurdles, the 1-on-1 mentor sessions accelerated my growth to the next level.

Milan George
Senior Programmer at Nytwolf Games

The project-oriented approach helped me completely grasp concepts better than anything taught to me during my conventional education.

Tanya Gupta
Unity 3D Developer at Terra

A great place to learn and grow in the video game development industry. The team is super supportive and went above and beyond to help me.

Chinmay Varmani
Indie Game Developer

The comprehensive game programming course offered by Outscal exceeded my expectations, highly recommended for aspiring game developers.

Aihasas Yadu
Unity Developer at Vapronix

Best part about Outscal is their 1-on-1 reviews for all codes and focusing on students individually.

Darren Henry
Game Developer at Redline Games

Outscal’s Game Development course is completely career-oriented, unlike traditional colleges which are just meant for exams.

Vidit Rawat
Engineer 1 at LightFury Games

With supportive and approachable mentors at Outscal and hands-on industry-level projects, I was able to turn my passion for game development into a career.

Choose Your Plan

CONTENT ONLY

$29.99

/ month

Access to all Content

Professional Certification

Mentor Support

Subscribe Now