Skip to main content

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
6 votes
1 answer
557 views

Play Snake Game on Mac OS Terminal using C with ncurses Library

Made a simple snake game in C. I am just having some fun with program and using this as a spring board of knowledge in hopes to get some confidence to maybe try different kinds of projects. I am ...
Alf's user avatar
  • 63
4 votes
1 answer
77 views

Terminal based game: Part 3 (Using templated game)

Working from previous posts In this post: Terminal based game: Part 2 I introduced the concept of a Game object. To build a game like Terminal Base Snake you could ...
Loki Astari's user avatar
  • 95.3k
4 votes
1 answer
74 views

Terminal Base Snake

Based on this Framework Terminal based game: Part 2 A game that uses std::cout to print the board and std::cin to get keyboard ...
Loki Astari's user avatar
  • 95.3k
5 votes
1 answer
155 views

Recreated Snake in Rust

This is my first ever program in Rust. I've made it using only the book, the reference, and any documentation about the crates/functions I was using on the official rust lang website. I have the ...
teoscuraa's user avatar
0 votes
0 answers
53 views

Snake game player movement pygame

I've begun my journey with game development a little while ago, thought recreating snake would be cool, except I plan on adding other cool mechanics and stuff to it later. The player controller script ...
Trevn Jones's user avatar
6 votes
1 answer
429 views

C# Snake in Console

