Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
bix
22
Years of Service
User Offline
Joined: 8th Nov 2003
Location: new york city
Posted: 9th Nov 2003 04:08
hi all,

new to darkbasic but been programming for years. is there some way to use memblocks to store huge huge images, and then more or less "scroll" a more reasonable sized frame around in that data, drawing a portion of the huge image to the screen?

it seems like a memblock would be the right approach, but not really sure. has anyone done this before?

best,
bix
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 9th Nov 2003 06:44
While you could do it like that, it's not really suited to DBPro.

A far easier option is to take your source image, cut it up into smaller sections, either in a gfx program or do it within Dbpro if you like. Than at run time render/re-create it via a tile map.

One drama you might have is that if you image is too large, either your video, or the people that run your app's video cards may not support images of that size.

Kevin Picone
Play Basic - Visible Worlds - Kyruss II
[url]www.underwaredesign.com[/url]
bix
22
Years of Service
User Offline
Joined: 8th Nov 2003
Location: new york city
Posted: 9th Nov 2003 18:08
hi kevin,

thanks for your reply. yeah tiles is how i've gone about it in the past, but i'd like to avoid managing ten million little files.

but right now in dbpro i cant seem to be able to load more than two 1024x1024 bitmaps before it craps out, and without an error message i might add. this seems very very wrong to me.

for example, make a 1024x1024 bitmap and try this:

THE_SURFACE = 16
load bitmap "1024.jpg",THE_SURFACE
load bitmap "1024.jpg",THE_SURFACE+1
load bitmap "1024.jpg",THE_SURFACE+2

dbpro stops when it tries to load the third. two works, three doesn't. this is just scratching the surface of available vram.

any ideas?

best,
bix
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Nov 2003 01:15
It's probably your video card that has the problem. If you post your system specs, someone will be able to diagnose for you. I don't know if the bitmaps are sent directly to the card or not, but the fact that you can only have 32 would suggest that they might be.

The other thing is that a 1024 square bitmap might be a problem. As bitmap 0 is the screen, this seems to indicate that bitmap sizes are directly related to screen resolutions.

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php

Login to post a reply

Server time is: 2026-07-26 19:46:54
Your offset time is: 2026-07-26 19:46:54