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

Re: [pygame] mystery examples in pygame tutorial



Charles and Ian,

Thanks very much for yr help. Indeed, I would have googled on the
problem before putting it here, but it never occurred to me that I
would get hits for so specific a question. I'm glad to be part of a
community where lots of help is available for beginners. Hopefully
I'll soon be able to be a giver here as well as a taker.

Regards,

Tom

-- 
Faced with the possibility of its extinction, every species finds
within itself powers unimaginable in the days of its complacency.




On 6/16/15, Charles Cossà <ccossegmail.com> wrote:
> http://stackoverflow.com/questions/27644384/unable-to-use-create-graphics-screen-in-pygame
>
> On Tue, Jun 16, 2015 at 2:19 PM, tom arnall <kloro2006@xxxxxxxxx> wrote:
>
>> Greetings fellow pygame-istas,
>>
>> I'm having a problem working through an example in the tutorial:
>>
>> Help! How Do I Move An Image?
>>
>> At:
>>
>> http://www.pygame.org/docs/tut/MoveIt.html
>>
>> in the section headed:
>>
>> Going From The List To The Screen
>>
>> there is this example:
>>
>> >>> background = [terrain1, terrain1, terrain2, terrain2,
>> terrain2, terrain1]
>> >>> screen = creategraphicsscreen()
>> >>> for I in range(6):
>> ... screen.blitbackgroundi], (i*10, 0))
>> >>> playerpos = 3
>> >>> screen.blitplayerimage, (playerpos*10, 0))
>>
>>
>>
>> In the line:
>>
>> >>> screen = creategraphicsscreen()
>>
>> I can find no def for:
>>
>> creategraphicsscreen()
>>
>> Predictably the line gets:
>>
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> NameError: name 'creategraphicsscreen' is not defined
>>
>> I've studied the foregoing sections for a clue, but can find none.
>>
>> Thanks in advance for any help you can give me,
>>
>> Tom Arnall
>>
>