I've created Snake in Console. I've tried to make my code as good as I possibly could. (Code on github: https://github.com/bartex-bartex/SnakeCSharp) Question Is my coding style good enough, so I can ...
NeverDoomedEnough's user avatar
2 votes
0 answers
119 views

Snake game with constant time complexity algorithm

https://github.com/speedrun-program/constant_time_snake_game Memory efficient snake game with O(1) algorithm for snake movement and bug placement. Three grids are used: a grid representing the game ...
my_stack_exchange_account's user avatar
0 votes
1 answer
110 views

Snake game with Pygame

I created and finished a Snake using pygame (in Python) utilising feedback I had from a previous code review a year or two ago. I'm pretty happy with the current state and havn't identified any bugs ...
blib's user avatar
  • 73
3 votes
1 answer
149 views

python pygame snake game

I used numpy for the O(n) parts, but I didn't add any ability to change grid size because I still wonder if there's a way to make it better than O(n). main.py: <...
my_stack_exchange_account's user avatar
2 votes
1 answer
459 views

Object-oriented Snake game in HTML without using canvas

I wanted to try out classes in Javascript and implemented a snake game. You can control the snake by using the arrow keys. I would be interested to know if the source code can be improved in terms of ...
Dexter Thorn's user avatar
  • 2,174
6 votes
1 answer
499 views

Snake Game Clone in JavaFX

I am a beginner at programming. I made this snake game in JavaFX to practice and improve my coding skills. I tried to make my code clean, but I'm not sure if it is, or if it is well-organized. I also ...
Abeer's user avatar
  • 63
1 vote
2 answers
442 views

Simple snake game with C and raylib

Made a simple snake game using C and raylib for graphics, Would like to be critiqued on the clearity and efficiency of the code. ...
throwaway364's user avatar
1 vote
0 answers
53 views

I've coded a javascript snake game, but i'm not sure if i've used module pattern correctly

I've wrapped everything inside a gamecontroller, so that everything is private, was this a good idea? that was my first time using oop and module pattern. also the code is in a good shape, or must be ...
leo___'s user avatar
  • 11
2 votes
1 answer
258 views

Snake game as console app in c++

I made a snake game as console aplication. It was my first real little project I did all alone. I tried using best practices I learned but I've got lost few times so I suppose there will be some bad ...
Ivica's user avatar
  • 75
7 votes
1 answer
954 views

C# Console Snake Game

I was busy writing an answer for this question when I realized that I was busy creating a new solution without explaining what the original poster did wrong, again. So I decided to rather post what I ...
jdt's user avatar
  • 2,362
5 votes
0 answers
2k views

Simple snake game in Python

I have created a snake game in Python. It is a single-player game, where the snake has to eat the red dots in order to grow longer. I just wanted to review if there are any improvements. ...
Ghost's user avatar
  • 185
4 votes
1 answer
1k views

A simple text based snake game in python

I've written a simple text-based (can be run in terminal) snake game in python. This is a personal project and also one of my very first projects in python. I appreciate any advice or suggestion that ...
Amir reza Riahi's user avatar
2 votes
1 answer
440 views

Win32 Snake game

I made a trival snake game below to practice my C++ and Win32 programming skills. ...
Jimmy Yang's user avatar
20 votes
4 answers
9k views

A Snake Game in C

I made a snake game in c, it runs pretty well, everything is working, I think, I'm just wondering if there are any bugs I'm not aware of or if there is anything I can do better. ...
dareesome's user avatar
  • 471
1 vote
0 answers
147 views

Snake game in console

I made a snake game implementation in console with rust. Would like to hear what I'm doing wrong and what can be improved. main.rs ...
Padriton's user avatar
2 votes
1 answer
1k views

Ncurses Snake Game using a Linked List in C

This is a lightweight text based version of the popular game Snake written entirely in C. In order to build it, ncurses needs to be installed on the system. Navigation is done using the vim-keys and ...
Andy Sukowski-Bang's user avatar
6 votes
3 answers
1k views

Java GUI Snake game

I just got started coding in Java and I just made my first project. I was wondering if someone would review my code and show me the things I can improve in it. I am eager to learn and would appreciate ...
user239206's user avatar
3 votes
2 answers
1k views

Simple Snake Game With OOP in Mind

I am a beginner in C# and trying to learn how to program with OOP in mind. I am 100% that the code is not OOP-friendly at all, but the game is running and working, so if anyone could look throw the ...
zellez11's user avatar
0 votes
1 answer
287 views

Object-oriented Snake game

Right now I have a snake game that is working but I need a way to make my code look better and work better. A method I named GameSense is very long and I need a way ...
Mrrovy's user avatar
  • 11
1 vote
0 answers
149 views

First c program: Snake with ncurses

Six month ago I started studying C as my first programming language and a couple of weeks ago I decided to write snake as my first program. The program is written with ncurses and contains four ...
rieger60's user avatar
1 vote
1 answer
615 views

Snake game in C++17 with SDL2

I implemented a simple snake clone in C++, using SDL2 for the graphics part. Gameplay-wise, its pretty much classic snake: The player is able to control the snake with "WASD", food gets ...
Tom Gebel's user avatar
  • 350
3 votes
1 answer
157 views

Snake from the viewpoint of the snake

I wrote a little game of snake that where you can see the field in which the snake moves fixed and you can also see the "viewpoint" of the snake, which is basically calculating the positions ...
Javier Camacho's user avatar
2 votes
2 answers
3k views

A snake game in HTML/CSS/JavaScript

I made a snake game in HTML/CSS/JavaScript. I want to make my code better and shorter. Here is my codes: index.html: ...
Arian's user avatar
  • 65
3 votes
1 answer
116 views

Snake using Pygame

I'd be grateful if you could review my code. Please be as critical towards it as possible and yet indulgent when it comes to asking my first question here. This is a simple snake game using pygame. I ...
Marcus's user avatar
  • 31
2 votes
0 answers
219 views

Responsive snake game

Snake Snake first appeared in the 1970s. Since then it has become a video game classic that is pre-installed on many systems. The rules are simple: Food (often an apple) appears randomly on the grid. ...
user avatar
9 votes
1 answer
354 views

Snake Game Object Oriented Approach

I just completed a snake game using object-oriented programming. The focus is on the class implementation. OVERVIEW Snake game works by moving the snake in order to eat fruits whilst escaping ...
theProgrammer's user avatar
5 votes
1 answer
241 views

A Python snake game (using Pygame)

So this is a fun little project I am working on. This is my current progress with the game: ...
Sriv's user avatar
  • 2,740
3 votes
1 answer
335 views

C++ Snake game using SFML libraby

Here is my little snake game which I made in c++ using the SFML library. The game is very simple. I have also included a screenshot of how the GUI looks. The files which I am loading are 30x30 colored ...
user avatar
4 votes
1 answer
940 views

Snake game using C++ and FLTK

Description I've written the snake game using C++ and FLTK. For simplifying the use of FLTK, a built-up library written by Bjarne Stroustrup was used. Bellow located main parts of the code written by ...
WumpusHunter's user avatar
17 votes
2 answers
3k views

OOP Snake Game C++

This is my version of the Snake Game. The project is not done yet, I still want to try to implement some other game mechanics like two player mode, high score leaderboard, etc. Also I would like to ...
Bunny's user avatar
  • 183
4 votes
1 answer
2k views

Snake game in C++ with SFML

I started learning programming about a year ago, starting with Python. Half a year ago, I moved onto C++ and this is my first large project with that language. Have I understood the basics of the ...
JensB's user avatar
  • 175
5 votes
2 answers
806 views

Object oriented approach for snake game in C++

I started to code in c++ recently and my goal is to develop games using c++. After learning basics I tried to implement my own version of snake console based game in c++ with the help of some online ...
Sakitha Navod's user avatar
6 votes
1 answer
2k views

JavaFX clone of Snake game

I have made a Snake clone using Java 14 and JavaFX 14. My game uses an anonymous instance of the AnimationTimer class as the game loop. The basic UI for the start ...
qwerty's user avatar
  • 361
2 votes
1 answer
127 views

Snake in Javascript

I feel like there's something wrong with the way my code is styled but I can't quite place what's wrong with it. Perhaps the way I've represented the snake is a little convoluted? ...
L292092's user avatar
  • 419
4 votes
1 answer
403 views

A Python Snake Game Using Pygame

My attempt at creating a snake game, in pygame. I tried to make it as simple as possible, but i feel it could be better in terms of best practice, and efficiency, along the idea of avoiding redundant ...
user avatar
4 votes
0 answers
102 views

Snake-game using Python 3 and PyGame

I'm pretty new to Python and really new to PyGame. My snake game runs, but I guess that's not really saying much. I would appreciate feedback on the layout, techniques, or best practices of my code. <...
umm0000what's user avatar
3 votes
0 answers
734 views

Snake game with multiple snakes

Firstly, I wrote standard snake game, then I decided to increase difficulty and made game with various snake number. My main point was to try the curses module, the second - to create game with OOP ...
MiniMax's user avatar
  • 862
5 votes
1 answer
887 views

Snake game with C and SDL using linked lists

I am total beginner in C and after reading K&R's chapter 5, I felt I was ready to at least make a simple game using C. I know linked-lists, so since I was making an implementation of Snake, why ...
kibe's user avatar
  • 277
3 votes
3 answers
116 views

Pygame snake as first game

After poking around in some areas of python, I've decided to try Pygame. After about two hours of coding, this is what I came up with: ...
Dion's user avatar
  • 131
5 votes
1 answer
292 views

Simple Console Snake Game

I have created a Snake console game using object-orientated programming methods. This is the first time I have ever used OOP so I just wanted to know if I was using the method correctly as well as ...
JeffASon's user avatar
2 votes
0 answers
3k views

Snake Game for Raspberry Pi Sense HAT written in Python

Goals learn Python improve problem-solving skills improve my coding style Hardware This code runs on a Raspberry Pi 3 Model B (Raspbian OS) in combination with the Sense HAT. The 8x8 LED-Matrix on ...
dadul96's user avatar
  • 153
6 votes
1 answer
1k 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 - ...
HelloBT's user avatar
  • 79
5 votes
3 answers
447 views

Snake Game C++ Improvements?

Is there anything you would suggest to improve this code? In particular, any code to make the snake move more smoothly and make the cursor disappear. ...
Tarun's user avatar
  • 53
7 votes
1 answer
4k 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: ...
benjamin's user avatar
  • 173
3 votes
2 answers
1k views

Snake game using graphics.py

I am a self taught python beginner for about 3 months and recently I finished my own snake game project. As seen from the code, it is not very efficient nor tidy to look at so I want to know if there ...
ifsoMarcus's user avatar