Diapositivas: http://goo.gl/DKJjO




                  Con software libre
                       Carlos Zúñiga

@charlieman
carlos.zun@gmail.com
Por qué Juegos 2d
Por qué Juegos 2d
Y Por qué para Linux
Y Por qué para Linux
Y Por qué para Linux
Y Por qué para Linux
Y Por qué para Linux
Y Por qué para Linux
Y Por qué para Linux
Y Por qué para Linux
Y Por qué para Linux
Y Por qué para Linux
Por que usar
        herramientas libres

No hay costos altos
No están controlados por los fabricantes
Multi-plataforma
Licencias sin restricciones (LGPL, BSD, MIT)
Actualizaciones continuas
herramientas

         http://pygame.org/
herramientas
https://love2d.org/




http://stabyourself.net/mari0/
herramientas
             http://sfml-dev.org/




  http://www.marsshooter.org/
herramientas

http://code.google.com/p/playn/
herramientas




http://chrome.angrybirds.com/
herramientas
Box2D
  http://box2d.org/




Chipmunk
 http://code.google.com/p/chipmunk-physics/
+ herramientas
Python
  Pyglet http://pyglet.org/
  Cocos2d http://cocos2d.org/
C#
  Tao Framework
    http://sourceforge.net/projects/taoframework/
C++
  Clanlib http://clanlib.org/
  Allegro http://alleg.sourceforge.net/
+ herramientas
Gráficos 2d
  Inkscape (vectores) http://inkscape.org/
  Gimp (bitmaps) http://gimp.org/
Gráficos 3d
  Blender http://www.blender.org/
  Makehuman http://makehuman.org/
Audio
  Audacity http://audacity.sourceforge.net/
  Sfrx http://www.drpetter.se/project_sfxr.html
Un juego con PySFML

Pueden encontrar el código en:

https://github.com/charlieman/ejemplo-pysfml
Un juego con PySFML
from PySFML import sf

window = sf.RenderWindow(sf.VideoMode(640, 480),
                         "Ejemplo 01")

while True:
    window.Clear()
    window.Display()




                                                   ej01.py
Un juego con PySFML
from PySFML import sf

window = sf.RenderWindow(sf.VideoMode(640, 480),
                         "Ejemplo 02")
event = sf.Event()
running = True

while running:
    while window.GetEvent(event):
        if event.Type == sf.Event.Closed:
            running = False

    window.Clear()
    window.Display()
                                                   ej02.py
Un juego con PySFML
from PySFML import sf
window = sf.RenderWindow(sf.VideoMode(640, 480),
                         "Ejemplo 03")
event = sf.Event()
text = sf.String("Hola Flisol")
running = True

while running:
    while window.GetEvent(event):
        if event.Type == sf.Event.Closed:
            running = False

    window.Clear()
    window.Draw(text)
    window.Display()                               ej03.py
Un juego con PySFML
text = sf.String("Hola Flisol")
text.SetSize(50)
rect = text.GetRect()
text.SetCenter(rect.GetWidth()/2,
                  rect.GetHeight()/2)
text.SetPosition(320, 240)
#...
while running:
     while window.GetEvent(event):
         #...
         elif event.Type == sf.Event.KeyPressed:
              if event.Key.Code == sf.Key.Left:
                  text.Move(-5, 0)
              if event.Key.Code == sf.Key.Right:
                  text.Move(5, 0)                  ej04.py
Un juego con PySFML
#...
while running:
     while window.GetEvent(event):
         if event.Type == sf.Event.Closed:
             running = False

    inpt = window.GetInput()
    if inpt.IsKeyDown(sf.Key.Left):
        text.Move(-velocity * window.GetFrameTime(), 0)

    if inpt.IsKeyDown(sf.Key.Right):
        text.Move(velocity * window.GetFrameTime(), 0)


                                                 ej05.py
Un juego con PySFML
ship_image = sf.Image()
ship_image.LoadFromFile("ship.png")
ship = sf.Sprite(ship_image)
ship.SetPosition(320, 400)
velocity = 100
#...
while running:
     #...
     inpt = window.GetInput()
     if inpt.IsKeyDown(sf.Key.Left):
          ship.Move(-velocity * window.GetFrameTime(), 0)

    if inpt.IsKeyDown(sf.Key.Right):
        ship.Move(velocity * window.GetFrameTime(), 0)
                                                 ej06.py
