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! / Srolling background

Author
Message
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 5th Oct 2003 20:22
Right, I´m making a fighting game simiilar to Street Fighter(nowhere near as complex) and I can´t find a way to scroll the background image across the screen infinitly. Does anyone know how to do this?

P.S I´m using DBC. 1 month and 19 days untill I get DBPro
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Oct 2003 23:58
I'm not sure what you mean. Cause in SF, the background only scrolls so far before you become pinned against the wall. Though you might look into parallax scrolling.
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 9th Oct 2003 18:00
For the background I´m using a sprite. Picture a train crossing a desert. The train isn´t actuly moving. The only thing that is changing is the picture of the desert. How do I do that without using a massive bitmap? Also where do I look up parallax scrolling? I´ve never heard of it before.
Thanks for replying
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 9th Oct 2003 18:32
How big is your train picture? It sounds like you can just use a big bitmap for that. People usually stop using bitmaps when the background is over 10 screens long.

Parralax scrolling is layered scrolling of different speeds. You notice how stars are so distant that they appear not to move? Close objects move very quickly in comparison. Parralax in 2D games means moving things near to the camera very quickly, and things in the distance very slowly. In other words, you scroll the screen in cut-up sections. Look at the Shadow Of The Beast Demo somewhere on Demo pages.

Pincho.
TheAbomb12
20
Years of Service
User Offline
Joined: 14th Aug 2003
Location: Amist the blue skies...
Posted: 10th Oct 2003 00:53 Edited at: 10th Oct 2003 00:58
Mir,

If you dont want to use a REALLY huge bitmap, I suggest getting a bitmap that fits just enough to cover the screen and then edit the UV data. I have done it before only my scrolling is going vertical, not horizontal.


I had to edit it a bit to make it go horizontal instead of vertical. I *think* this should work fine. Mess around with the numbers, you should get it to work.
Check the Dark Basic Pro turorials if you get stuck.

Those who Fight with swords get killed by those who don't
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 10th Oct 2003 18:28
Unfortunatly DBC doesn´t have a "set sprite texture coord" command (As far as I can tell anyway)Ah, another reason to get pro.
The image I want to scroll is 1280 by 346. Any bigger and my pc slows down too much. So I can´t just move my background sprite along the x axis as a fight lasts too long and the screen will go black ten or so seconds into the game.
Thanks for your help. Any other ideas?
TheAbomb12
20
Years of Service
User Offline
Joined: 14th Aug 2003
Location: Amist the blue skies...
Posted: 11th Oct 2003 08:47 Edited at: 11th Oct 2003 08:48
Yeah, I used classic for a couple of days... ...i dreamed of my death , over and over and over and ov.....

sorry man out of ideas...

you CAN wait untill you get DBpro...

http://www.metagameplay.com
Those who Fight with swords get killed by those who don't
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 11th Oct 2003 20:13
Thanks anyway, I can´t realy wait as it means redoing the whole game. Which I can´t be bothered to do.
Smeg it. I´ll just keep it stationary.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Oct 2003 20:20
Actually that background is really small. You could easily scroll it with the screen copy command.
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 12th Oct 2003 19:39
I can´t seem to find a screen copy command. I found a way of doing it anyway. I get two sprites that are 640 by 346. I move them both across the screen. When the first sprite goes off the sreen I paste it behind the second sprite. And so on.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 12th Oct 2003 19:42
Yeah I meant copy Bitmap..I always get that confused.

Login to post a reply

Server time is: 2024-05-05 18:06:43
Your offset time is: 2024-05-05 18:06:43