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
DRYAD
22
Years of Service
User Offline
Joined: 20th Dec 2002
Location: Greece
Posted: 5th Feb 2003 11:23
hello
i like to make a diablo style game.
but i have a few questions
1st) i make a bitmap 6000x6000 size.
i want to scroll this image like diablo. how?
2nd) how to put collision on the sprite when it hit on a tree?
thanks in advance
Red general
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 5th Feb 2003 16:04
You could have it like this:

rem insert your stuff here
load image "image1.bmp",1
Do
Sprite 1,0+bx,0+by,1
rem put your stuff in

Rem scrolling
If rightkey()=1 then by=by+10
If leftkey()=1 then by=by-10
If upkey()=1 then bx=bx-10
If downkey()=1 then bx=bx+10



This means that the background will scroll. If you put a character in the center and have it moving...

It might get a "choppy" though, as it is a large bitmap. See what you think

My computer melts regulary - perhaps it likes being fondue
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 5th Feb 2003 16:11
and when you want to scroll the screen with your mouse you might use this code:


Rem scrolling
if mousex()>screenwidth()-10 then by=by+10
If mousex()<10 then by=by-10
If mousey()<10 then bx=bx-10
If mousey()>screenheight()-10 then bx=bx+10


Login to post a reply

Server time is: 2025-08-08 11:45:01
Your offset time is: 2025-08-08 11:45:01