Un juego con PySFML
class Ship(object):
    def __init__(self, x, y):
        self.image = sf.Image()
        self.image.LoadFromFile("ship.png")
        self.sprite = sf.Sprite(self.image)
        self.sprite.SetPosition(x, y)
        self.velocity = 100
   def update(self, input_, delta):
       if input_.IsKeyDown(sf.Key.Left):
           self.sprite.Move(-self.velocity * delta, 0)
       if input_.IsKeyDown(sf.Key.Right):
           self.sprite.Move(self.velocity * delta, 0)
   def draw(self, window):
       window.Draw(self.sprite)                 ej07.py
Un juego con PySFML
ship = Ship(320, 400)

#...
while running:
     while window.GetEvent(event):
         if event.Type == sf.Event.Closed:
             running = False

    input_ = window.GetInput()
    ship.update(input_, window.GetFrameTime())

    window.Clear()
    ship.draw(window)
    window.Display()
                                             ej07.py
Un juego con PySFML
class Sprite(object):
    def __init__(self, image, x, y):
        self.image = sf.Image()
        self.image.LoadFromFile(image)
        self.sprite = sf.Sprite(self.image)
        self.sprite.SetPosition(x, y)

    def draw(self, window):
        window.Draw(self.sprite)

class Ship(Sprite):
    def __init__(self, x, y):
         super(Ship, self).__init__("ship.png", x, y)
         self.velocity = 150
    #...                                          ej08.py
Un juego con PySFML
class Invader(Sprite):
    def __init__(self, x, y):
        super(Invader, self).__init__("alien.png", x, y)
        self.x_velocity = 100
        self.y_velocity = 10
        self.going_right = True
        self.going_down = False
        self.initial_x = x
        self.y_distance = 0
        self.sprite.SetColor(sf.Color.Green)
        self.count = 0

    def update(self, delta):
        #...
                                                 ej08.py
Un juego con PySFML
def update(self, delta):
    x_pos, y_pos = self.sprite.GetPosition()
    x, y = 0, 0


   if not self.going_down:
       if x_pos > self.initial_x + 50 or 
       x_pos < self.initial_x - 50:
           self.going_right = not self.going_right
           self.count = (self.count +1) % 5


   x = self.x_velocity * (self.going_right * 2 -1) * delta


   if self.count == 4:
       self.going_down = True


   if self.going_down:
       y = self.y_velocity * delta
       self.y_distance += y
       if self.y_distance > 3:
           self.going_down = False
           self.y_distance = 0


   self.sprite.Move(x, y)                                    ej08.py
Un juego con PySFML
aliens = []
for i in range(8):
     for j in range(4):
       aliens.append(Invader(100 + i*50, 30 + j*50))
#...
while running:
     #...
     input_ = window.GetInput()
     delta = window.GetFrameTime()
     ship.update(input_, delta)
     for alien in aliens: alien.update(delta)

    window.Clear()
    for alien in aliens: alien.draw(window)
    window.Display()                          ej08.py
Un juego con PySFML
class Sprite(object):
    #...
    def get_rect(self):
         x, y = self.sprite.GetPosition()
         return sf.FloatRect(x - self.width/2,
                             y - self.height/2,
                             x + self.width/2,
                             y + self.height/2)

    #...
    def die(self):
         self.dead = True


                                                  ej09.py
Un juego con PySFML
class Bullet(Sprite):
    def __init__(self, ship):
        x, y = ship.sprite.GetPosition()
        super(Bullet, self).__init__("bullet.png", x, y)
        self.velocity = -300

    def update(self, aliens, delta):
        self.sprite.Move(0, self.velocity * delta)
        rect = self.get_rect()
        for alien in aliens:
            if rect.Intersects(alien.get_rect()):
                alien.die()
                self.die()

                                                 ej09.py
Un juego con PySFML
bullets = []
#...
while running:
     while window.GetEvent(event):
         if event.Type == sf.Event.Closed:
             running = False
         elif event.Type == sf.Event.KeyPressed and 
            event.Key.Code == sf.Key.Space:
            bullets.append(Bullet(ship))

    for alien in aliens:
        alien.update(delta)
    aliens = filter(lambda x: not x.dead, aliens)

                                              ej09.py
Un juego con PySFML
#...
while running:
     #...
     for bullet in bullets:
          bullet.update(aliens, delta)
     bullets = filter(lambda x: not x.dead, bullets)

    window.Clear()
    ship.draw(window)
    for alien in aliens:
        alien.draw(window)
    for bullet in bullets:
        bullet.draw(window)
    window.Display()
                                              ej09.py
Un juego con PySFML
class Ship(Sprite):
    def __init__(self, x, y):
        #...
        self.score = 0
        self.bullet_rest = sf.Clock()

    #...
    def score_up(self, points):
         self.score += points




                                        ej10.py
Un juego con PySFML
class Bullet(Sprite):
    #...

    def update(self, aliens, ship, delta):
        self.sprite.Move(0, self.velocity * delta)
        rect = self.get_rect()

        for alien in aliens:
            if rect.Intersects(alien.get_rect()):
                alien.die()
                self.die()
                ship.score_up(10)


                                                    ej10.py
Un juego con PySFML
score = sf.String("Score: ")
score.SetSize(30)
score.SetPosition(5, 5)
#...
while running:
  while window.GetEvent(event):
     if event.Type == sf.Event.Closed:
         running = False
     elif event.Type == sf.Event.KeyPressed and 
          event.Key.Code == sf.Key.Space:
         if ship.bullet_rest.GetElapsedTime() > 0.5:
                 bullets.append(Bullet(ship))
                 ship.bullet_rest.Reset()

                                              ej10.py
Un juego con PySFML
score = sf.String("Score: ")
score.SetSize(30)
score.SetPosition(5, 5)
#...
while running:
  while window.GetEvent(event):
     if event.Type == sf.Event.Closed:
         running = False
     elif event.Type == sf.Event.KeyPressed and 
          event.Key.Code == sf.Key.Space:
         if ship.bullet_rest.GetElapsedTime() > 0.5:
                 bullets.append(Bullet(ship))
                 ship.bullet_rest.Reset()

                                              ej10.py
Un juego con PySFML
#...
while running:
     #...
     score.SetText("Score: %d" % ship.score)

    window.Clear()
    ship.draw(window)
    for alien in aliens:
        alien.draw(window)
    for bullet in bullets:
        bullet.draw(window)
    window.Draw(score)
    window.Display()

                                               ej10.py
Un juego con PySFML
class Invader(Sprite):
    #...
    def update(self, ship, delta):
         #...
         if self.get_rect().Intersects(ship.get_rect()):
              ship.die()
              self.die()

class Bullet(Sprite):
    #...
    def update(self, aliens, ship, delta):
         #...
         if rect.Intersects(ship.get_rect()):
              ship.die()
              self.die()                          ej11.py
Un juego con PySFML
while running:
  #...
  for alien in aliens:
       alien.update(ship, delta)
       if alien.bullet_rest.GetElapsedTime() > 5 
           and random() < 0.001:
             bullets.append(Bullet(alien, False))
    aliens = filter(lambda x: not x.dead, aliens)
  #...




                                              ej11.py
Un juego con PySFML
while running:
    #...
    if not aliens:
         print "Ganaste!"
         print "Tu puntaje es de: %s" % ship.score
         running = False

    if ship.dead:
         print "Fin del juego"
         print "Tu puntaje es de: %s" % ship.score
         running = False
    #...


                                              ej11.py
Concursos
http://pyweek.org/




El siguiente inicia la próxima semana
  (06/05/2012)
Concursos
      http://ludumdare.com/
Concursos
http://lpc.opengameart.org/
Concursos
http://latam.square-enix.com/
Gracias




¿Preguntas?

