Displaying An Amount Of Objects On To The Screen
I am following this tutorial: http://www.raywenderlich.com/24252/beginning-game-programming-for-teens-with-python#comments And I am trying to reduce the amount of badgers drawn to
Solution 1:
This line
badguys.append([640, random.randint(50,430)])
is appending a single bad guy, with position (640, y), where y is a random position between 50 and 430. 640 is referred to as "left" in the code, and y is referred to as "top" in the code. If you want them to appear on top, you presumably want
badguys.append([random.randint(50,610), 480])
although you might also try
badguys.append([random.randint(50,610), 0])
You'll have to make the bad guys move down instead of to the right. You want to change this line
badguy[0]-=7
to
badguy[1] -= 7
If you want fewer bad guys, make badtimer larger, or decrease it more slowly.
Post a Comment for "Displaying An Amount Of Objects On To The Screen"