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! / Side-Scroller

Author
Message
Ace Of Spades
21
Years of Service
User Offline
Joined: 6th Mar 2005
Location: Across the ocean
Posted: 14th Mar 2005 03:04
This is the method i am using right now to scroll the background:



but it is extremely choppy on my slow comp. So I was thinking doing the textured plain method...but then how could i do collision between objects if the sprites are not seperated?

Can someone please help me? I dont ususally do 2D games.

Thanks,
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 15th Mar 2005 01:06
You divide the screen into squares....maybe 32*32. Then you scroll the screen, and keep a track of where the squares have now scrolled to.

dim map(Total Length of scrolling background/32, Height/32)

Then put a 1 in those dims for a collision, and a 0 for an area with no collision.

Just a matter of making sure that the dims are matched perfectly to the sprite position.

UnderLord
22
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 26th Mar 2005 13:44
would that work pincho if you where using dots as your background you know

for s= 1 to 10000
Dot rnd(1024),rnd(1024)
next s

or would you need to use a image as your background?

When we talk to god, we're praying. When god talks to us, we're schizophrenic.
Schizophrenic beats eating alone.

Login to post a reply

Server time is: 2026-07-14 00:27:39
Your offset time is: 2026-07-14 00:27:39