Message-ID: <001a01bda51b$07837e40$624d08c3@arthur> From: "Arthur" To: "DJGPP Mailing List" Subject: Re: scrolling with allegro Date: Wed, 1 Jul 1998 17:11:58 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Precedence: bulk >> One scheme is to create a very large bitmap object that is your level, >> and then blit the appropriate piece onto the screen. >> -- > >Well that is not memory efficient, but the easiest approach. Not memory efficient. Hmm. Let me see: for a 1600x1600 map (for instance) in 256 colours - that's 625Mb of ram. (!) Use the tile method. Get a load of sprites which define the landscape (you can use the same sprite on many different parts of the landscape). Define an array for your map. If your tiles are 32x32 pixels in size, and you have a maximum of 255 tiles, then your array needs to be 50x50 bytes in size for a 1600x1600 pixel map (1600/32=50). Now all you need to do is see what sprites defined in this array need to de drawn, and draw them on the screen in the right place. James Arthur jaa AT arfa DOT clara DOT net