pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
Snake

Snake - 358.4c

Emanuel Berg (metabaron)

Tags:

Description

Another snake game just for fun/practice, I got inspired by this other guy to try to make it as compact as possible.

Changes

A yet smaller version: 1,62 kB. I guess it's possible to make it even smaller so if you know how, let me now...

Links

Home Page: http://www.pygame.org/
Source: http://stuffr.net/d/xxg871s

Screenshot


click to view original size

Releases

Snake - 755 - Jul 30, 2008
Snake - 758 B - Jul 30, 2008
Snake - 769 B - Jul 30, 2008
Snake - 773 B - Jul 30, 2008
Snake - 786 B - Jul 30, 2008
Snake - 891 byte - Jul 27, 2008
Snake - 1.58 kB - Jul 27, 2008
Snake - 358.4c - Jul 27, 2008
Snake - 358.4b - Jul 26, 2008

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

May 2, 2011 12:41am - haania arora - nickname: (haaania)
i need help please help me :(
May 2, 2011 12:41am - haania arora - nickname: (haaania)
hey whats your mail id ?
July 31, 2008 5:28am - Jordan Trudgett - nickname: (tgfcoder)
*..Shorter than 509B
July 30, 2008 5:13am - Jordan Trudgett - nickname: (tgfcoder)
See if you can get shorter than 660b
http://www.pygame.org/project/827/?release_id=1425

^_^
July 28, 2008 2:20am - Samuel Backman - nickname: (pyscripter)
WOW!
July 27, 2008 1:10pm - Emanuel Berg - nickname: (metabaron)
Wow, I must say I'm impressed by what you did!
This "import pygame as p" I didn't even knew was possible, for example!
I'll upload the new file...
July 27, 2008 12:54pm - Emanuel Berg - nickname: (metabaron)
Ha ha, to do that is the last step when everything is right 'cuz after that has been done it is very different to read the code!

Anyway thanks, I will study the new code :) Wow, programming is cool...
July 27, 2008 12:34pm - Rolf Sievers - nickname: (lizard)
Your's used 1624,I made it 842 chars. That is 52%! (http://pastebin.com/m7a73fb5e)
I used tabs instead of spaces, Unix instead of Windows (one char less than Windows per row), shorter var names, import .. as .., no spaces next to , = == != < and >, range instead of xrange, used a var for range. I also removed pygame.quit() who need this? for example:
if snake_y < 0 or snake_y > 29 or snake_x < 0 or snake_x > 39 or field[snake_y][snake_x] == 1: break
got changed to
if f<0 or f>29 or d<0 or d>39 or h[f][d]==1:1/0
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Jul 28, 2014

Jul 22, 2014

Jul 21, 2014

Jul 20, 2014

Jul 19, 2014

Jul 15, 2014

Jul 10, 2014

Jul 9, 2014

Jun 27, 2014



Jun 24, 2014

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)