Coding Challenge #57 - Snake
John Crickett
Helping you become a better software engineer by building real-world applications.
This challenge is to build your own version of the classic game snake.
Many of us think of snake as one of the first games that was available on a mobile phone (it appeared on the Nokia 6110 in 1997). But snake goes back much further than that. It’s heritage dates back to 1976, with the first version of what was then called Worm written in 1978.
These days there are thousands of versions and it’s available for just about any device you care to try.
Ad: Do You Need Help Learning To Code or Becoming a Backend Developer?
I’ve had a number of request for tutorials on learning Python, JavaScript or Go. I don’t have anything myself so I’ve partnered with boot.dev who teach you to become a backend developer using Python, JavaScript and Go.
If you use the code JOHNCRICKETT you’ll also get 25% off your first payment. It’s an affiliate link so you’ll also be supporting Coding Challenges if you sign up for boot.dev .
The Challenge - Building Snake
Snake is a simple game. The player controls a snake which move around the playing grid at a fixed speed. The goal is to eat food that appears at random locations on the grid.
领英推荐
For each item of food eaten the snake becomes longer and the player scores points. The game ends when the snake hits the edge of the game grid or it’s own body.
Step Zero
In this step, pick the programming language and development environment you’re going to use. Consider trying something different - this would be a great project to try a frontend stack if you’re a backend developer and vice versa.
If you’re from a data engineering or site-reliability engineering background you could leverage your knowledge of Python with PyGame or Go with Ebitenegine. Rustaceans can check out?are we game yet ?for useful crates.
Snake is relatively simple and as such, it’s a great platform for learning a new technology, or programming language.
Continued...
The steps for the rest of this Coding Challenge are detailed on the website as Build Your Own Snake Game .
Postgraduate student at University of the Witwatersrand|Wits Business School-(PDM-Business Administration) |Aspiring Analyst
7 个月I'm a beginner developer, any tips on how to get going? I'd appreciate your help
Founder & CEO @ Coderfarm | ?? We help agency & startup hiring challenges with on-demand test-driven developers ??, ensuring robust software & freeing time for more client acquisition ??
7 个月Building a Snake game is a great place to start, especially for those familiar with the fundamentals. It allows you to practice core concepts like user input handling, game loop management, and collision detection. John Crickett
Entrepreneur | Founder at XANT | AI/ML Engineer | Full Stack Engineer at AITIS
7 个月I like this challenge. Thanks for sharing, John Crickett
Cure.fit | ex-Amazon | Java Developer | Redis | MongoDB | Node.Js | Typescript
7 个月Great share. Have started hands-on with some of the projects. Building these on spare time is great fun. Have started building the LoadBalancer of own. Here is the first video on that https://youtu.be/0yxxdHE_PO4?si=rNPXzJ4sdRciPYM_
Senior R&D Engineer | IIT Kanpur '21
7 个月Snake game in C++? Lets try it ??