[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Big Tile Maps
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Big Tile Maps
- From: Phil Hassey <philhassey@xxxxxxxxx>
- Date: Thu, 15 Sep 2005 08:57:14 -0700 (PDT)
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Thu, 15 Sep 2005 11:57:27 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=QusjdfqWhD+hVbEE+eDYhxo/Pc1eriSJOKD/BF3UccrW46yULTPBcDCmo4A7Zbyf6/MwTuqNWG9SrdUbcyCHTG79A7PFKwkyfNFb7AoCXJtp5HcwN/cTg2X7OwLD54qftYsFhc7jWHC7FsB/JUFJdJR8EwRFke97ilEmYgDQeT8= ;
- In-reply-to: <Pine.LNX.4.56.0509151124140.18135@twobox.geeky.net>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Sw,
My pgu library does pretty good for overhead games.
There is no slowdown for very large maps.
http://www.imitationpickles.org/pgu/
At the very least, take a look at the code in
pgu/tilevid.py and see the update() and paint()
functions for how I do it. I only draw on screen the
stuff that needs to be drawn.
Phil
--- Shandy Brown <sjbrown@xxxxxxxxx> wrote:
> when does it slow down, when you start scrolling
> across it? or is it
> always slow?
>
> sjbrown
>
> On Thu, 15 Sep 2005, Simon Wittber wrote:
>
> > Hello Chaps.
> >
> > I'm attempting to create a data structure for
> efficiently storing
> > large tilemaps, and objects within the map. The
> map is a 2d overhead
> > view of a terrain, which is scrolled when the
> mouse cursor is near the
> > edge of the game window.
> >
> > I've tried using a quadtree, but this is not very
> efficient when
> > working with moving objects, which move from tile
> to tile.
> >
> > I've also experiemented with a grid type system,
> and a moving window
> > into the grid.
> >
> > I'm not satisifed with any of my solutions, and am
> wondering what
> > other people use for this sort of thing.
> >
> > Has anyone got some pointers, or some code I can
> look at?
> >
> > Sw.
> >
>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com