Qbasicnews.com

Full Version: RPG
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey i am makeing an RPG and i want to make like a zelda type game where when you get to the edge of the screen it move to show more of the map. but i cant figue out how
hey thanks. i ws lost and didnt know what to do. i am new to qbasic.
How new are you? Have you used stuff like BASIC and whatnot? Anything simiilar to QBASIC? A zelda-type RPG might be a little tough for a beginner, right rel?
hey i have been learning qbasic for about three months now. i have no book i am downloading tutorials to teach me how to do different thing. i have made loads of cheesy program like pacman and hangman so i decided it was time tomake an RPG. it was real simple no maps no graphics it was all worded and you were in a ten by ten box. i was able to get in fights and what not and they fought back. but then i wanted to add maps and stuff then i got the idea to make a map the size of the screen and place a person on the screen and move him and fight badguy face to face like ZELDA for example. i downloaded that scroll program and i am reading the code to teach myself what it means and what it does.
If you get stuck anywhere in the code, you can ask me. :*). Big Grin
ok. i have a quick question about the code. the AF.Print sub it prints a bunch of pixels and it is not readable. how do i fix that?
Have you been messing around with the code or something, cuz it works perfectly here...
this is what i have that was in the sroll.zip file.


SUB AF.Print (Xpos%, Ypos%, Text$, col%)
'Prints the standard 8*8 CGA font
'Paramenters:
'Segment=the Layer to print to
'Xpos,Ypos=the coordinates of the text
'Text$=the string to print
'col= is the color to print(gradient)

X% = Xpos%
Y% = Ypos%
Spacing% = 8
For I% = 0 To Len(Text$) - 1
X% = X% + Spacing%
Offset% = 8 * Asc(Mid$(Text$, I% + 1, 1)) + 14
For J% = 0 To 7
DEF SEG = &HFFA6
Bit% = PEEK(Offset% + J%)
If Bit% And 1 Then PSet (X%, Y% + J%), col% + J%
If Bit% And 2 Then PSet (X% - 1, Y% + J%), col% + J%
If Bit% And 4 Then PSet (X% - 2, Y% + J%), col% + J%
If Bit% And 8 Then PSet (X% - 3, Y% + J%), col% + J%
If Bit% And 16 Then PSet (X% - 4, Y% + J%), col% + J%
If Bit% And 32 Then PSet (X% - 5, Y% + J%), col% + J%
If Bit% And 64 Then PSet (X% - 6, Y% + J%), col% + J%
If Bit% And 128 Then PSet (X% - 7, Y% + J%), col% + J%
Next J%
Next I%
DEF SEG

End Sub
Try re-downloading and run it
Pages: 1 2