Re: Virtual displaying of images

new topic     » goto parent     » topic index » view thread      » older message » newer message

>> I want to create a huge image containing all the map of the game, but
to
>> create that I need a method for "displaying" an image in this big image,
I
>> tried this:
>> But it's extremely slow, do you know a better (faster) way for doing
this
>> or this is the best method ?
>        Don't use a sequence, but allocated memory.
>        You can use my GFX or you can simply rewrite it for allocated
>memory.
>        If you want to write your own routine, you need to calculate the
>start offset, and add the widht of the inside image, then you skip
>until your at your start offset + the width of the huge bitmap. Do
>this for as many lines (height of inside bitmap) you want.
>        If you would use my GFX you can use the function DisplayImageVS
and
>SaveImageVS. You simply make a screen as large as the huge bitmap,
>then you display the huge bitmap on the screen. Then you set the
>dimensions and location of the small/inside bitmap with SetView and
>then you can use DisplayImageVS and SaveImageVS. THey will then only
>work with the view/section you specified with SetView.
>        Hope this helps (It was a bit complicated)

Thanks, I'll try your code. The method I want doesn't need to be so
complex, I'm trying to do a game in the Warcraft style, a background that
scrolls one tile at a time (not like Command & Conquer, that scrolls pixel
by pixel). I'm testing to see wich is the best method: Reading a map
variable and displaying tile by tile the current screen or displaying the
entire region of the map, like a bitmap.
If I use the last method, I would need a 4096 X 4096 image (if the map size
if 128 X 128 tiles and each tile is 32 X 32 pixels), but when I fill this
huge image with the map data, it takes a lot of time using my code.
I think Warcraft II uses the second method, Am I right ?

---
Ricardo Niederberger Cabral
rnc at infolink.com.br

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu