import os
import sys
import pygame
from pygame import *
def main():
pygame.init()
ecran = pygame.display.set_mode((640, 480))
ruleaza= True
action = "Help!"
while ruleaza is True:
for event in pygame.event.get():
if event.type == QUIT:
ruleaza == False
elif event.type == KEYDOWN:
if event.key == K_ESCAPE:
ruleaza = False
elif event.key == K_LEFT:
action="L"
elif event.key == K_RIGHT:
action="R"
print action
main()
windows,linux, tutorials, tutorial, pygame, ,development,programming,source code,code,example,examples,All with pygame python module. The pygame-catalin is a blog created by Catalin George Festila.
marți, 17 februarie 2009
PyGame : Keyboard on pygame
This is a short example of how to use the keyboard in pygame.
Posted by
Cătălin George Feștilă
Labels:
2009,
pygame,
python,
python module,
source code,
tutorial,
tutorials
luni, 9 februarie 2009
About Pygame python module.
About PYGAME we can find out from web articles and we can get a picture of this python module:
Yet another powerful open source 2D game engine. Pygame is a set of modules allows you to create fully featured games and multimedia programs in the python language. Pygame is portable and runs on every platform and operating system.
Pygame is free. Released under the LGPL license, you can create an open source, free, freeware, shareware, and commercial games with it. See the license for full details.
The Python PyGame module is easy to use in both procedural and object programming.
The installation process is easy:
The Wikipedia page with info about this python module can be found here.
The pypi webpage can be found here.
All documentation can be found on this webpage.
Yet another powerful open source 2D game engine. Pygame is a set of modules allows you to create fully featured games and multimedia programs in the python language. Pygame is portable and runs on every platform and operating system.
Pygame is free. Released under the LGPL license, you can create an open source, free, freeware, shareware, and commercial games with it. See the license for full details.
The Python PyGame module is easy to use in both procedural and object programming.
The installation process is easy:
pip install pygame
The official web page can be found here.The Wikipedia page with info about this python module can be found here.
The pypi webpage can be found here.
All documentation can be found on this webpage.
Posted by
Cătălin George Feștilă
Labels:
2009,
modules,
pygame,
python,
python module,
tutorial,
tutorials
Abonați-vă la:
Postări (Atom)