Desarrollo de videojuegos con software libre

  • 1.
  • 2.
  • 3.
  • 4.
    Y Por quépara Linux
  • 5.
    Y Por quépara Linux
  • 6.
    Y Por quépara Linux
  • 7.
    Y Por quépara Linux
  • 8.
    Y Por quépara Linux
  • 9.
    Y Por quépara Linux
  • 10.
    Y Por quépara Linux
  • 11.
    Y Por quépara Linux
  • 12.
    Y Por quépara Linux
  • 13.
    Y Por quépara Linux
  • 14.
    Por que usar herramientas libres No hay costos altos No están controlados por los fabricantes Multi-plataforma Licencias sin restricciones (LGPL, BSD, MIT) Actualizaciones continuas
  • 15.
    herramientas http://pygame.org/
  • 16.
  • 17.
    herramientas http://sfml-dev.org/ http://www.marsshooter.org/
  • 18.
  • 19.
  • 20.
    herramientas Box2D http://box2d.org/ Chipmunk http://code.google.com/p/chipmunk-physics/
  • 21.
    + herramientas Python Pyglet http://pyglet.org/ Cocos2d http://cocos2d.org/ C# Tao Framework http://sourceforge.net/projects/taoframework/ C++ Clanlib http://clanlib.org/ Allegro http://alleg.sourceforge.net/
  • 22.
    + herramientas Gráficos 2d Inkscape (vectores) http://inkscape.org/ Gimp (bitmaps) http://gimp.org/ Gráficos 3d Blender http://www.blender.org/ Makehuman http://makehuman.org/ Audio Audacity http://audacity.sourceforge.net/ Sfrx http://www.drpetter.se/project_sfxr.html
  • 23.
    Un juego conPySFML Pueden encontrar el código en: https://github.com/charlieman/ejemplo-pysfml
  • 24.
    Un juego conPySFML from PySFML import sf window = sf.RenderWindow(sf.VideoMode(640, 480), "Ejemplo 01") while True: window.Clear() window.Display() ej01.py
  • 25.
    Un juego conPySFML from PySFML import sf window = sf.RenderWindow(sf.VideoMode(640, 480), "Ejemplo 02") event = sf.Event() running = True while running: while window.GetEvent(event): if event.Type == sf.Event.Closed: running = False window.Clear() window.Display() ej02.py
  • 26.
    Un juego conPySFML from PySFML import sf window = sf.RenderWindow(sf.VideoMode(640, 480), "Ejemplo 03") event = sf.Event() text = sf.String("Hola Flisol") running = True while running: while window.GetEvent(event): if event.Type == sf.Event.Closed: running = False window.Clear() window.Draw(text) window.Display() ej03.py
  • 27.
    Un juego conPySFML text = sf.String("Hola Flisol") text.SetSize(50) rect = text.GetRect() text.SetCenter(rect.GetWidth()/2, rect.GetHeight()/2) text.SetPosition(320, 240) #... while running: while window.GetEvent(event): #... elif event.Type == sf.Event.KeyPressed: if event.Key.Code == sf.Key.Left: text.Move(-5, 0) if event.Key.Code == sf.Key.Right: text.Move(5, 0) ej04.py
  • 28.
    Un juego conPySFML #... while running: while window.GetEvent(event): if event.Type == sf.Event.Closed: running = False inpt = window.GetInput() if inpt.IsKeyDown(sf.Key.Left): text.Move(-velocity * window.GetFrameTime(), 0) if inpt.IsKeyDown(sf.Key.Right): text.Move(velocity * window.GetFrameTime(), 0) ej05.py
  • 29.
    Un juego conPySFML ship_image = sf.Image() ship_image.LoadFromFile("ship.png") ship = sf.Sprite(ship_image) ship.SetPosition(320, 400) velocity = 100 #... while running: #... inpt = window.GetInput() if inpt.IsKeyDown(sf.Key.Left): ship.Move(-velocity * window.GetFrameTime(), 0) if inpt.IsKeyDown(sf.Key.Right): ship.Move(velocity * window.GetFrameTime(), 0) ej06.py
  • 30.
    Un juego conPySFML class Ship(object): def __init__(self, x, y): self.image = sf.Image() self.image.LoadFromFile("ship.png") self.sprite = sf.Sprite(self.image) self.sprite.SetPosition(x, y) self.velocity = 100 def update(self, input_, delta): if input_.IsKeyDown(sf.Key.Left): self.sprite.Move(-self.velocity * delta, 0) if input_.IsKeyDown(sf.Key.Right): self.sprite.Move(self.velocity * delta, 0) def draw(self, window): window.Draw(self.sprite) ej07.py
  • 31.
    Un juego conPySFML ship = Ship(320, 400) #... while running: while window.GetEvent(event): if event.Type == sf.Event.Closed: running = False input_ = window.GetInput() ship.update(input_, window.GetFrameTime()) window.Clear() ship.draw(window) window.Display() ej07.py
  • 32.
    Un juego conPySFML class Sprite(object): def __init__(self, image, x, y): self.image = sf.Image() self.image.LoadFromFile(image) self.sprite = sf.Sprite(self.image) self.sprite.SetPosition(x, y) def draw(self, window): window.Draw(self.sprite) class Ship(Sprite): def __init__(self, x, y): super(Ship, self).__init__("ship.png", x, y) self.velocity = 150 #... ej08.py
  • 33.
    Un juego conPySFML class Invader(Sprite): def __init__(self, x, y): super(Invader, self).__init__("alien.png", x, y) self.x_velocity = 100 self.y_velocity = 10 self.going_right = True self.going_down = False self.initial_x = x self.y_distance = 0 self.sprite.SetColor(sf.Color.Green) self.count = 0 def update(self, delta): #... ej08.py
  • 34.
    Un juego conPySFML def update(self, delta): x_pos, y_pos = self.sprite.GetPosition() x, y = 0, 0 if not self.going_down: if x_pos > self.initial_x + 50 or x_pos < self.initial_x - 50: self.going_right = not self.going_right self.count = (self.count +1) % 5 x = self.x_velocity * (self.going_right * 2 -1) * delta if self.count == 4: self.going_down = True if self.going_down: y = self.y_velocity * delta self.y_distance += y if self.y_distance > 3: self.going_down = False self.y_distance = 0 self.sprite.Move(x, y) ej08.py
  • 35.
    Un juego conPySFML aliens = [] for i in range(8): for j in range(4): aliens.append(Invader(100 + i*50, 30 + j*50)) #... while running: #... input_ = window.GetInput() delta = window.GetFrameTime() ship.update(input_, delta) for alien in aliens: alien.update(delta) window.Clear() for alien in aliens: alien.draw(window) window.Display() ej08.py
  • 36.
    Un juego conPySFML class Sprite(object): #... def get_rect(self): x, y = self.sprite.GetPosition() return sf.FloatRect(x - self.width/2, y - self.height/2, x + self.width/2, y + self.height/2) #... def die(self): self.dead = True ej09.py
  • 37.
    Un juego conPySFML class Bullet(Sprite): def __init__(self, ship): x, y = ship.sprite.GetPosition() super(Bullet, self).__init__("bullet.png", x, y) self.velocity = -300 def update(self, aliens, delta): self.sprite.Move(0, self.velocity * delta) rect = self.get_rect() for alien in aliens: if rect.Intersects(alien.get_rect()): alien.die() self.die() ej09.py
  • 38.
    Un juego conPySFML bullets = [] #... while running: while window.GetEvent(event): if event.Type == sf.Event.Closed: running = False elif event.Type == sf.Event.KeyPressed and event.Key.Code == sf.Key.Space: bullets.append(Bullet(ship)) for alien in aliens: alien.update(delta) aliens = filter(lambda x: not x.dead, aliens) ej09.py
  • 39.
    Un juego conPySFML #... while running: #... for bullet in bullets: bullet.update(aliens, delta) bullets = filter(lambda x: not x.dead, bullets) window.Clear() ship.draw(window) for alien in aliens: alien.draw(window) for bullet in bullets: bullet.draw(window) window.Display() ej09.py
  • 40.
    Un juego conPySFML class Ship(Sprite): def __init__(self, x, y): #... self.score = 0 self.bullet_rest = sf.Clock() #... def score_up(self, points): self.score += points ej10.py
  • 41.
    Un juego conPySFML class Bullet(Sprite): #... def update(self, aliens, ship, delta): self.sprite.Move(0, self.velocity * delta) rect = self.get_rect() for alien in aliens: if rect.Intersects(alien.get_rect()): alien.die() self.die() ship.score_up(10) ej10.py
  • 42.
    Un juego conPySFML score = sf.String("Score: ") score.SetSize(30) score.SetPosition(5, 5) #... while running: while window.GetEvent(event): if event.Type == sf.Event.Closed: running = False elif event.Type == sf.Event.KeyPressed and event.Key.Code == sf.Key.Space: if ship.bullet_rest.GetElapsedTime() > 0.5: bullets.append(Bullet(ship)) ship.bullet_rest.Reset() ej10.py
  • 43.
    Un juego conPySFML score = sf.String("Score: ") score.SetSize(30) score.SetPosition(5, 5) #... while running: while window.GetEvent(event): if event.Type == sf.Event.Closed: running = False elif event.Type == sf.Event.KeyPressed and event.Key.Code == sf.Key.Space: if ship.bullet_rest.GetElapsedTime() > 0.5: bullets.append(Bullet(ship)) ship.bullet_rest.Reset() ej10.py
  • 44.
    Un juego conPySFML #... while running: #... score.SetText("Score: %d" % ship.score) window.Clear() ship.draw(window) for alien in aliens: alien.draw(window) for bullet in bullets: bullet.draw(window) window.Draw(score) window.Display() ej10.py
  • 45.
    Un juego conPySFML class Invader(Sprite): #... def update(self, ship, delta): #... if self.get_rect().Intersects(ship.get_rect()): ship.die() self.die() class Bullet(Sprite): #... def update(self, aliens, ship, delta): #... if rect.Intersects(ship.get_rect()): ship.die() self.die() ej11.py
  • 46.
    Un juego conPySFML while running: #... for alien in aliens: alien.update(ship, delta) if alien.bullet_rest.GetElapsedTime() > 5 and random() < 0.001: bullets.append(Bullet(alien, False)) aliens = filter(lambda x: not x.dead, aliens) #... ej11.py
  • 47.
    Un juego conPySFML while running: #... if not aliens: print "Ganaste!" print "Tu puntaje es de: %s" % ship.score running = False if ship.dead: print "Fin del juego" print "Tu puntaje es de: %s" % ship.score running = False #... ej11.py
  • 48.
  • 49.
    Concursos http://ludumdare.com/
  • 50.
  • 51.
  • 52.

