A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [snake-game]

Snake is a video game in which the player turns the head of the snake as it moves around the screen, trying to avoid colliding with the snake's body or running out of bounds.

Filter by
Sorted by
Tagged with
39
votes
2answers
427k views

Snake game in C++

This is my version of the Snake game, written in C++. How could it be improved, and what general advice would be useful for future projects? ...
34
votes
5answers
5k views

Beginner's snake game using PyGame

I am a complete beginner when it comes to programming and writing games and this is my first ever game. I made it with python 3 using pygame library. I would ...
28
votes
4answers
4k views

Snake Game in C#

Recently, I have been trying to learn SOLID principles. I learn the best through criticism. I made this snake game in Unity with C#, where I put my current understanding of SOLID principles to test. ...
24
votes
1answer
47k views

Snake game using PyGame

I wrote a simple Python snake game which is about 250 lines of code. Can someone give me some advice on how I can refactor/make it better? game.py ...
20
votes
3answers
3k views

Snake++ game (in C++ with SDL)

Yes, It's called Snake++. I build it to learn C++. What features and techniques can be improved? I used SDL for some basic rendering, but my concern is more about ...
20
votes
1answer
17k views

Snake in Excel in… VBA?

snake-game is a game where you control a snake in an enclosed square without running into the walls or your own body. The snake grows when you run into whatever item you are supposed to run into. My ...
17
votes
3answers
6k views

Snakes Game Using ncurses

This is my version of snakes in C++ using the ncurses library. I would like to hear from you how this piece of code can be improved and general advice for future projects regarding coding and ...
16
votes
4answers
80k views

Snake game with canvas element code

I created a classic snake game in the canvas element. I have not considered best practices when doing this, I just wanted to finish it first. Now it's time to improve the coding practice. You can ...
16
votes
2answers
1k views

First HTML5 game: Snake

Here's my first HTML5 game: a really simple snake. I've never made a game before and haven't had too much experience with JavaScript. Fiddle ...
15
votes
2answers
73k views

Snake game in C

Here is a very basic Snake game in C, which I just want to make better. The game is working perfectly but it is very annoying because when playing it, it is always blinking. I hope that somebody could ...
15
votes
3answers
9k views

Full C++ Snake game

I managed to finish my approach on the legendary Snake game. You move around with the WASD keys. I would like to hear your opinion and maybe ideas on how I can improve frame rate because now it sort ...
14
votes
1answer
208 views

Ncurses Snake game

I decided to write a little snake game in c++ to practice and as an opportunity to learn ncurses. It turned out to be much bigger than I anticipated but since I've never really written anything big, I'...
13
votes
1answer
72k views

Java Snake game

I am a self - taught coder, and have been learning Java / C# for the last 2 1/2 years (inconsistently). I have recently created a snake game in Java with the help of an online tutorial. I have ...
13
votes
1answer
10k views

Snake Game in Java

I am a self-taught coder, and have been learning Java for the last 2 months. I have recently created a snake game in Java with the help of an online tutorial. I have rearranged the program into ...
12
votes
2answers
1k views

Snake with ncurses in C

I've implemented a version of snake using GNU ncurses, and I'd appreciate some feedback! There are two main files, a main.c file that houses the ...
11
votes
3answers
2k views

My first C++ game (snake console game)

I finally finished the code for a snake game I was working on. I would like it if you were to give me some advice as to things that can be improved. ...
11
votes
2answers
14k views

Snake in JavaFX

I was unable to sleep on the 17th of December (after 12 AM IST) so I decided to make use of my time. I made a simple Snake game in JavaFX in 3 hours (roughly from 1 AM to 4 AM). Here are all the ...
11
votes
1answer
210 views

Snake on a Plane

My code uses a canvas element to create a live snake game on a plane! ...
11
votes
5answers
77k views

First C# program (Snake game)

I've just started out using C#. I've used Scratch (drag and drop programming for kids) for quite some time. Since Scratch didn't have classes and methods I have a feeling this code could be a lot more ...
11
votes
1answer
7k views

Snake game for Windows console

I would apreciate any suggestions on how to make my code better and more efficient. ...
10
votes
2answers
4k views

Console snake game in C#

This is my first console application in C# and I think it's unnecessarily wrong and I made some bad practices, but at least it works smoothly. How could I improve this code so that next time I write a ...
10
votes
1answer
2k views

Python snake game

If anyone has the patience to take a look at my first python snake game, I'd be very grateful for any feedback. I am fairly new to programming and Python, but am looking to improve so any constructive ...
10
votes
1answer
323 views

CodeFights: Snake Game

Description Your task is to imitate a turn-based variation of the popular "Snake" game. You are given the initial configuration of the board and a list of commands which the snake follows one-...
9
votes
1answer
3k views

ASCII-based snake game in C++

I have recently finished developing my ASCII based snake game. As a newbie to C++ I would appreciate it if I was given feedback as to how I could improve my code when it comes to efficiency and ...
8
votes
3answers
253 views

SFML snake game in C++

I made a snake game in sfml and i'm kind of proud of the code's structure, but proud doesn't mean it's good, so i'm putting it here so that if there is something that could be bettered, you would know....
8
votes
2answers
4k views

First small project - Snake in C

