[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Firing bullets
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Firing bullets
- From: Charles Joseph Christie II <sonicbhoc@xxxxxxxxx>
- Date: Sun, 1 Apr 2007 20:46:02 +0000
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Sun, 01 Apr 2007 16:46:12 -0400
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:from:to:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type:content-transfer-encoding; b=EHNZTtv6KC4/t84d09qh8XOtrXJ76o6bqyIpsgRjaedQtKxnJgQRG7Qk2/MIz48HYaNoiFkUkyaelNM8VXqFAFCcY3X93YfjWdUgglAQPL/bzdlevS2VbWyHvQbHSbR9nqOh9u1KEDaoPpHbIlLkujehtg9mmRCiVZMtPXIiVQw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type:content-transfer-encoding; b=FpXihnMt0IE+0W6FeZn9o7QsjHnp+guBDYW04oZvb/3or+SpHbbLhXFMiHZ9aLCY5r2se/zLxOVziYSJYS8fOmDXPLv8bqogXZC+ifvMXxNEx07f9G4vTZe7YkDTsbwt03m0zI+Yhn/3T2qBI/3nZGryo2GNcIyw8CkBk/gKlZk=
- In-reply-to: <383b6d6f0703282327r7a6fac06s8304e852766a5ecf@mail.gmail.com>
- References: <8c46c7370703260637j138b213eg7c18e476e98c20cc@mail.gmail.com> <Pine.BSO.4.64.0703291218420.10698@fuyu.mindrot.org> <383b6d6f0703282327r7a6fac06s8304e852766a5ecf@mail.gmail.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
This is what I want to do but I'm kinda confused on how to do it, and
then use it to make at least a simple pattern.
On Wed, 28 Mar 2007 23:27:50 -0700
"andrew baker" <failrate@xxxxxxxxx> wrote:
> I always like to fill a list full of bullet sprites to pull from when
> a character is firing and to return to when they are "dead". This
> saves a lot of processing power, because you are performing less
> instantiation and destruction. The trade-off is in memory, but this
> shouldn't be significant. The only other thing I would mention is to
> make sure that the bullets in the bullet sprite queue are not calling
> their update, as they are inactive until fired.
>
> On 3/28/07, Damien Miller <djm@xxxxxxxxxxx> wrote:
> > On Mon, 26 Mar 2007, Charles Christie wrote:
> >
> > > Well, I'm trying to get my program to fire bullets now. Isn't
> > > that great?
> > >
> > > I think I'm doing it all wrong though...
> > >
> > > My problem has been that I don't know how to make the program
> > > fire bullets. But then I thought, "shouldn't the character be
> > > firing the bullets, not the program?" and it's then that I
> > > realized why I couldn't do anything. My logic has been completely
> > > wrong. Again. Go figure <_<
> > >
> > > Well, I still don't have images for characters yet and I still
> > > have no movement code (I should probably work on that, huh?) but
> > > everything else aside from the characters and bullets is done.
> >
> > A few years ago I wrote some classes for an unfinished game that
> > handled guns and bullets. You might find them useful.
> >
> > http://www.mindrot.org/~djm/private/pyrrhus-snap-20070328.tgz
> >
> > See gun.py in the distribution. It includes a basic damage system
> > and XML schema to describe models. It is nowhere near as capable as
> > BulletML (which looks amazing cool) but it is very simple and easy
> > to understand.
> >
> > The game runs, but lacks sound levels, boss logic and lighting
> > effects. It requires PyOpenGL.
> >
> > -d
> >
>
>