Results 1 to 3 of 3

Thread: 2D Tile Map Scrolling.

  1. #1

    2D Tile Map Scrolling.

    Hello,

    Hopefully in the near future, I wish to make yet another attempt at a game, 2D tile map based, and in the past I have ignored scrolling, simply because it's easier that way and had fixed map sizing to match the window area.

    But as soon as I can get Asphyre Sphynx to work with D2009, I would like to have another shot, and try to implement scrolling (for a tile based 2D map).

    Just looking for some techiques that people generally use for this?

    I'm hoping to have a mad editor of course and display a certain section of the map until a character has reached a certain point near the bounds I suppose and have it drawing new stuff, and not showing old stuff.

  2. #2
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2

    Re: 2D Tile Map Scrolling.

    The way I did it for our 2006 competition entry was to draw as much of the map as I could fit onto screen, plus 2 additional tiles in all directions to allow for a one sqaure move/scroll cycle and also speciall effects that could potentially 'shake' the map.

    Then when the character moved, you scrolled what you had before beginning a redraw cycle which mostly consisted of blitting the remaining portion of each layer onto the new buffers before drawing the bits that needed filling in.

    Apart from the fact I picked unDelphiX to do the graphics, the mechanism I described above worked really well.
    :: AthenaOfDelphi :: My Blog :: My Software ::

  3. #3

    Re: 2D Tile Map Scrolling.

    I think I have a mental grasp of how I can do this.

    I'll obviously have a default overview of a map, depending on where a character enters it, but when they move my drawing routine will just have to shift to drawing tiles ahead in that direction.

    Well in my head it seems reasonably simple lol.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •