Foros del Web » Programando para Internet » Python »

[APORTE] Un juego

Estas en el tema de [APORTE] Un juego en el foro de Python en Foros del Web. Hola, Hace unos meses programe un juego en python cuando estaba aburrido y quería aprender python xD... (no se porque siempre hago este juego ).. ...
  #1 (permalink)  
Antiguo 20/05/2010, 12:55
Avatar de pato12  
Fecha de Ingreso: septiembre-2007
Ubicación: Salta
Mensajes: 1.620
Antigüedad: 16 años, 7 meses
Puntos: 101
Sonrisa [APORTE] Un juego

Hola,
Hace unos meses programe un juego en python cuando estaba aburrido y quería aprender python xD... (no se porque siempre hago este juego )..
Código Python:
Ver original
  1. # Por Pato12
  2. # Este script es libre de usar siempre
  3. # cuando no borren estas lineas y respeten la
  4. # licencia GNU:
  5. # http://creativecommons.org/licenses/GPL/2.0/deed.es_AR  
  6. # GNU General Public License
  7. import os, pygame, sqlite3
  8. from pygame.locals import *
  9.  
  10. ######################################################################
  11. pygame.init()
  12. screen = pygame.display.set_mode((800, 600)) # creamos la ventana
  13. pygame.display.set_caption( "Juego de Rompe Ladrillos - By pato12" )
  14. ######################################################################
  15.  
  16. coneccion = sqlite3.connect('puntajes.db')
  17. cursor = coneccion.cursor()
  18.  
  19. cursor.execute('CREATE TABLE IF NOT EXISTS puntaje (id INTEGER PRIMARY KEY, nombre TEXT, puntos NUMERIC)')
  20.  
  21.  
  22. #cursor.execute('insert into puntaje (nombre,puntos) values ("pato",520)')
  23.  
  24. coneccion.commit()
  25. cursor.close()
  26.  
  27.  
  28. ######################################################################
  29.  
  30. def imgcolorkey(image, colorkey):
  31.     if colorkey is not None:
  32.         if colorkey is -1:
  33.             colorkey = image.get_at((0, 0))
  34.         image.set_colorkey(colorkey, RLEACCEL)
  35.     return image
  36.  
  37. def load_image(filename, colorkey = None):
  38.     image = pygame.image.load(filename).convert()
  39.     return imgcolorkey(image, colorkey)
  40.  
  41. class SpriteSheet:
  42.     def __init__(self, filename):
  43.         self.sheet = load_image(filename)
  44.     def imgat(self, rect, colorkey = None):
  45.         rect = Rect(rect)
  46.         image = pygame.Surface(rect.size).convert()
  47.         image.blit(self.sheet, (0, 0), rect)
  48.         return imgcolorkey(image, colorkey)
  49.     def imgsat(self, rects, colorkey = None):
  50.         imgs = []
  51.         for rect in rects:
  52.             imgs.append(self.imgat(rect, colorkey))
  53.         return imgs
  54.  
  55. ######################################################################
  56.  
  57.  
  58. def escribir_game(texto,tam,color,x,y):
  59.     texto = unicode(texto, "UTF-8")
  60.     fuente = pygame.font.Font('img/arial.ttf', tam)
  61.     texto = fuente.render(texto, 1, color)
  62.     screen.blit(texto, (x,y))
  63.      
  64. def pintar_fondo_default(fondo = 'img/fondo.png'):
  65.     screen.blit(load_image(fondo), (0,0))
  66.  
  67.  
  68. ###################################################
  69.  
  70.  
  71.  
  72.  
  73. def game_goo():
  74.     mapas=[
  75.                                  
  76.     [0,0,0,0,0,0,0,0,0,0,
  77.     0,0,0,0,0,0,0,0,0,0,
  78.     0,0,0,1,1,1,1,0,0,0,
  79.     0,0,1,5,0,0,5,1,0,0,
  80.     0,0,1,0,0,0,0,1,0,0,
  81.     0,0,1,0,0,0,0,1,0,0,
  82.     0,0,1,5,0,0,5,1,0,0,
  83.     0,0,0,1,1,1,1,0,0,0,
  84.     0,0,0,0,0,0,0,0,0,0,
  85.     0,0,0,0,0,0,0,0,0,0]]
  86.    
  87.  
  88.     _game=1
  89.     _vidas=3
  90.     _nivel_game=1
  91.     _puntos_game=0
  92.     __x=352
  93.     _bola_sube=True
  94.     _y_b=485
  95.     _x_b=450
  96.     __angulo=0
  97.     _key_move=''
  98.     _empezo_game_mover=False
  99.     _pausa=False
  100.    
  101.     SpriteSheet_cosas = SpriteSheet('img/barra.png')
  102.    
  103.     barra_srf = SpriteSheet_cosas.imgat((0,0,180,12),-1)
  104.          
  105.     bola_srf = SpriteSheet_cosas.imgat((0,20,10,10),-1)
  106.     vida_srf = SpriteSheet_cosas.imgat((170,20,10,10),-1)
  107.    
  108.     SpriteSheet_ladrillos = SpriteSheet('img/ladrillos.png')
  109.    
  110.     _ladrillo1 = SpriteSheet_ladrillos.imgat((0,0,80,20),-1)
  111.     _ladrillo2 = SpriteSheet_ladrillos.imgat((0,20,80,20),-1)
  112.     _ladrillo3 = SpriteSheet_ladrillos.imgat((0,40,80,20),-1)
  113.     _ladrillo4 = SpriteSheet_ladrillos.imgat((0,50,80,20),-1)
  114.     _ladrillo5 = SpriteSheet_ladrillos.imgat((0,60,80,20),-1)
  115.    
  116.     mascaras_ladrrillos={1:_ladrillo1,2:_ladrillo2,3:_ladrillo3,4:_ladrillo4,5:_ladrillo5}
  117.    
  118.  
  119.    
  120.     SpriteSheet_puntaje = SpriteSheet('img/formas.png')          
  121.     barra_datos = SpriteSheet_puntaje.imgat((0,66,800,200))          
  122.                
  123.     all = pygame.sprite.RenderPlain()
  124.     while _game:
  125.         #####################################
  126.           for event in pygame.event.get():
  127.               if event.type == QUIT:
  128.                   _game=0
  129.                   salir_confirmar()
  130.          #####################################
  131.           if pygame.key.get_pressed()[K_p]:
  132.              _pausa= not _pausa
  133.              
  134.           if pygame.key.get_pressed()[K_m]:
  135.              _game=0
  136.              main_menu_game()
  137.           if not _pausa:  
  138.                  if pygame.key.get_pressed()[K_a] or pygame.key.get_pressed()[K_LEFT]:
  139.                    if __x>0:
  140.                       __x=__x-5
  141.                       if not _empezo_game_mover:
  142.                           _x_b=_x_b-5
  143.                    _key_move='a'
  144.                            
  145.                  if pygame.key.get_pressed()[K_d] or pygame.key.get_pressed()[K_RIGHT]:
  146.                     if __x<(800-180):
  147.                        __x=__x+5
  148.                        if not _empezo_game_mover:
  149.                           _x_b=_x_b+5
  150.                     _key_move='d'
  151.                
  152.                  if pygame.key.get_pressed()[K_w] or pygame.key.get_pressed()[K_SPACE]:
  153.                     if not _empezo_game_mover:
  154.                         _empezo_game_mover=True
  155.            
  156.              
  157.           ##################################
  158.           if not _pausa:
  159.                  if _empezo_game_mover:
  160.                     if _bola_sube:
  161.                         if _y_b>0:
  162.                            _y_b=_y_b-9
  163.                         else:
  164.                           _bola_sube=False
  165.                     else:
  166.                         if _y_b<(500-5):
  167.                             _y_b=_y_b+9
  168.                         else:
  169.                           if __x<_x_b and (__x+180)>_x_b:
  170.                              _bola_sube=True
  171.                              if _key_move == 'd':
  172.                                 __angulo=3
  173.                              if _key_move == 'a':
  174.                                 __angulo=-3
  175.                           else:
  176.                             _game=0
  177.                             if _vidas>1:
  178.                                _vidas=_vidas-1
  179.                                _game=1
  180.                                _empezo_game_mover=False
  181.                                _y_b=485
  182.                                _x_b=450
  183.                                __x=352
  184.                                __angulo=0
  185.                                _bola_sube=True
  186.                             else:
  187.                                main_game_over(_puntos_game)
  188.                                            
  189.                     if _x_b<=0:
  190.                        __angulo=3
  191.                     if _x_b>=(800-10):
  192.                        __angulo=-3
  193.                          
  194.                     _x_b+=__angulo
