Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
1answer
53 views

Simple Console Snake game C++

I recently started learning C++ and have made a very simple Console-based Snake Game, I would like to have some feedback on improvements. You might notice the obvious delay in clearing and printing ...
1
vote
0answers
43 views

Snake animation in Swing

I'm developing a simple Snake game in Java using Swing. So far I made the snake animation which is troubling me: when the snakes moves it seems like it starts to lag for no reason, but when I move it ...
19
votes
3answers
2k 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 ...
10
votes
2answers
378 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 ...
4
votes
0answers
69 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 (...
6
votes
2answers
95 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: ...
4
votes
0answers
57 views

JavaScript canvas Snake game

This is my 3rd JavaScript canvas game. It's basically just snake right now but I am planning on adding some more aspects to it soon. I was wondering if I could get some feedback especially on how I'm ...
1
vote
1answer
200 views

Implementation of the Snake game in Pygame, with GUI

I wrote a simple Snake game in Pygame, with GUI. It`s my first Pygame game and one of my first projects in Python. My goal with this implementation is to make it bug-free with fluid UI and as fast/...
5
votes
3answers
99 views

JavaScript Snake: First app

I just finished my first full app in JavaScript and I'm hoping to get some feedback. I guess I'm looking for overall design advice, use of classes and functions etc. but anything is fair game so I am ...
3
votes
0answers
108 views

Nibbles/Snake game in Python

I am a total beginner at Python, so I wrote a very simple snake game using pygame to get some practice with it. I also don't have too much experience with object-oriented design. Does the code ...
2
votes
1answer
171 views

Python tkinter Snake

I have made a little Snake game with Python tkinter. It's my first Python program with one GUI. What can I improve? ...
3
votes
2answers
441 views

Console Snake Game in C++ with Classes

I would appreciate some criticsm on my code so that I could improve it. I tried making the Snake game in OOP but don't think I did it right. Any suggestions would be appreciated. The code is is ...
4
votes
2answers
172 views

Snake game for Windows text console

I have started to code Snake in C++. I am finding it hard to make progress on this project because the code is quite messy. How can I improve the structure of my program? main.cpp: ...
2
votes
1answer
278 views

Javascript Snake

I have implemented a little snake game with Javascript and Html. This is my first game with Javascript. I use a Linkedlist to represent the snake. Both code snippets are in snake.js file. It would be ...
3
votes
2answers
620 views

Snake Game in C++ using OOP

I am currently a student and I have an assignment in my OOP C++ course where I need to create a snake game using these specific requirements. I added some features into snake to fit these requirements ...
4
votes
2answers
464 views

Java Snake game using MVC with difficulty settings, persistent stats, and sounds

I completed two intro computer science courses on the basics of Java programming and data structures in university, and have continued to study programming on my own over the past few months. This is ...
6
votes
3answers
363 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/ ...
3
votes
0answers
74 views

3D 1st Person Snake Game #3

Final iteration of an iterative review. The previous iteration is here: 3D 1st Person Snake Game #2 Here is the snippet: ...
5
votes
1answer
105 views

3D 1st Person Snake Game #2

This is an iterative review of this question: 3D 1st Person Snake Game #1 The next iteration can be found here: 3D 1st Person Snake Game #3 Here is a snippet of the code: ...
5
votes
1answer
269 views

Simple two player snake game

I've been working on a two player snake game in python. I would really appreciate any suggestions/general input that would help improve my coding. ...
2
votes
1answer
243 views

3D 1st Person Snake Game #1

Snake on a plane 2.0 This is the first iteration of an iterative review. The next iteration is found here: 3D 1st Person Snake Game #2 When I figure out how to add wings, this snake is going to have ...
10
votes
1answer
174 views

Snake on a Plane

My code uses a canvas element to create a live snake game on a plane! ...
3
votes
0answers
222 views

Snake in Haskell with Ncurses

I've created the Snake implementation in Haskell. User input and graphic is handled by the Ncurses library. The goal of this question is to get the feedback on what can I improve to make it more ...
2
votes
0answers
310 views

Battle-based snake game in tkinter

Disclaimer: This code is far from complete, I am aware of issues regarding my standards of naming, my lack of comments and readability, however I am encountering a large issue which is preventing me ...
7
votes
1answer
912 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 ...
3
votes
0answers
2k views

Snake Game using python and tkinter

I have written a Snake game using Python's Tkinter library. I am a beginner to programming. I learned some python alone and in school. However, most of what we did in school is algorithms/data ...
4
votes
0answers
91 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 ...
4
votes
1answer
1k views

Snake Game on pygame

I'm working for a month or so on a Snake game in Python. It's working well (I got some good help on it already), but since I'm a beginner in pygame, I would like some feedback from better programmers ...
2
votes
2answers
374 views

Console Based Snake Game

This is a simple program where the goal is to visualize a virtual game to be played by an AI. For the purposes of this post, the playGameManually() function was ...
4
votes
0answers
681 views

Multithreaded Excel + VBScript Timer: Snake Game Demo

Multithreaded Excel + VBScript Timer After reviewing these post: Snake in Excel in… VBA? and Drawing a snake using arrow keys in Excel using VBA, I decided to work on creating a VBA Timer. The ...
2
votes
1answer
3k views
10
votes
1answer
269 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-...
1
vote
0answers
186 views

Drawing a snake using arrow keys in Excel using VBA

Since a few days I am trying to make a simple snake game with VBA. So far, I have a moving square, that listens to the arrow commands of the keyboard. (Press Home to break it). Something like this: ...
2
votes
0answers
173 views

Which JavaScript snake-game implementation is better?

I was sort of bored and wondered how that Youtuber (Max Wihlborg) implemented his snake-game, so I went on and took a look at his code, and then I and edited his code. I made some minor changes, but ...
4
votes
2answers
1k views

Snake game in JavaScript

This is my first work in JS. It works but I would like to hear criticism of this code. ...
1
vote
1answer
719 views

Xaml Wpf Snake game

I'm doing a game in Xaml WPF and I didn't really choose the tools and languages. It's to be hidden in a really big app with a lot of code. The whole snake takes place in a simple xaml canvas and xaml....
5
votes
1answer
996 views

Snake Game in JavaFX

I've made a simple snake game on which I want to expand with some properties and settings to allow the user to change the speed increments of the snake and the game field size. Before expanding on it ...
5
votes
1answer
146 views

Bare bones SNAKE game

This is the bare bones of a SNAKE game that I'm working on, the code runs as is, I've taken great care to keep my code clean and readable. I would appreciate feedback on my code. I plan on creating ...
4
votes
1answer
286 views

Rust Snake Game

...
4
votes
1answer
318 views

Snake game made with Python

how would I go about making this code "cleaner"? Right now it's a pain to look at and try to understand. ...
6
votes
1answer
721 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 ...
2
votes
2answers
1k views

Python snake game with pygame

I am a new programmer and I sill don't know how to write a clean code. please suggest me ways to improve my skill and how to write a proper code. ...
12
votes
2answers
871 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 ...
6
votes
1answer
3k 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 ...
4
votes
1answer
176 views

Snake videogame in Python

I made a Snake game in Python 3 with pygame. Please do critique it as much as possible. IMPORTANT NOTE: I updated the code at 3:30 3/23 ...
2
votes
1answer
122 views

Snake game get lagspikes despite my optimization

Why is my code lagging? It gets those lagspikes that will ruin the whole game. I know JavaScript in the browser maybe isn't the best for games, but it doesn't have to lag? ...
2
votes
0answers
384 views

C++ Snake Object-Oriented

So I've made a snake game with object-oriented approach. I would be glad if you could take a look at the code and give me any advices/tips/point out errors/etc. :) main.cpp: ...
19
votes
1answer
11k 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 ...
12
votes
1answer
6k 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 ...
5
votes
2answers
1k views

Snake Game in C# - follow-up

Follow up to this question : Snake Game in C# The game plays like it did in my first question. The design is altered. Gameplay Video Some of the changes: Polymorphism is removed, replaced by ...