Qbasicnews.com

Full Version: Making sprites and how to make them move around given area?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
ok , how would i go about creating a sprite and how would i mke it move around the page with the arrow keys??

also i am makin a text based rpg and i finished the char. generator but i dont know how to make it save the info into a directory and then wen the person goes back and wants to load that character how do i make it so that the settings will load back again??

here is my code if u need it:

Quote:Cls
Color 28
Print "**********************************************************************"
Print "*****************************Dragon Slayer****************************"
Print "**********************************************************************"
Print ""
Print ""
Color 2
Print "BY: EveWare"
Print "Programmed By: Alex Briner"
Print ""
Print "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
While INKEY$ <> "": Wend
While INKEY$ = "": Wend
Main:
Cls
Color 3
Print "*************************** Dragon Slayer Main ***********************"
Print ""
Print ""
Print "----------------------------------------------------------------------"
Print " | 1. Load Game | 3. Credite | 5. Exit |"
Print " | 2. New Game | 4. About | |"
Print " | | | |"
Print "----------------------------------------------------------------------"
Print ""
Print ""
INPUT "What is your choice? ", Selection%
If Selection% = 1 Then GoTo Load
IF Selection% = 2 THEN GOTO New
If Selection% = 3 Then GoTo Credits
If Selection% = 4 Then GoTo About

Load:
Cls
Print "Not Done With This Section yet"
Print "Try After Program is done"
While INKEY$ <> "": Wend
While INKEY$ = "": Wend
GoTo Main

New:
Cls
Color 28
Print "*********************************************************************"
Print "***************** Character Creator *******************************"
Print "*********************************************************************"
Print ""
Print ""
Color 2
Print "========================================"
INPUT "What Is your characters Name?", Name$
INPUT "What is your character height?", Height%
INPUT "What is your characters Eye Color?", Eye$
INPUT "What is your characers Age?", Age%
Print "========================================"
INPUT "What Race Is Your Character?", Race$
INPUT "What Class is your Character?", Class$
Print ""
Print ""
Print ""
Print "Press Any Key"
While INKEY$ <> "": Wend
While INKEY$ = "": Wend
Cls
Print "Character Info"
Print "------------------------------------"
Print Name$; " Is your Characters Name"
Print Height%; " Is your character Height"
Print Eye$; "Is your characters Eye Color"
Print Age%; "Is your characters Age"
Print "Your Character is a "; Class$
Print "And It is a "; Race$
Print "------------------------------------"
Print ""
Print ""
Print ""
Print ""
Print ""
Print "Press any key to continue"
While INKEY$ <> "": Wend
While INKEY$ = "": Wend
GoTo Main

Credits:
Cls
Color 5
Print ")(()()(()())()())()()()()()()()()()()()()(()()()()()()()()()()(()()()()"
Print "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
Print "***********************************************************************"
Print "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
Print " DRAGON SLAYER"
Print " By Alex Briner"
Print "#######################################################################"
Print "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
Print "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
While INKEY$ <> "": Wend
While INKEY$ = "": Wend
GoTo Main

About:
Cls
Print "Great RPG By ALEX BRINER"
While INKEY$ <> "": Wend
While INKEY$ = "": Wend
GoTo Main
Try going here...

http://www.qbasicnews.com/tutorials.php?...view&id=10

That should cover almost all of it...But i cant help you with the save/load thing.
You could do the save feature like this:

To save:
Code:
open "game.sav" for output as #1
print #1, charactername$
print #1, level
print #1, hp
print #1, whatever
close

To load it:
Code:
open "game.sav" for input as #1
input #1, charactername$
input #1, level
input #1, hp
input #1, whatever
close

Hope this helps.
just a few tips:

-dragon slayer aint original at all
-i dunno what tut u were pointed to, but wanna start by learning bitmapping and stuff...check darkdreads rpg tut and also the tut about it in the qbnews tuts (prob the 1 u were pointed to)
-use some sort of protection on ur save files,cuz ne1 could open it and cheat...save in binary or use simple encryption
I'am only replying about the sprite thigy ::

ok this is how I see what you are asking :
Quote:please make me a program that move sprite around with arrow keys

well that aint gonna work amigo (unless there is stupid guy out there that wan't to do it).

what you should ask is pointer on how to do it not ask ppl to code it for you
Quote:I'am only replying about the sprite thigy ::

ok this is how I see what you are asking :
Quote:please make me a program that move sprite around with arrow keys

well that aint gonna work amigo (unless there is stupid guy out there that wan't to do it).

what you should ask is pointer on how to do it not ask ppl to code it for you
Where did he say that?
@ RST
Quote:You could do the save feature like this:

To save:
Code:

open "game.sav" for output as #1
print #1, charactername$
print #1, level
print #1, hp
print #1, whatever
close



To load it:
Code:

open "game.sav" for input as #1
input #1, charactername$
input #1, level
input #1, hp
input #1, whatever
close

thanks for the pointer! that will come in good use!


@aetherfox
Quote:-dragon slayer aint original at all
well i no that name isnt original. im just makin a measly little game to get use to rpg makin in qbasic so i can get the drift of wats goin on.


@L_O_J

Code:
I'am only replying about the sprite thigy ::

ok this is how I see what you are asking :
Quote:
please make me a program that move sprite around with arrow keys  


well that aint gonna work amigo (unless there is stupid guy out there that wan't to do it).

what you should ask is pointer on how to do it not ask ppl to code it for you

hmm..... i didnt ever recall sayin that. to bad some people dont like to help out people (him). well thanks for the people that actually helped out! (not him)