Continua....
__________________
Half Music - www.halfmusic.com
  #2 (permalink)  
Antiguo 20/05/2010, 12:56
Avatar de pato12  
Fecha de Ingreso: septiembre-2007
Ubicación: Salta
Mensajes: 1.620
Antigüedad: 16 años, 7 meses
Puntos: 101
Respuesta: [APORTE] Un juego

Código Python:
Ver original
  1. ####################################
  2.           _key_move=''
  3.                  
  4.                  
  5.           pintar_fondo_default()
  6.           screen.blit(barra_datos,(0,520))
  7.          
  8.           _vida_x=800
  9.          
  10.           for vt in range(0,_vidas):
  11.               _vida_x=_vida_x-15
  12.               screen.blit(vida_srf,(_vida_x,550))
  13.          
  14.           #######################################
  15.           _ladrillo_x=0
  16.           _ladrillo_y=0
  17.           __color_l=_ladrillo1
  18.           _ladrillost_totales=0
  19.           for i1 in range(0,100/10):
  20.              for i2 in range(0,10):
  21.                 if mapas[_nivel_game-1][(10*i1)+i2] != 0:
  22.                    _ladrillost_totales=_ladrillost_totales+1
  23.                    _ladrillo_x=i1*80
  24.                    _ladrillo_y=i2*20
  25.                    __color_l=mascaras_ladrrillos[mapas[_nivel_game-1][(10*i1)+i2]]
  26.                    if _y_b > _ladrillo_y and _y_b < (_ladrillo_y+20):
  27.                       if _x_b > _ladrillo_x and _x_b < (_ladrillo_x+80):
  28.                          mapas[_nivel_game-1][(10*i1)+i2]=0
  29.                          if _y_b < (_ladrillo_y+10) and _y_b > _ladrillo_y:
  30.                             _bola_sube=True
  31.                          else:
  32.                             _bola_sube=False
  33.                          _puntos_game=_puntos_game+30
  34.  
  35.                    screen.blit(__color_l,(_ladrillo_x,_ladrillo_y))
  36.           #######################################
  37.          
  38.           if _ladrillost_totales == 0:
  39.              _nivel_game=_nivel_game+1
  40.              _empezo_game_mover=False
  41.              _y_b=485
  42.              _x_b=450
  43.              __x=352
  44.              __angulo=0
  45.              _bola_sube=True
  46.              if _nivel_game > len(mapas):
  47.                 _game=0
  48.                 ganar_juego_completo(_puntos_game)
  49.          
  50.          
  51.           escribir_game('Puntos: '+str(_puntos_game),20,(0,0,0),10,530)
  52.          
  53.           escribir_game('Nivel: '+str(_nivel_game)+' de '+str(len(mapas)),20,(0,0,0),10,555)
  54.          
  55.          
  56.           escribir_game("Presione \"m\" para volver al menu principal.",15,(100,100,100),250,560)
  57.          
  58.          
  59.           screen.blit(bola_srf, (_x_b, _y_b))
  60.           screen.blit(barra_srf, ( __x, 500))
  61.           if _pausa:
  62.              escribir_game("PAUSA",30,(255,255,0),400,200)
  63.          
  64.  
  65.                
  66.           pygame.display.flip()
  67.  
  68.  
  69.  
  70.  
  71. ####################################################
  72. def main_game_over(puntos):
  73.     _bluce_principal=1
  74.     titulo_img = load_image('img/titulo.png',-1)
  75.     SpriteSheet_titulos = SpriteSheet('img/titulos.png')
  76.     cartel_perdiste = SpriteSheet_titulos.imgat((0,0,330,35),-1)
  77.  
  78.     pintar_fondo_default()  
  79.     screen.blit(titulo_img, (30,50))
  80.     screen.blit(cartel_perdiste, (450,75) )
  81.          
  82.     escribir_game('Perdiste, hiciste '+str(puntos)+' puntos en total.',30,(255,255,255),30,150)
  83.          
  84.     __n_numeros=0
  85.     _nombre=''
  86.     escribir_game('Ahora escribe tu nombre: ',30,(255,255,255),30,210)
  87.          
  88.     pygame.display.flip()
  89.          
  90.     _si=False
  91.     while not _si:
  92.           for event in pygame.event.get():
  93.               for ast in event.dict:
  94.                   if ast == 'unicode':
  95.                      __n_numeros=__n_numeros+1
  96.                      _nombre=_nombre+str(event.unicode)
  97.                      escribir_game(str(event.unicode),30,(255,255,255),380+(__n_numeros*15),210)
  98.                      if __n_numeros>=4:
  99.                         _si=True
  100.                         break
  101.                      pygame.display.flip()
  102.    
  103.     _si=True
  104.    
  105.     cursor = coneccion.cursor()
  106.     cursor.execute('insert into puntaje (nombre,puntos) values ("'+str(_nombre)+'",'+str(puntos)+')')
  107.     coneccion.commit()
  108.     cursor.close()
  109.    
  110.     escribir_game('Precione "m" para volver al menu principal.',15,(255,255,0),0,583)
  111.  
  112.          
  113.     pygame.display.flip()
  114.     while _bluce_principal:
  115.           for event in pygame.event.get():
  116.               if event.type == QUIT:
  117.                  _bluce_principal=0
  118.                  salir_confirmar()
  119.                  return
  120.           if pygame.key.get_pressed()[K_m]:
  121.              _bluce_principal=0
  122.              main_menu_game()
  123.              return
  124.  
  125.  
  126.  
  127. def ganar_juego_completo(puntos):
  128.     _bluce_principal=1
  129.     titulo_img = load_image('img/titulo.png',-1)
  130.     SpriteSheet_titulos = SpriteSheet('img/titulos.png')
  131.     cartel_ganaste = SpriteSheet_titulos.imgat((0,44,330,35),-1)
  132.  
  133.     pintar_fondo_default()  
  134.     screen.blit(titulo_img, (30,50))
  135.     screen.blit(cartel_ganaste, (450,75) )
  136.          
  137.     escribir_game('Ganaste, hiciste '+str(puntos)+' puntos en total.',30,(255,255,255),30,150)
  138.          
  139.     __n_numeros=0
  140.     _nombre=''
  141.     escribir_game('Ahora escribe tu nombre: ',30,(255,255,255),30,210)
  142.          
  143.     pygame.display.flip()
  144.          
  145.     _si=False
  146.     while not _si:
  147.           for event in pygame.event.get():
  148.               for ast in event.dict:
  149.                   if ast == 'unicode':
  150.                      __n_numeros=__n_numeros+1
  151.                      _nombre=_nombre+str(event.unicode)
  152.                      escribir_game(str(event.unicode),30,(255,255,255),380+(__n_numeros*15),210)
  153.                      if __n_numeros>=4:
  154.                         _si=True
  155.                         break
  156.                      pygame.display.flip()
  157.    
  158.     _si=True
  159.    
  160.     cursor = coneccion.cursor()
  161.     cursor.execute('insert into puntaje (nombre,puntos) values ("'+str(_nombre)+'",'+str(puntos)+')')
  162.     coneccion.commit()
  163.     cursor.close()
  164.    
  165.     escribir_game('Precione "m" para volver al menu principal.',15,(255,255,0),0,583)
  166.          
  167.     pygame.display.flip()
  168.     while _bluce_principal:
  169.           for event in pygame.event.get():
  170.               if event.type == QUIT:
  171.                  _bluce_principal=0
  172.                  salir_confirmar()
  173.                  return
  174.           if pygame.key.get_pressed()[K_m]:
  175.              _bluce_principal=0
  176.              main_menu_game()
  177.              return
  178.  
  179. def puntajes_mostrar():
  180.     _bluce_principal=1
  181.     titulo_img = load_image('img/titulo.png',-1)
  182.     SpriteSheet_puntaje = SpriteSheet('img/formas.png')
  183.    
  184.     barra_datos = SpriteSheet_puntaje.imgat((0,0,800,37))
  185.     barra_antes = SpriteSheet_puntaje.imgat((0,66,800,15))
  186.     barra_espacio = SpriteSheet_puntaje.imgat((0,80,800,30))
  187.    
  188.     while _bluce_principal:
  189.           for event in pygame.event.get():
  190.               if event.type == QUIT:
  191.                  _bluce_principal=0
  192.                  salir_confirmar()
  193.                  return
  194.           if pygame.key.get_pressed()[K_m]:
  195.              _bluce_principal=0
  196.              main_menu_game()
  197.              return
  198.              
  199.           pintar_fondo_default()      
  200.           screen.blit(titulo_img, (30,50))
  201.           screen.blit(barra_datos, (0,150))      
  202.           screen.blit(barra_antes, (0,185))
  203.          
  204.           ###############
  205.          
  206.           cursor = coneccion.cursor()
  207.           sqs_totales=0
  208.           cursor.execute('select * from puntaje order by puntos desc limit 0,10')
  209.           for row in cursor:
  210.               screen.blit(barra_espacio, (0,190+(sqs_totales*30)))
  211.               escribir_game(str(sqs_totales+1),15,(50,50,50),80,190+(sqs_totales*30))
  212.               escribir_game(str(row[1]),15,(50,50,50),280,190+(sqs_totales*30))
  213.               escribir_game(str(row[2]),15,(50,50,50),580,190+(sqs_totales*30))
  214.               sqs_totales = sqs_totales+1
  215.              
  216.          
  217.           if sqs_totales == 0:
  218.              screen.blit(barra_espacio, (0,190))
  219.              escribir_game('Nadie a jugado al juego aun, por eso no hay puntajes.',15,(100,100,100),10,193)
  220.          
  221.           escribir_game('Precione "m" para volver al menu principal.',15,(255,255,0),0,583)
  222.          
  223.           pygame.display.flip()
  224. def salir_confirmar():
  225.     titulo_img = load_image('img/titulo.png',-1)  
  226.     _bluce_principal=1
  227.     _opcion_elejida=1
  228.     SpriteSheet_salir = SpriteSheet('img/salir.png')
  229.    
  230.     opciones={"desactivado":
  231.                         {
  232.                         "si":SpriteSheet_salir.imgat((32,95,55,45),-1),
  233.                         "no":SpriteSheet_salir.imgat((32,145,55,45),-1)
  234.                         },
  235.               "activado":
  236.                         {
  237.                         "si":SpriteSheet_salir.imgat((180,95,55,45),-1),
  238.                         "no":SpriteSheet_salir.imgat((180,145,55,45),-1)
  239.                         }          
  240.              }
  241.    
  242.     pregunta=SpriteSheet_salir.imgat((32,0,280,70),-1)
  243.    
  244.     while _bluce_principal:
  245.           for event in pygame.event.get():
  246.               if event.type == QUIT:
  247.                  _bluce_principal=0
  248.                  salir_confirmar()
  249.                  return
