Skip to main content

Hungry Snake

Snake Game named as "Hungry Snake"


Ankur Aggarwal
(ankur1990)
This is my first and very basic try with Pygame API usage. "Snake" game is very popular and it is one of the simplest 2D game. Take a look at my try :):)

Changes

Links

Home Page
http://code.google.com/p/hungry-snakes/downloads/list

Releases

Hungry Snake 0.0.2 — 13 May, 2011

Pygame.org account Comments

  • PataytoPatato 2013-12-09 03:41

    I looked at your code and noticed that you defined the same font several times, as in

    start=pygame.font.SysFont("comicsansms",30)

    text2=start.render("Press s to start",True,(0,255,0))

    q=pygame.font.SysFont("comicsansms",30)

    text3=q.render("Press q to quit",True,(0,255,0))

    The current code is fine, but you know instead of setting it to a new variable, you can just use the same one, like so:

    start=pygame.font.SysFont("comicsansms",30)

    text2=start.render("Press s to start",True,(0,255,0))

    text3=start.render("Press q to quit",True,(0,255,0))

    It would give you the same results, not sure if it's more efficient, just wanted to let you know.