Questions tagged [livewires]

LiveWires is a Python package designed to be used as part of the "LiveWires" programming course, a course intended to teach Python to young, first-time programmers. LiveWires might also refer to the course itself.

LiveWires is a Python package designed to be used as part of the "LiveWires" programming course, a course intended to teach Python to young, first-time programmers. It is built on top of and .

The LiveWires package is licensed under the

160 questions
0
votes
1 answer

How to fix TypeError: unbound method must be called with Dropper instance as first argument

I am writing a game where a rock falls down and you use the mouse to have your chef not get crushed. When the rock falls off the screen, two additional rocks spawn and fall. This continues until your character gets smooshed. However I got the…
Josh
  • 3
  • 2
0
votes
1 answer

I'm making a Pong game using Pygame through livewires and I can't get the collision detection to work propery

Working on a pong game while I am reading the Python Programming for the beginner book and I am lost as to what I am missing in this game's code. Everything in the game works except for whenever the ball overlaps the board sprite it doesn't detect…
0
votes
0 answers

NameError: name 'mouse' is not defined - Python 2.7.8 & Livewires

I am constantly getting these errors such as: NameError: name 'mouse' is not defined or NameError: name 'screen' is not defined, etc. Here is my full error message in the Python shell: 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) [GCC…
0
votes
1 answer

How many answers?

So,again I'm making a tables (math tables) checker to check your answers. I've used the search but nothing I found is relevant. def math(): for f in range (3): right=0 wrong=0 x=10 c=5 p=x*c print…
0
votes
2 answers

Livewires + Pygame Error

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…
tazeunite00
  • 71
  • 1
  • 1
  • 2
0
votes
1 answer

Printing out high scores in a list

So in my menu for my game I want to be able to print out the high scores from a .txt file line by line, but with my current code it just adds all the scores to one line could someone please help?, I am using Livewires and Pygame. def…
Callum Houghton
  • 25
  • 2
  • 13
0
votes
1 answer

How would I set a timer with Pygame and Livewires?

So in a game I'm creating when the player picks up the speed boost sprite I want the players speed to periodically boosted for around five seconds, could someone help me understand how to do this? The 'Handle Caught' method will contain the code for…
Callum Houghton
  • 25
  • 2
  • 13
0
votes
1 answer

How to make a sprites speed increase after a certain score is achieved in Pygame

In my game the player has the avoid asteroids, and when the asteroid hits the bottom of the screen it's destroyed and the score increases by ten, but I want the asteroids speed to increase after the player reaches a certain score but every time I do…
Callum Houghton
  • 25
  • 2
  • 13
0
votes
2 answers

Menu for a game made in Pygame

I have no clue how I would implement a game menu into the game I've made, I was thinking about having buttons for instructions credits and a 'play game' button. So would someone mind helping me out in figuring how to make a simple menu in pygame or…
Callum Houghton
  • 25
  • 2
  • 13
0
votes
1 answer

Object not behaving correctly

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…
Callum Houghton
  • 25
  • 2
  • 13
0
votes
1 answer

Changing font in a livewires message

I'm working on a game, and when you lose it basically says game over, but I wanted to change the font, and I don't know how, here's the part of the code I'm focussing on: def end_game(self): """ End the game. """ end_message =…
Infamouslyuseless
  • 922
  • 2
  • 8
  • 15
0
votes
1 answer

What does "Cannot have more than on screen object" error mean?

I'm working on a timer template for use in my games that I create. This is the code I have for a timer module (haven't put it into a class yet) import time import math import pygame from livewires import games, color timer =…
emufossum13
  • 377
  • 1
  • 10
  • 21
0
votes
1 answer

Timing the movement of Sprites

I'm working on a balloon pop type of game, where the player has a launcher they can move across the screen and press the left mouse button to fire missile and pop the balloons. What I want to do, is after 25 missiles are fired, move the row of…
emufossum13
  • 377
  • 1
  • 10
  • 21
0
votes
1 answer

Having a certain piece of code run for a specified amount of time

I'm working on a galactica type of game using pygame and livewires. However, in this game, instead of enemy's, there are balloons that you fire at. Every 25 mouse clicks, I have the balloons move down a row using the dy property set to a value of 1.…
emufossum13
  • 377
  • 1
  • 10
  • 21
0
votes
1 answer

Mixing Graphics and Text into one window

I'm using Python and developing a trivia game with livewires. I had a theory to have a default question card as an image display. And then have the console print text into accurately positioned locations. The questions, answers, and explanations…
emufossum13
  • 377
  • 1
  • 10
  • 21
1 2 3
10
11