Continua...
__________________
Half Music - www.halfmusic.com
  #3 (permalink)  
Antiguo 20/05/2010, 12:57
Avatar de pato12  
Fecha de Ingreso: septiembre-2007
Ubicación: Salta
Mensajes: 1.620
Antigüedad: 16 años, 7 meses
Puntos: 101
Respuesta: [APORTE] Un juego

Código Python:
Ver original
  1. pintar_fondo_default('img/fondo_menu.png')      
  2.           if pygame.key.get_pressed()[K_e] or pygame.key.get_pressed()[K_RETURN]:
  3.              if _opcion_elejida == 1:
  4.                 _bluce_principal=0
  5.                 return
  6.              if _opcion_elejida == 2:
  7.                 _bluce_principal=0
  8.                 main_menu_game()
  9.                 return
  10.                
  11.           if pygame.key.get_pressed()[K_a] or pygame.key.get_pressed()[K_LEFT]:
  12.              if _opcion_elejida==1:
  13.                 _opcion_elejida=2
  14.              else:
  15.                 _opcion_elejida=1
  16.           if pygame.key.get_pressed()[K_d] or pygame.key.get_pressed()[K_RIGHT]:
  17.              if _opcion_elejida==2:
  18.                 _opcion_elejida=1
  19.              else:
  20.                 _opcion_elejida=2
  21.          
  22.           if _opcion_elejida == 1:
  23.              screen.blit(opciones['activado']['si'],(8,290))
  24.              screen.blit(opciones['desactivado']['no'],(90,290))
  25.           if _opcion_elejida == 2:
  26.              screen.blit(opciones['desactivado']['si'],(10,290))
  27.              screen.blit(opciones['activado']['no'],(87,290))
  28.              
  29.           screen.blit(titulo_img, (30,50))
  30.           screen.blit(pregunta,(0,195))
  31.           pygame.display.flip()      
  32.                
  33. def main_menu_game(primero=False):
  34.     titulo_img = load_image('img/titulo.png',-1)
  35.     titulo_juego_ir=50
  36.     _bluce_principal=1
  37.     if primero:
  38.        titulo_juego_ir=-100
  39.        while (titulo_juego_ir <= 50):
  40.              for event in pygame.event.get():
  41.                  if event.type == QUIT:
  42.                     titulo_juego_ir=51
  43.                     salir_confirmar()
  44.                     return
  45.              pintar_fondo_default()
  46.              titulo_juego_ir=titulo_juego_ir+10
  47.              screen.blit(titulo_img, (30,titulo_juego_ir))
  48.              pygame.display.flip()
  49.     SpriteSheet_menu = SpriteSheet('img/opciones_menu.png')
  50.    
  51.     opciones_img={"activo":
  52.                           {
  53.                           "jugar":SpriteSheet_menu.imgat((0,1,100,45),-1),
  54.                           "puntaje":SpriteSheet_menu.imgat((0,45,140,45),-1),
  55.                           "salir":SpriteSheet_menu.imgat((-1,90,70,45),-1)
  56.                           },
  57.                   "desactivo":
  58.                           {
  59.                           "jugar":SpriteSheet_menu.imgat((209,0,100,45),-1),
  60.                           "puntaje":SpriteSheet_menu.imgat((162,45,140,45),-1),
  61.                           "salir":SpriteSheet_menu.imgat((228,90,76,46),-1)
  62.                           }
  63.                   }
  64.     _opcion_elejida=1
  65.     while _bluce_principal:
  66.           for event in pygame.event.get():
  67.               if event.type == QUIT:
  68.                  _bluce_principal=0
  69.                  salir_confirmar()
  70.                  return
  71.           pintar_fondo_default('img/fondo_menu.png')
  72.          
  73.           if pygame.key.get_pressed()[K_w] or pygame.key.get_pressed()[K_UP]:
  74.              if _opcion_elejida == 1:
  75.                 _opcion_elejida=3
  76.              else:
  77.                 _opcion_elejida=_opcion_elejida-1
  78.                
  79.           if pygame.key.get_pressed()[K_s] or pygame.key.get_pressed()[K_DOWN]:
  80.              if _opcion_elejida == 3:
  81.                 _opcion_elejida=1
  82.              else:
  83.                 _opcion_elejida=_opcion_elejida+1
  84.          
  85.           if pygame.key.get_pressed()[K_e] or pygame.key.get_pressed()[K_RETURN]:
  86.              if _opcion_elejida == 3:
  87.                 _bluce_principal=0
  88.                 salir_confirmar()
  89.              if _opcion_elejida == 2:
  90.                 _bluce_principal=0
  91.                 puntajes_mostrar()
  92.              if _opcion_elejida == 1:
  93.                 _bluce_principal=0
  94.                 game_goo()
  95.                 return
  96.          
  97.           if _opcion_elejida == 1:
  98.              screen.blit(opciones_img['activo']['jugar'],(50,210))
  99.              screen.blit(opciones_img['desactivo']['puntaje'],(50,255))
  100.              screen.blit(opciones_img['desactivo']['salir'],(50,300))
  101.           if _opcion_elejida == 2:
  102.              screen.blit(opciones_img['desactivo']['jugar'],(50,210))
  103.              screen.blit(opciones_img['activo']['puntaje'],(50,255))
  104.              screen.blit(opciones_img['desactivo']['salir'],(50,300))
  105.           if _opcion_elejida == 3:
  106.              screen.blit(opciones_img['desactivo']['jugar'],(50,210))
  107.              screen.blit(opciones_img['desactivo']['puntaje'],(50,255))
  108.              screen.blit(opciones_img['activo']['salir'],(50,300))
  109.          # screen.blit(opciones_img['activo']['salir'],(50,155))
  110.           screen.blit(titulo_img, (30,titulo_juego_ir))
  111.           escribir_game('Juego desarrollado por Pato12 - halfmusic.com',15,(255,255,255),0,583)
  112.           pygame.display.flip()
  113.            
  114.          
  115. if __name__ == "__main__":                  
  116.    main_menu_game(True)
  117.    coneccion.commit()
  118.    cursor.close()
  119.    coneccion.close()
