Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#7297) Caching map canvas
Home

[Freeciv-Dev] Re: (PR#7297) Caching map canvas

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7297) Caching map canvas
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Fri, 23 Jan 2004 13:38:31 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7297 >

On Fri, 23 Jan 2004, Vasco Alexandre da Silva Costa wrote:

>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7297 >
>
> On Fri, 23 Jan 2004, Raimar Falke wrote:
>
> >
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=7297 >
> >
> >
> > Idea: have a backing store of the size of map which contains the whole
> > drawn into it.
> >
> > Purpose: allow fast changing of the mapview origin by just copying
> > relevant parts of the backing store to the screen in the right places.
> >
> > You have the problem of wrapping (after the eastmost tile comes the
> > westmost one). But this is easy for non-iso tilesets. Non-iso tilesets
> > have another advantage: they have no overlapping between tiles.
> >
> > For iso tilesets the idea is to have a larger backing store. 9 times
> > the place required for drawing the complete map. So around the primary
> > instance of the map in the backing store you place 8 other copies of
> > it around. At the border you do the correct overlapping drawing.
> >
> > A little picture for the iso case:
> >
> >
> >       a                b               c
> >
> >
> >           +---------------+
> >       d   |            e  |            f
> >           |               |
> >           |               |
> >           +---------------+
> >       g                h               i
> >
> > where the rectangle is the part which is drawn to the screen. And a-i
> > are the instances of the map.
> >
> > Advantages:
> >   - fast change of map origin
> >   - pixel based position of the view quite easy
> >
> > Disadvantages:
> >   - large memory usage
> >   - updating of a tiles is more expensive in the iso case
>
> Old scrolling games used these sorts of techniques. e.g. parallax
> scrolling.

Now I think of it... parallax scrolling is something else IIRC. Anyway,
old platform and shoot'em'ups used these techniques. :-)

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa






[Prev in Thread] Current Thread [Next in Thread]