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 Game

Author
Message
Bio Fox
20
Years of Service
User Offline
Joined: 11th Nov 2004
Location: The BioFox Bunker
Posted: 22nd Nov 2004 01:43
I need help making my 2D game scroll like a mario game. Any suggestions?
“Getting an A is only nice when you don’t study.” - Quotes We Probably Said

Here is what I have so far :

sync on
sync rate 40

HIDE MOUSE
ink rgb(44,314,0),1
load sound "begin3.wav",1

play sound 1

loop sound 1

load bitmap "background.bmp"
load image "prisonbg.bmp",1
load image "squid3.bmp",2
load sound "world1.wav",2
SET CURSOR 245,100
Print "Super Squid Squad 2"
SET CURSOR 270,120
print "2D Adventure"
SET CURSOR 245,230
PRINT "Press any key to start"
suspend for key
stop sound 1
CLS
GOTO Label1
Label1:
CLS
ink rgb(244,214,210),1
PRINT "Loading"
Sleep 1000
Print "."
Sleep 1000
Print "."
Sleep 1000
Print "."
Sleep 1000
CLS
PRINT "Loading"
Sleep 1000
Print "."
Sleep 1000
Print "."
Sleep 1000
Print "."
Sleep 1000
CLS
GOTO Label2
Label2:
x=320
y=240
REM sync on
sprite 1,0,0,1
SIZE SPRITE 1,650,500
x= 0
y= 330
play sound 2
loop sound 2
do
rem cls
if upkey()=1 then y=y-0
if downkey()=1 then y=y+0
if leftkey()=1 then x=x-2
if rightkey()=1 then x=x+2
rem sprite 1,0,0,1
rem circle x,y,20
sprite 2, x,y,2
SIZE SPRITE 2,150,150
SET SPRITE 2,1,1

If x>640:x=0:endif
if y>0:y=330:endif
if x>0:y=330:endif
if x<0:x=0:endif
sync
loop

NOTE- It will not work on your computer because you don't have the bitmap and wave files.
Quote: "[/quote][quote]"
Quote: "[/quote][quote]"
[quote]
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 22nd Nov 2004 06:02
A fake loading sequence. Oh dear.

There's a lot of code there that is useless. Like playing a sound then immeadiately looping it. And adjusting the y value by 0?!

Here's a Mario-like game I made:



Probably not any help, I just wanted to show it off.
It doesn't need any media just shove it into DBPro and compile.
Controls - Arrows, +, -, 0

Have fun.
Cairne
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location: The Internet
Posted: 22nd Nov 2004 07:47
I'm going to take the wild and random assumption that you want the stuff on screen to scroll from left to right when you move. The only answer I can come up with is to instead of making your character sprite move, make everything but the main character move when you want him to move.

Ok, probably not the greatest method to make the screen scroll, and it might take a while, but its the best I can come up with.

I use darkbasic classic and i practically have no experience.
Bio Fox
20
Years of Service
User Offline
Joined: 11th Nov 2004
Location: The BioFox Bunker
Posted: 23rd Nov 2004 04:41
I don't have DarkBASIC Pro. Should I get it if I want to make 2D games?[quote]"My one weakness... SMOOTH JAZZ!!!" - CreamerMan

Login to post a reply

Server time is: 2024-11-27 14:33:03
Your offset time is: 2024-11-27 14:33:03