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 levels in games

Author
Message
HB Productions
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 4th May 2003 14:06
I would like to make something like a 2D car racing game or top-down shooter, but I cant figure out how the hell to make a scrolling level (so I can have the player in the middle of the screen and as you move the level scrolls).

I used to programme with DIV Games Studio which is a begginer's language, and all you had to type there was something like start_scroll(scroll number,background graphic, etc...)

I seem to think it isn't as simple as that with DB.

- Greg.
HB Productions
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 4th May 2003 14:08
Could someone please send me a really simple programme where you have your person/car in the middle of the screen, and you move it around a 2D world. Also, how would you put objects in the world?

Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 4th May 2003 15:12
Even though it's a fundamental given you'll need it commented near enough all the way through HB.
Just saying, because you never said please include comments.

I hear and I forget. I see and I remember. I do and I understand.
HB Productions
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 4th May 2003 15:40
Yeah... lol. Can you coment your programme if you're gonna send me 1 plz.

Armeggadon
21
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 4th May 2003 20:49 Edited at: 4th May 2003 20:50
just make it so that instead of the player moving the world underneath moves(this might not answer your question but its somewhat of a start) i dont have a program sry. im busy with other things. but if you need a little one in a little while i might be able to help

Current Status: learning MORE about dbpro
I consider myself: newb
HB Productions
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 4th May 2003 23:55
Yeah thanks, I'll try that. Still not sure how to do it though

DarkSith
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 8th May 2003 14:21
Hmmmm.... How about making a matrix and positioning the camera right above it? I'll try to do this tonight and get the code printed so I can type it for you tomorrow.

Dark Basic: My Favourite!
Red general
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 8th May 2003 14:44
Make say 9large sprites (screen width) and position them like so:


once done then have each of your positions having something like + ypos, + xpos. Position them again and again in your loop and increase the ypos and xpos with the arrow keys. They will now scroll. Also have your character either made last in the loop, or given priority so that it is infront of the background

My computer melts regulary - perhaps it likes being fondue
Red general
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 8th May 2003 14:45
Sorry that pictuure in the code did not work, just make sure that it is in a 3x3 grid

My computer melts regulary - perhaps it likes being fondue

Login to post a reply

Server time is: 2024-09-20 07:34:23
Your offset time is: 2024-09-20 07:34:23