Notas del editor

  • #3 Es un buen momento para juegos 2D Smartphones y tablets HTML5 Kickstarter Plataformas de distribución digital Gameolith Desura Ubuntu Software Center Steam Smartphones y Tablets
  • #4 Todos los navegadores recientes soportan Canvas y/o WebGL
  • #5 Kickstarter, un sitio de crowd funding para proyectos creativos Lista de juegos con soporte para Linux: Aura Tactics Bacillus Double Fine Adventure Ensign 1 FTL: Faster Than Light The Banner Saga Wasteland 2
  • #6 Indiegogo, como Kickstarter pero internacional
  • #7 Sitio de distribución digital de juegos Enfocado solamente a Linux Iniciado el 2011
  • #8 Sitio de distribución digital de juegos Iniciado en 2009 Enfocado a Windows, MacOs y Linux Alrededor de 150 juegos para Linux
  • #9 Software Center de Ubuntu
  • #10 Acaban de anunciar la versión de STEAM para Linux. Alrededor de 90 juegos en Steam ya cuentan con cliente nativo en Linux. Valve esta portando Source Engine con el juego Left 4 Dead 2.
  • #11 Humble Bundle Venta de juegos para las 3 plataformas al precio que el cliente quiera pagar
  • #13 Proporción de usuarios de Linux similar a la de MacOS
  • #14 Usuarios de linux pagán un promedio más elevado por los juegos
  • #15 Por qué utilizar herramientas libres para hacer juegos
  • #16 El más conocido de las bibliotecas de juegos para Python Utiliza SDL En su sección de Proyectos hay más de 400 juegos con código fuente para descargar
  • #17 Motor 2D desarrollado en C++, utiliza LUA como lenguaje de scripting Utiliza OpenGL
  • #18 SFML Desarrollado en C++ Bindings para muchos lenguajes
  • #19 PlayN, framework desarrollado por gente de Google. Permite exportar el juego a 4 plataformas: Html5 Flash Android IOS (beta) Desktop con Java Utiliza WebGL o Canvas según el soporte del navegador
  • #20 El port de AngryBirds para HTML5 tomo una semana
  • #21 Bibliotecas para física Box2D utilizado por Angry Birds
  • #25 Código mínimo necesario para usar SFML Corre sobre un bucle infinito, el main loop Solo muestra una ventana que no responde a nada Hay que matar el proceso para cerrarla
  • #26 Le añadimos un recolector de eventos para poder cerrar la ventana y salir de la aplicación
  • #27 Y ahora vemos como añadir texto con un sf.String
  • #28 Podemos ver que el texto se puede modificar en tamaño y posición También añadimos código para mover el texto pero vemos que su movimiento es algo errático
  • #29 Cambiamos el sistema de eventos de teclado. En lugar de esperar que el usuario presione una tecla, chequeamos si la tecla está presionada. Esto nos da un movimiento más fluido
  • #30 Ahora vamos a utilizar una imagen en lugar de un texto. La manera de manipularla es similar
  • #31 El código dentro del bucle se está volviendo algo complejo, así que utilizamos orientación a objetos para separarlo. El manejo del juego no ha cambiado nada.
  • #32 Y ahora nuestro bucle queda más corto y entendible
  • #33 Ahora vamos a crear más objetos, como todos los personajes tienen partes similares, las colocamos en una clase padre de donde hereda nuestra nave
  • #34 Y creamos así nuestra clase Invader que también heredará de Sprite
  • #35 Este es el código para actualizar al Invader, básicamente hace que se mueva de lado a lado y baje cada cierto tiempo
  • #36 Luego añadimos una cantidad de Invaders a nuestro juego y los actualizamos y dibujamos en nuestro bucle principal
  • #37 Vamos a añadir las balas, y para eso necesitamos detectar colisiones entre objetos. El método get_rect creará un objeto sf.FloatRect que podemos usar luego para detectar Intersecciones con otros FloatRects o Colisiones con puntos específicos
  • #38 Añadimos la clase bullet. Su método update es más simple que el de los Invaders, solamente se mueve hacia arriba y luego chequea si ha tocado a algun Invader
  • #39 Luego lo añadimos al bucle principal de la misma manera que hicimos con los Invaders. Chequeamos el evento de presionar la Barra Espaciadora y creamos una nueva bala. Luego chequeamos los Invaders y quitamos los que estan muertos
  • #40 Continuando en el bucle principal, actualizamos las balas y chequeamos si alguna ha muerto
  • #41 Ya que podemos matar Invaders, vamos a añadir el puntaje También vamos a limitar el número de balas que podemos lanzar por segundo
  • #42 Modificamos la clase Bullet para que añada puntos a la nave cuando mate a un Invader
  • #43 Luego creamos el objeto score que es un sf.String También chequeamos que no haya lanzado una bala desde hace 0.5 segundos para permitir lanzar otra
  • #44 Luego creamos el objeto score que es un sf.String También chequeamos que no haya lanzado una bala desde hace 0.5 segundos para permitir lanzar otra
  • #45 Luego simplemente cambiamos el texto y lo mostramos
  • #46 También chequeamos si la bala o el Invader se chocan con la nave y si lo hacen los matamos
  • #47 Añadimos el código para que los Invaders también puedan disparar, cada uno podrá disparar después de 5 segundos y con una probabilidad de 0.1%
  • #48 Finalmente chequeamos si ya no hay aliens para determinar que el usuario a ganado o si la nave ha muerto para determinar que ha perdido
  • #49 Individual o por equipos 1 semana Juegos hechos en Python Juegos en torno a un tema
  • #50 Individual 48 horas Cualquier biblioteca es permitida Cada 4 meses Juegos en torno a un tema
  • #51 Concurso de opengameart.org Primero concurso de gráficos Segundo concurso de juegos utilizando esos gráficos Juegos estilo RPG
  • #52 Concurso de Square Enix Buscan gente para trabajar con ellos Innovación en video juegos Juegos para Smartphones y navegador web