livewires

AttributeError: 'int' object has no attribute '_erase'

安稳与你 提交于 2020-01-06 09:06:51
问题 I am trying to make a game where you have to avoid objects falling from the sky. I am a beginner programmer (14yrs old) so I make a lot of mistakes. I solve all of them(for this program) but i dont know how to fix this one. The error is in title. Thank you. Full code: from livewires import games, color import random games.init(screen_width = 1280, screen_height = 720, fps = 150) class Covjek(games.Sprite): def update(self): if self.overlapping_sprites: self.destroy() games.screen.quit() self

Python - Livewires console error

我只是一个虾纸丫 提交于 2019-12-29 09:30:09
问题 This is the third time pygame/livewires has led me to this website, and let it be the last! After installing 'Python 3.1.1' for the book, 'Python Programming for the Absolute Beginner', I installed pygame and then livewires. I tested Pygame by entering import pygame And it worked by properly running it. However, when I tested livewires with ' from livewires import games, colors it produced no errors in IDLE, but did produce an error when I properly ran it. The error flicked away so quick I

Livewires + Pygame Error

风流意气都作罢 提交于 2019-12-25 02:11:09
问题 So I am running Windows 8 with python 3.3 installed. I have livewires and pygame installed. But when I run the code: from livewires import games games.init(screen_width = 640, screen_height = 480, fps = 50) games.screen.mainloop() I get an error saying... ImportError: No module name 'pygame.image'. Does anyone know how to fix this? 回答1: Did you install pygame in the file directory of the python interpreter? But anyway pygame is not available for python 3.3 at the moment. If you want to use

Python Programming for the absolute beginner - Livewires is not working

二次信任 提交于 2019-12-11 09:01:05
问题 'Python programming for the absolute beginner' requires you to install it's pygame and special livewires. I have now successfully installed pygame (and tested it by putting in 'install pygame' with no errors) , but when i click the '.bat' file of livewires, it spews out this. C:\Uses\Harry\Downloads\setup.py 'setup.py' is not reconized as an internal or external command, operable program or batch file. C:\Users\Harry\Downloads>pause Press any key to continue . . . What do i do! Please help.

Object not behaving correctly

五迷三道 提交于 2019-12-02 20:47:23
问题 I'm using Livewires and pygame and one of my objects in the game that gives you extra lives is being mistaken as an asteroid object, and when the extra lives objects collides with the player it returns the 'Extra lives object has no attribute handle_caught' error message, so can I please have some help. class Extralives(games.Sprite): global lives image = games.load_image('lives.png', transparent = True) speed = 2 def __init__(self,x,y = 10): """ Initialize a asteroid object. """ super

Object not behaving correctly

泪湿孤枕 提交于 2019-12-02 07:30:50
I'm using Livewires and pygame and one of my objects in the game that gives you extra lives is being mistaken as an asteroid object, and when the extra lives objects collides with the player it returns the 'Extra lives object has no attribute handle_caught' error message, so can I please have some help. class Extralives(games.Sprite): global lives image = games.load_image('lives.png', transparent = True) speed = 2 def __init__(self,x,y = 10): """ Initialize a asteroid object. """ super(Extralives, self).__init__(image = Extralives.image, x = x, y = y, dy = Extralives.speed) def update(self): "

Is there a way that while running pygame, I can also run the console too?

泪湿孤枕 提交于 2019-12-01 21:25:02
问题 I was wondering if there is a way, in python, that while my graphical piece inside my games.screen.mainloop() is running, if I can do something like get user input through raw_input() from the console. 回答1: Yes, have a look at the following example: import pygame import threading import Queue pygame.init() screen = pygame.display.set_mode((300, 300)) quit_game = False commands = Queue.Queue() pos = 10, 10 m = {'w': (0, -10), 'a': (-10, 0), 's': (0, 10), 'd': (10, 0)} class Input(threading