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.

DarkBASIC Discussion / Scrolling

Author
Message
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 19th Jan 2005 09:33
How can I make a scrolling background with DBC?? Like I take a background and a character and have the background scroll along with him. You can do it easily in game maker but can you do it in DB? if so how?

Thanks in advanced!
MDTalley
20
Years of Service
User Offline
Joined: 13th Jan 2005
Location: Mobile, AL
Posted: 19th Jan 2005 11:59
Are you talking about 2D Scrolling like with Ultima or The Legend of Zelda? Where the character stays close to the middle and the background scrolls below them?
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 19th Jan 2005 23:31
Yes! That's Exactly It. But the screen can also scroll up and down other than JUST left right. Also like Mario for SNES or the GBA version.
MDTalley
20
Years of Service
User Offline
Joined: 13th Jan 2005
Location: Mobile, AL
Posted: 20th Jan 2005 03:16
It's a very long and complex process because, to really do it right, you have to create all of your tools, to create the game. In other words, you must first write you own version of "Game Maker" and then use that to make your game.

A quick and dirty way to do this, without using a tile set and map maker, would be to constantly redraw an image based on character movement.

Example - You have a 32 X 32 "Hero" image and a 3200 X 3200 "Map" image. Let's say your display area is 320 X 320. You start by creating an image that uses the middle of the map, say 1440, 1440, 1760, 1760. You display that and then put the "Hero" image over the map background in the center. Then if you hit the "Up" arrow, you trap that keystroke and you get a new image of the map, moving the area of the image by 32 pixels. 32 pixels less on top and bottom (Y axis) so we get the new section of the map at, 1440, 1408, 1760, 1728. You then redisplay the Map and Hero. (Pardon if the math is off, I'm doing this at work.) You have to code for getting to the end of the map, of course.

It would not be very efficient, but it would work.
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 20th Jan 2005 08:23
Oh come on it wouldn't be that hard.

vgames master@: Its a bit late here right now and I'm tired, but tomorrow I'll explain how you can do it(I'll write some functions for you too).

CURRENT PROJECT: Chaos Hizzle Demo
STATUS: Release of BETA imminent!
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 20th Jan 2005 09:38
Thanks! I thnk I could try something like that. I am still open to suggestions though. Anyway my Idea might no even work. So please ans thank you. For help me. I relize you have taken time from your busy schedule to help ME!
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 21st Jan 2005 01:47
Okay well I'm almost done with these functions, I'll post them up later.

CURRENT PROJECT: Chaos Hizzle Demo
STATUS: Release of BETA imminent!
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 21st Jan 2005 07:52
Ummmm you meant like Mario....okay maybe I should take more time reading people's posts .

The best way to do it is to draw each thing seperately, rather than drawing the whole background. Well, actually, draw the background, then place the entities(ledges, etc) using PASTE IMAGE. Its not really that hard but.. When I saw 'zelda' I immidiatly pictured the standard 2D RPG where you have like, tiles and stuff..

CURRENT PROJECT: Chaos Hizzle Demo
STATUS: Release of BETA imminent!
PowerMan
20
Years of Service
User Offline
Joined: 22nd Jan 2005
Location: Manchester
Posted: 22nd Jan 2005 20:54
Hello everyone
i am also trying to produce a Side scrolling game such as the old arcade game 'scramble' i'm struggling abit on the side scolling background (stars) from right to left. should i just use a bitmap to create the stars or is there another way?

Login to post a reply

Server time is: 2025-05-24 03:36:52
Your offset time is: 2025-05-24 03:36:52