[pygame] Continuous Shooting

2012-01-12 Thread ANKUR AGGARWAL
Hey I was making a demo shooting game and problem is that I want a continuous stream of bullets. As of now on pressing the space key only one bullet comes out of the plane (I want this to be continuous stream). On pressing space key again bullet starts from its initial point. My problem in the

[pygame] Delay Between iterations

2012-01-12 Thread ANKUR AGGARWAL
import pygame from pygame.locals import * import random pygame.init() screen=pygame.display.set_mode((640,480),0,24) pygame.display.set_caption(Hit The Stone) background=pygame.Surface(screen.get_size()) background=background.convert() screen.blit(background,(0,0)) class

[pygame] Re: Delay Between iterations

2012-01-12 Thread ANKUR AGGARWAL
In the last code provided I messed up the Bullet Class Code. Apologies for that. Below is my code : import pygame from pygame.locals import * import random import time pygame.init() screen=pygame.display.set_mode((640,480),0,24) pygame.display.set_caption(Hit The Stone)

Re: [pygame] Re: Delay Between iterations

2012-01-12 Thread Henrique Nakashima
Inside the while 1 loop, add a call to clock.tick(60). This will prevent the loop from running more than once every 1/60 second. On Thu, Jan 12, 2012 at 15:35, ANKUR AGGARWAL coolankur2...@gmail.comwrote: In the last code provided I messed up the Bullet Class Code. Apologies for that. Below is

Re: [pygame] Continuous Shooting

2012-01-12 Thread Julian Marchant
First off, you need some sort of time management. As it is now, it'll run at variable speeds depending on how fast the processor is. Use pygame.time.Clock to limit the frame rate and/or use delta timing. As for your problem, all you need is a counter variable. Have the counter variable start

Re: [pygame] Delay Between iterations

2012-01-12 Thread Zack Baker
Hey could you add a zip of the pictures, i would be greatful On Jan 12, 2012, at 1:10 PM, Henrique Nakashima wrote: Inside the while 1 loop, add a call to clock.tick(60). This will prevent the loop from running more than once every 1/60 second. On Thu, Jan 12, 2012 at 15:35, ANKUR AGGARWAL

Re: [pygame] Delay Between iterations

2012-01-12 Thread Zack Baker
Sorry nevermind. Saw your next email On Jan 12, 2012, at 12:35 PM, ANKUR AGGARWAL wrote: In the last code provided I messed up the Bullet Class Code. Apologies for that. Below is my code : import pygame from pygame.locals import * import random import time pygame.init()

[pygame] Capabilities of Pygame

2012-01-12 Thread Ryan Strunk
Hello everyone, As I embark on this journey of learning Pygame and game design, I have one last burning question I haven't been able to find an answer to. I've heard that Python, as an interpreted language, isn't as fast as languages like C++. It follows, then, that Pygame would suffer the same

Re: [pygame] Capabilities of Pygame

2012-01-12 Thread Christopher Night
If you set out to remake World of Warcraft in python, then by the time you finish in 200 years, computers will be more than fast enough that your program will run just fine. Seriously, what kind of game do you want to make? If you want to work on an MMORPG, you'll have to be working for a

RE: [pygame] Capabilities of Pygame

2012-01-12 Thread Ryan Strunk
From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On Behalf Of Christopher Night Sent: Thursday, January 12, 2012 7:54 PM To: pygame-users@seul.org Subject: Re: [pygame] Capabilities of Pygame Seriously, what kind of game do you want to make? I have a couple in mind: an

Re: [pygame] Capabilities of Pygame

2012-01-12 Thread Nic
The Eve Online client and server are written in 200,000+ lines of Python respectively. I'd say the only limit is time and knowledge and the real issue is the question that Mr. Night posed, what type of game do you want to make, and based on the answer to that question, is Python (PyGame) the right

Re: [pygame] Capabilities of Pygame

2012-01-12 Thread Julian Marchant
You couldn't build a game that's up to scope with any 3D game, because you wouldn't be able to use 3D. For that, you'd need either PyOpenGL (with Pygame) or Pyglet. The latter is better in some ways; the main advantage Pygame/PyOpenGL has that I can think of is joystick support. On the other

Re: [pygame] Capabilities of Pygame

2012-01-12 Thread Sean Wolfe
--- On *Fri, 1/13/12, Ryan Strunk ryan.str...@gmail.com* wrote: As I embark on this journey of learning Pygame and game design, I have one last burning question I haven’t been able to find an answer to. I’ve heard that Python, as an interpreted language, isn’t as fast as languages like

Re: [pygame] Capabilities of Pygame

2012-01-12 Thread Sean Wolfe
Also Ryan, as to your questions regarding speed. There is a lot of work in the python community right now for speed improvements -- pypy, Cython, shedskin, as people here have said. I'm curious to see how pygame evolves over the next few years. Cause here's the deal -- the development time

Re: [pygame] Capabilities of Pygame

2012-01-12 Thread Silver
On 1/12/2012 5:45 PM, Ryan Strunk wrote: Hello everyone, -[erased] Ryan Hey, as a veteran programmer, what I can say about python's speed is that it is sufficient to do a very many of things. With python/pygame the only speed issues I have run into are: * Programming Language

Re: [pygame] Capabilities of Pygame

2012-01-12 Thread Kevin Secretan
It should also be noted that C++ itself isn't fundamentally a fast language from a design perspective (and if you make the mistake of having a lot of news and deletes going off at inopportune times you'll see its true potential sluggishness). Its primary benefit is that it lets you talk to