We started programming in school this year. I wasn't expecting to learn much but the pace is really slow so I tried to learn some things myself. I decided to do a little project for a start and that ...
8
votes
2answers
412 views

Two player snake game

I created a 2 player Snake game from my original one player version. I am looking for some feedback on how I made it. I think I could use improvement when handling input (...
8
votes
2answers
541 views

C++ Snake game using Qt-framework

I made a QT version of "Snake console game in C++" using Qt Creator 4.9.0 on Windows 7: I would like to know what can be improved, focused on the QT stuff since im new to it. I seperated the program ...
8
votes
1answer
454 views

Snake in Haskell

I wrote a partial implementation of Snake in Haskell. As of now, it only supports the movement of the snake. However, since the code is getting complex, I'm requesting for a review of the code before ...
8
votes
1answer
2k views

Simple console Snake game following GRASP

I would like to know if there is anything that I missed following the GRASP patterns. The Main Controller class: ...
7
votes
1answer
105 views

Improved snake game in SFML (C++)

This is the improved code of a question I asked some days ago. main.cpp ...
7
votes
2answers
6k views

Basic snake game

Coming from a Java background, this is my first JavaScript-only game. I'm looking for some advice on what to improve. Also, I'm having trouble when it comes to program design. Sometimes I don't ...
7
votes
1answer
15k views

Snake game made in Python

I made a snake game with /some/ code from thenewboston's tutorials when I had just started Python. I think it wasn't a good idea to start game development right away since I didn't even know if what I ...
7
votes
2answers
182 views

Snake Game with own Field API

Some days ago, I posted a question here: Field class as basis for a role playing game I payed respect to tips I find useful and made a further development of my Field-classes. These classes have to ...
7
votes
1answer
2k views

Snake game for Windows console, avoiding flicker from system(“cls”)

I just completed my own implementation of the classic snake using what I consider to be unique methods. Rather than having a map be cleared over and over again using ...
7
votes
1answer
4k views

Snake Game in C++ with OOP approach

I wrote a Snake Game in C++ and I have practiced some OOP approaches. I would really appreciate criticism and some advice. snakeGame.h ...
7
votes
2answers
5k views

Simple console snake game in Python

Here's a simple snake game I implemented in Python, which works in a console. It's not complete yet (doesn't generate food yet, and no scoring or difficulty levels), but it works. I would be really ...
7
votes
1answer
121 views

First Javascript program - Snakes game on HTML canvas

I'm relatively new to programming but my most familiar languages are Java, C# and Haskell and this is my first javascript program. All the concepts used in here were just the first thing that came to ...
6
votes
1answer
8k views

Snake game in Python

I am a biologist. Some time ago, I wanted to learn to program, and since I am fascinated by the 4th dimension and I was fascinated by the rotatation of hypercubes and hypersphere, so I decided to ...
6
votes
3answers
701 views

My re-written snake game in Javascript

This a snake game I wrote about 1 month ago. It's working well. Looking for any suggestions for my code, I want my coding improved. jsfiddle link http://jsfiddle.net/geswhvdc/ ...
6
votes
1answer
706 views

Python! (Snake)

This is now an Iterative Review. Next Iteration Nowhere near a full game yet. Just a basic overview and initialisation of a Snake() class. Thoughts? ...
6
votes
1answer
258 views

Snake console game in C++

I reviewed this question to a snake game console implementation: My first C++ game (snake console game) I enjoyed refactoring this code and presenting a solution using more C++ features/classes. I ...
6
votes
1answer
144 views

3D 1st Person Snake Game #3

Final iteration of an iterative review. The previous iteration is here: 3D 1st Person Snake Game #2 Note: For the snippet, click run, "Full page", purposely lose, and then type r. Here is the ...
6
votes
1answer
432 views

java - Basic snake game

This is a snake game I made, Note: at this point, I would like to hear any thoughts/ reviews about it. Thank you Game class: ...
6
votes
1answer
446 views

Snake Game in Java feedback

I started coding in August 2018, and I was wondering on how I can improve as a programmer. I'm more concerned about coding conventions. Particularly, how can I improve the structure of my code, ...
6
votes
1answer
5k views

Snake Game with Swing

I put my code below to ask you for a review and ask you if this can be considered a good and clean code? The game works just fine, I have encountered one issue though - the Food condition to not to ...
6
votes
2answers
774 views

Snake game using a canvas

I'm trying to reach good understanding of how to build scalable modular application structure. Recently I've been practicing with canvas and rewriting one of the popular snake game realizations. I've ...
6
votes
2answers
289 views

Snake game using SFML CPP

I made using SFML my first game project. It's a snake game, and I used 2 custom classes: snake fruit (snake grow by 1 when eat it) Here's main.cpp code: ...
6
votes
1answer
1k views

C++ Snake Game, rewritten based on a C implementation

I have a c# background and mostly worked on Web Applications. Recently I wanted to learn c++. I read many online resources and inspect 10s of source code shared on Stack Overflow / Code Review or from ...
6
votes
0answers
84 views

Snake game in Python with tkinter

I created snake as my first program with GUI, I didn't learn OOP yet, so my program has no classes. I know that I should use comments, I am sorry. Short instruction: l - increase snake speed k - ...