Tiling - is it worth it?

Hi all,

I’m thinking of making a game in a similar vein to “Baldur’s Gate”,
which has a non-repetitive background (ie: it’s not tiled as far as the
eye can tell). I was wondering if there was any advantage to having a
tiled system anyway, or if getting rid of it would be a benefit…

The game map will probably be a maximum of 6000x4800 pixels (10x10
screens, worst case), with a fog-of-war overlay of the same (although
this can be 1 bit deep, assuming SDL allows a 1-bit alpha to act as a
mask in a 1-5-5-5 display format). Now admittedly, this is 57Mb of
background, but I’m not sure I care - it’ll be a s/w surface and RAM is
cheap.

I can see the reasoning behind ground-level animations being limited
in size, but I don’t require a tile system for this, water animations or
trees waving in the wind can be superimposed on the background, and have
their co-ordinates matched to the correct area.

The procedure (it seems to me) would then just be

- blit background from (background: x,y) to (screen: 0,0)
- blit an ground-level animations (water etc.)
* blit ground-level objects (players & monsters, start of high-level 

objects)
* blit higher-level objects (trees, anything taller than the
characters, etc.)

(*) needs to be done top-left to bottom-right as usual.

I can see there might be a small advantage to using tiles if I want to
break the map up into "this chunk is visible now, this chunk isn’t) so I
could optimise the memory use - I’m just not sure it’s worth it. In BG,
any explored area of a map is fair game to be viewed at any moment by
jumping to it from the overall-map screen. Sure I could load up the
tiles on-demand, but it seems to me there’d be a lot of disk access if
you’re scrolling fast across the map…

So, am I missing anything ?

Cheers,
Simon.

Simon Gornall wrote:

I’m thinking of making a game in a similar vein to “Baldur’s Gate”,
which has a non-repetitive background (ie: it’s not tiled as far as
the eye can tell). I was wondering if there was any advantage to
having a tiled system anyway, or if getting rid of it would be a
benefit…

Path-finding is easier/faster/cleaner with tiles.

It takes more effort to make non-tiled maps look good.

Tiled maps require less disk space and therefore download faster and don’t
require disk swapping.

Tiled maps are not limited in size to 10x10 screens. You may not have to
divide the world into separate maps at all if you use tiling.

Tiled maps load faster.–
Rainer Deyke - rainerd at eldwood.com - http://eldwood.com

Simon Gornall wrote:

Hi all,

I’m thinking of making a game in a similar vein to “Baldur’s Gate”,
which has a non-repetitive background (ie: it’s not tiled as far as the
eye can tell). I was wondering if there was any advantage to having a
tiled system anyway, or if getting rid of it would be a benefit…

The game map will probably be a maximum of 6000x4800 pixels (10x10
screens, worst case), with a fog-of-war overlay of the same (although
this can be 1 bit deep, assuming SDL allows a 1-bit alpha to act as a
mask in a 1-5-5-5 display format). Now admittedly, this is 57Mb of
background, but I’m not sure I care - it’ll be a s/w surface and RAM is
cheap.

I can see the reasoning behind ground-level animations being limited
in size, but I don’t require a tile system for this, water animations or
trees waving in the wind can be superimposed on the background, and have
their co-ordinates matched to the correct area.

The procedure (it seems to me) would then just be

  • blit background from (background: x,y) to (screen: 0,0)
  • blit an ground-level animations (water etc.)
  • blit ground-level objects (players & monsters, start of high-level
    objects)
  • blit higher-level objects (trees, anything taller than the
    characters, etc.)

(*) needs to be done top-left to bottom-right as usual.

I can see there might be a small advantage to using tiles if I want to
break the map up into "this chunk is visible now, this chunk isn’t) so I
could optimise the memory use - I’m just not sure it’s worth it. In BG,
any explored area of a map is fair game to be viewed at any moment by
jumping to it from the overall-map screen. Sure I could load up the
tiles on-demand, but it seems to me there’d be a lot of disk access if
you’re scrolling fast across the map…

So, am I missing anything ?

Well, with such an approach you’ll run into lots of problems :

  • some video drivers have a limit on the surface size (the dga driver
    comes in mind).
  • also, if SDL has to convert the surface before blitting, you might end
    up with a temporary 24bit surface matching yours, for example. No need
    to mention the obvious memory problems you will have then.

So you’ll have to cut your surface one way or the other.

Stephane