www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/01/19:15:42

From: wilrod AT rocketmail DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: scrolling with allegro
Date: Wed, 01 Jul 1998 22:37:32 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 30
Message-ID: <6nednc$fa8$1@nnrp1.dejanews.com>
References: <001a01bda51b$07837e40$624d08c3 AT arthur>
NNTP-Posting-Host: 207.149.116.115
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <001a01bda51b$07837e40$624d08c3 AT arthur>,
  "Arthur" <arfa AT clara DOT net> wrote:
>
> >> One scheme is to create a very large bitmap object that is your level,
> >> and then blit the appropriate piece onto the screen.
> >> --

>
> Not memory efficient. Hmm. Let me see: for a 1600x1600 map (for instance) in
> 256 colours - that's 625Mb of ram. (!)
>

Huh?!  Using a standard 256 color palette means that each pixel requires a
single byte to represent the index into the color lookup table.  So 1600*1600
is only 2560000 bytes.	Divide that by 1024 and you get 2500k < 3Mb.

I currently use this approach (storing a large bitmap image in RAM to
scroll) in a program I'm using to familiarize myself with Allegro.  My image
has no repeating patterns, so I must use a single large image.

However, I do recommend using tiles for images which contain repeating
patterns. You could create a huge (bigger than large, that is) image with a
lot less memory that way.

Just my $.02

Wil

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019