Aquí pueden encontrar las imágenes y el juego andando: http://www.mediafire.com/?twtztvgd2t1

Cualquier sugerencia es aceptada..

Gracias
Saludos

EDITO:
Me olvide de decir, que usa pygame y sqlite3 :P
__________________
Half Music - www.halfmusic.com

Última edición por pato12; 20/05/2010 a las 13:07 Razón: aclarar que usa pygame y sqlite3
  #4 (permalink)  
Antiguo 20/05/2010, 13:18
Avatar de dmassive  
Fecha de Ingreso: febrero-2002
Ubicación: Paraná - Entre Ríos - Argentina
Mensajes: 279
Antigüedad: 22 años, 2 meses
Puntos: 7
Respuesta: [APORTE] Un juego

Holaaa, buenisimo, un clasico...

pero ya que lo pides:

Bugs:
- Pues, la pelota rebota siempre en linea recta, y la unica forma de arreglarlo es perder la vida
- El menu, pese a que esta activado el mouse, no puedo hacer click, pero bueno eso no seria problema si no fuera porque con los cursores la opcion a escoger es al azar, es decir, si presiono una vez hacia arriba pues se mueve "n" posiciones y no una, por lo tanto siempre me elige una diferente.


Sugerencia:
Lo mas facil en python es usar sonido... ponle un "beep" aunque sea

