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.

Newcomers DBPro Corner / Scrolling Background

Author
Message
Drew the G
User Banned
Posted: 12th Jan 2006 01:07
Does anyone know how to post a continuous scrolling background.

Like, load in a bitmap and contineously scroll the background.

Thanks in advance.

Muncher
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location:
Posted: 12th Jan 2006 05:50
I guess you could load a bitmap off screen, and copy sections of the bitmap to the screen. It should look something like:


Good Luck!
Smithy
19
Years of Service
User Offline
Joined: 8th Dec 2004
Location: Switzerland
Posted: 12th Jan 2006 10:43 Edited at: 12th Jan 2006 10:45
You can create an object like a plane or a sky-box/tube/sphere,
texture it and then use the function:

void dbScrollObjectTexture ( int iObject, float fX, float fY)
(func name in darkgameDevKit, I assume its "Scroll Object Texture" in DBPro)

fX, fY is the amount of units to scroll the texture.


//edit: If you need an "endless" scrolling texture, you need to handle it by yourself like texturing the object with a texture from a stream but I think this needs quite some code optimization to get it fast enough. You have the idea

Another way was to use the Backdrop but:
Excerpt from the helpfile:
"This command is now obsolete and using sky spheres and boxes is a recommended alternative."

//Awards: Best DM at NeverwinterConventionIII (NWCon3)
//Sys: Pentium IV 3200E/Prescott;800Mhz FSB;HT;WinXPPro;ATIR9700PRO;1024MB RAM(2x512MB"DualChanneled";VC++7.net;Delphi6;ADSL512;
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK

Login to post a reply

Server time is: 2024-11-27 07:37:21
Your offset time is: 2024-11-27 07:37:21