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.

2D All the way! / Can I use the camera in 2D?

Author
Message
sonecgaimr
21
Years of Service
User Offline
Joined: 25th Mar 2003
Location: United States
Posted: 13th Apr 2003 03:24
I have a large bitmap that won't fit on the screen, so I want to use the camera commands to do it. I have tried it, but it won't work. Is it possible to do this, or will I have to instead move the bitmap around the screen?
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Apr 2003 04:10
Have a look at the 'shadow of the beast' demo under downloads. The source is available too.
Andy Igoe
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 13th Apr 2003 04:26
You want to zoom out a bit (use sprites which can zoom in DBPro) or you want to scroll? (use either sprite or image command set).

You cannot use the camera to move an image which is placed by screen co-ordinates. Or in short, 'no'.

If you need a hand working out the code please give a little more info about the effect you want to achieve with the bitmap and i'll work out some code for you

Pneumatic Dryll, Outrageous epic cleric of EQ/Xev
God made the world in 7 days, but we're still waiting for the patch.
UberTuba
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 13th Apr 2003 16:41
This code will do it.Brackets represent variables

Life is a terminal disease.
You never survive it.
UberTuba
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 13th Apr 2003 16:42 Edited at: 13th Apr 2003 16:42
sTUpid code box!!!


set bitmap (whichever bitmap u are using?)
get image (image number),(how far x scrolled u are),(how far y scrolled u are),(how far x scrolled u are)+(screen width),(how far y scrolled u are)+(screen height)

set bitmap 0
paste image (image number),0,0

Life is a terminal disease.
You never survive it.
Chessplayer
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location:
Posted: 15th Apr 2003 02:23
Whoops! I posted that on sonecgamir's (My brother) handle. He forgot to log off! Sorry about being unclear! What I want to do is just scroll the "camera" around the screen. I actually meant multiple bitmaps and sprites. Anyways, Darkfluff, thanks for the code, but it code works if I am only using one bitmap.


Whenever I try to use these two code lines in my main loop:

get image 30,6,6,646,486
paste image 30,0,0

It brings up an error saying "bitmap too small to get image"
I think that I caused that by picking a spot off screen. I would appreciate any help I can get.

Chess isn't just for old, wise men! (really!)

Login to post a reply

Server time is: 2024-03-29 04:58:50
Your offset time is: 2024-03-29 04:58:50