[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] very easy snippets to start: where from i can get?



> 20 PRINT "I think you should read some of the python oo tutorials?"

well, up to now i found nothing i could really understand....

thanks about the code you sent - it shows a flashing red and black
background in a 320x200 window - flashing i think because missing a
kind of 'waitvbl' (like from sdlBasic, to syncronize the code with the
display frequence)





On Fri, Jul 25, 2008 at 1:31 PM, René Dudfield <renesd@xxxxxxxxx> wrote:
> hi,
>
> 10 READ Tutorial$
> 20 PRINT "I think you should read some of the python oo tutorials?"
> 30 GOTO 10
>
> Here's a little mostly non oo example(untested).
>
>
>
> import pygame
> from pygame.locals import *
>
> pygame.init()
> screen = pygame.display.set_mode((320,200))
>
> r,g,b = (0,0,0)
>
> going = True
> while going:
>    events = pygame.event.get()
>    for e in events:
>        if e.type == QUIT:
>            going = False
>
>    screen.fill((r,g,b))
>    pygame.display.flip()
>    r = r + 1
>    if r > 255:
>        r = 0
>
>
>
>
> On Fri, Jul 25, 2008 at 10:14 PM, Paulo Silva <nitrofurano@xxxxxxxxx> wrote:
>> thanks, but it looks confusing for me, too messy for me... (sorry
>> saying this, but i got really lost with this url...) - it's a bit
>> object oriented (and i know nothing about it), and the code is
>> splitted between comments i don't know what to have in a complete code
>>
>> -----
>>
>>
>>
>> On Fri, Jul 25, 2008 at 12:56 PM, René Dudfield <renesd@xxxxxxxxx> wrote:
>>> hey,
>>>
>>> this tutorial kind of covers the basics of python with pygame...
>>> http://rene.f0o.com/mywiki/PythonGameProgramming
>>>
>>>
>>> cu,
>>>
>>>
>>> On Fri, Jul 25, 2008 at 9:12 PM, Paulo Silva <nitrofurano@xxxxxxxxx> wrote:
>>>> thanks about the urls - btw, i'm stuck on starting, anyway... - the
>>>> programs are the links to the zipped files at the top of the webpage.
>>>>
>>>> Maybe a good idea is, for example, i posting some or another snippet
>>>> (very small stuff in sdlBasic) at pastebin.org and asking you how does
>>>> it can be coded on python-pygame?
>>>>
>>>> my coding style (if it can be named as this) is deeply based on
>>>> hobbystic ansi-basic from 80's - i'm a bit unknown of definitions, but
>>>> maybe it's procedural (i can't find definition from google)?
>>>>
>>>> is oop object-oriented programing, using classes, methods, etc.? i
>>>> still know nothing about them, and having completelly no idea how to
>>>> start using them...
>>>>
>>>> well, please take a look at my code and help me defining which style
>>>> are them - they may look very amateur for academic and professional
>>>> coders, but i were using them for my personal needs, and were working
>>>> fine for me up to now...
>>>>
>>>> thanks!
>>>> Paulo
>>>>
>>>> --------------------------------------
>>>>
>>>>
>>>>
>>>>
>>>> ------------
>>>> On Fri, Jul 25, 2008 at 11:54 AM, Jake b <ninmonkeys@xxxxxxxxx> wrote:
>>>>> If you have a specific problem you're stuck on, or a program you're trying
>>>>> to re-create in pythin, it'd be easier to give you more help.
>>>>>
>>>>> [ I looked at your site, but didn't see a program. It's hard to read for me
>>>>> on ff3 win32. ]
>>>>>
>>>>> A few links to get you started
>>>>>
>>>>> http://kai.vm.bytemark.co.uk/~piman/writing/sprite-tutorial.shtml
>>>>> http://www.pygame.org/wiki/tutorials
>>>>> http://www.libsdl.org/tutorials.php
>>>>> http://www.pygame.org/docs/ref/index.html [you're best friend]
>>>>> There's also NeHe tutorials if you want to get started into pygame+OpenGL.
>>>>>
>>>>> What coding style were you used to? What are you seeing? Procedural vs OOP
>>>>> or something else?
>>>>>
>>>>> --
>>>>> Jake
>>>>>
>>>>
>>>
>>
>