Saludos!
__________________
Blümchen... einfach die rave Prinzessin
http://www.dmassive.com.ar/
  #5 (permalink)  
Antiguo 20/05/2010, 17:47
Avatar de pato12  
Fecha de Ingreso: septiembre-2007
Ubicación: Salta
Mensajes: 1.620
Antigüedad: 16 años, 7 meses
Puntos: 101
Respuesta: [APORTE] Un juego

Cita:
Iniciado por dmassive Ver Mensaje
Holaaa, buenisimo, un clasico...

pero ya que lo pides:

Bugs:
- Pues, la pelota rebota siempre en linea recta, y la unica forma de arreglarlo es perder la vida
- El menu, pese a que esta activado el mouse, no puedo hacer click, pero bueno eso no seria problema si no fuera porque con los cursores la opcion a escoger es al azar, es decir, si presiono una vez hacia arriba pues se mueve "n" posiciones y no una, por lo tanto siempre me elige una diferente.


Sugerencia:
Lo mas facil en python es usar sonido... ponle un "beep" aunque sea

Saludos!
Hola,
- Emm.. lo primero no es bug, para que rebote tenes que hacer que la bola rebote en la barra mientras este moviéndose.
- Lo otro.. si se xD.. es que no se como hacer para mas lento, va ahora si se pero no tengo tiempo para cambiarlo ya que es un lió :P ya lo voy a hacer cuando termine la semana de trimestrales que estoy a full estudio .

y lo del sonido, no sabia como tener y no tenia que sonido poner
ya voy a sacar una versión mas rápida (como dije, cuando termine la semana de trimestrales).

Gracias por comentar
Saludos

PD: Es una de mis primeras cosas que programe en python
__________________
Half Music - www.halfmusic.com

Etiquetas: aportes, juegos
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta

SíEste tema le ha gustado a 3 personas




La zona horaria es GMT -6. Ahora son las 10:24.