Skip to main content

YetAnotherPythonSnake

This is just another python snake game... but it's beautiful!


Simone Cingano
(imente)

YET ANOTHER PYTHON SNAKE
===========================

GITHUB REPOSITORY https://github.com/yupswing/yaps

I took inspiration from "Invention" code (by XASM Studio) to learn how to program in PyGame (Thank you!)

This is my first game in pygame, and I know there is a lot of mess in the code. (I will work on it for a final 1.0 version)

Anyway... let me give credit to who deserves it:

*Sound & Music
NLM, Setuniman, Rock Savage, j1987, qubodup, theta4, Freqman (CC) freesound.org
*Title Background Photo
"Close up grass" by Sam Kim (CC) flickr.com"

 

NOTE: THIS IS NOT A FINAL GAME. EVERY SUGGESTION IS WELCOME!

NOTE: NOT TESTED ON PYTHON 3

 

HOW TO PLAY THE GAME
======================

Arrows or WASD to move
P to pause
M to toggle music
ESC quit

Red apples give 1 point
Blue apples give 5 points (they disappear quickly!)
Black Blocks appear randomly on the map (avoid them!)
And last, but not least, don't eat yourself!

 

FEATURES
==========

+ Play as a snake that eats apples and moves orthogonally (is this a feature?!?)
+ Highscores (to beat yourself again and again)
+ Vector graphics (I don't need raster, man)
+ The game is resolution independent (This is freakin' cool)
+ GUI (a prototype that needs a lot of work)
+ It's a gameee! (the best feature at all)

 

TODO
=====

+ Levels (difficult will increase every 50 chomps)
+ Portals
+ Special food
+ Highscore online
+ Code documentation
+ Code cleaning
+ More??? God, it's just a snake f*ckin' game

 

YOU
====

If you want, make an EXE with py2exe and send it to me. I'm on a Mac and I can't :P (read README.TXT to get my email)

 

IN THE END
=========

Please, tell me what you think!

PS: There is no active website, I'm workin' on it

 

Changes

Links

Home Page
https://github.com/yupswing/yaps

Releases

YetAnotherPythonSnake 0.92 — 14 Jan, 2015

YetAnotherPythonSnake 0.91 — 27 Jun, 2012

YetAnotherPythonSnake 0.9 — 24 Jun, 2012

Pygame.org account Comments

  • Mekire 2012-06-24 03:47

    Runs nice and smoothly.  There was a small issue with the score displaying correctly on my computer.  I only see the top half of both numbers.  Also you might note that a lot of people take exception with making your program run in full screen by default.  Anyway, keep up the good work.
    -Mek

    yupswing 2012-06-24 08:27

    You're right, talking about the fullscreen mode: I will add an hotkey to toggle fullscreen, and make the game starts in windowed mode by default.
    About the small issue, I will check soon.
    Thank you for your nice comment :)

  • josmiley 2012-06-24 08:15

    python3:

       File "/home/jos/Bureau/lib/highscore.py", line 68, in save
        score_file.write(self.cypher("%s,%s,%s" % (el["name"],el["elapse"],el["score"]))+'\n')
    TypeError: 'str' does not support the buffer interface

    score display fails

    yupswing 2012-06-24 08:27

    I'm sorry, right now it only works with Python 2.x (I'm using python 2.7)
    I will test next release on Python 3
    Thank you for the feedback

  • WeevilKnevil 2012-06-27 10:10

    So fucking awesome man! This is one of the best snake games I've ever played! Keep up the awesome work!

    yupswing 2012-06-27 15:25

    thank you very much! :)))

  • Benjamin Anderson 2012-06-27 14:02

    I suggest that you use pygame.quit() and sys.exit() to close the program.  It won't close properly otherwise.  It may be that I'm using the wrong version of pygame though.  Other than that, great game.  I enjoyed playing it.

    yupswing 2012-06-27 15:25

    done in 0.91 :)
    thank you

  • josmiley 2012-06-27 17:58

     sometimes the snake gets shorter ...

    yupswing 2012-06-28 13:32

    if you look at the code you can find that this is nearly impossible.
    anyway I will check this weird thing.

    josmiley 2012-06-28 14:08

     well, it is not really shorter, but the body is not completely drawn ...

    yupswing 2012-06-28 17:19

    I would appreciate it if you could take a screenshot... (press 1 to take a screenshot in-game)

    josmiley 2012-06-28 17:38

    with python3:
    http://www.dailymotion.com/vid...

    seems work fine with python2

    yupswing 2012-06-29 09:34

    probably it's a DirtyRender draw error on python 3.
    I didn't test the game on python3 (I can't realize how to install pygame for python3 on mac. every way I try it's a fail -_-)

  • Xizr3zminecraft 2012-07-01 17:49

    nice