TeachMeEverything
TeachMeEverything

Reputation: 158

Pysdl2 stuck in tutorial

I have been doing this tutorial http://pysdl2.readthedocs.org/en/latest/tutorial/pong.html and i am stuck in the create world part of the tutorial (I would appreciate if anyone can wrap it up or give me the source code to the tutorial as i seem to not understand its airplanes properly, I would appreciate the source code if possible because it will help me understand the whole thing and not have to come back for every step i get stuck in )

Here is what i wrote so far from what i got in adding game world part:

(here is a picture of the code because the code sample thing didnt work correctly) enter image description here and here is my error

Traceback (most recent call last):

File "C:/path/file.py", line 50, in

sys.exit(run())

File "C:/path/file.py", line 30, in run

spriterenderer = SoftwareRenderer(window)

NameError: name 'window' is not defined

I would appreciate any help and if possible the source for this tutorial

Upvotes: 1

Views: 698

Answers (1)

user3657941
user3657941

Reputation:

The source for the tutorial will be in the examples directory for your PySDL2 installation. For me, it was in

/usr/local/lib/python2.7/site-packages/sdl2/examples/pong.py

Trying to recreate the example by following the instructions is very difficult. For those who want to look at the finished tutorial without installing PySDL2, here is a link to the source

Upvotes: 3

Related Questions