I need some help with Qbasic in several diffurent topics I would be more than grateful if you could answer them.
How do you insert the mouse in Qbasic ?
I need some plain intructions to insert the mouse in Qbasic.
How do you add sound-music to Qbasic ?
I need to learn how to add sound and/or music in Qbasic for this game I am programming.
How do make moving characters (one or more)
I need to create moving characters for a game I am making
Mouse,sound and motion questions
1)
2) Look around for BWSB, uGL (mod routines) or DMAPLAY
3)
Code: Select all
REM $DYNAMIC
DEFINT A-Z
SUB Mouse (AX%, bx%, CX%, DX%)
MouseData$ = "5589E58B5E0C8B07508B5E0A8B07508B5E088B0F8B5E068B175B581E07CD33538B5E0C8907588B5E0A89078B5E08890F8B5E0689175DCA0800"
Mousei$ = SPACE$(57)
FOR I% = 0 TO 56
a$ = MID$(MouseData$, 1 + I% * 2, 2)
H$ = CHR$(VAL("&H" + a$))
MID$(Mousei$, 1 + I%, 1) = H$
NEXT I%
DEF SEG = VARSEG(Mousei$)
Mousey% = SADD(Mousei$)
CALL Absolute(AX%, bx%, CX%, DX%, Mousey%)
'AX% = 0 'MouseInit
'AX% = 1 'MouseShow
'AX% = 2 'MouseHide
'AX% = 3 'MouseStatus
'AX% = 4 'MousePut
'CX% = x% 'MousePut
'DX% = y% 'MousePut
'lb% = -((bx% AND 1) <> 0) 'MouseStatus
'rb% = -((bx% AND 2) <> 0) 'MouseStatus
'Xmouse% = CX% 'MouseStatus
'Ymouse% = DX% 'MouseStatus
END SUB
3)
Code: Select all
screen 13
for a = 0 to 100
pset (a-1, 100), 0 'erasae the old image (only a pixel in the ex.)
pset (a,100), 15 'draw the chacarcter (only a pixel in the ex.)
next
If you need more help, check the tutorials section. I have found several tutorials you might find useful, but there are many more (over 300 total).
Using the Mouse:
http://www.petesqbsite.com/sections/tut ... tutor4.txt
Sound tutorials:
http://www.petesqbsite.com/sections/tut ... html#Sound
Making (character) animations:
http://www.petesqbsite.com/sections/tut ... aphics.txt
http://www.petesqbsite.com/sections/tut ... _smith.htm
http://www.petesqbsite.com/sections/tut ... nimate.zip
Using the Mouse:
http://www.petesqbsite.com/sections/tut ... tutor4.txt
Sound tutorials:
http://www.petesqbsite.com/sections/tut ... html#Sound
Making (character) animations:
http://www.petesqbsite.com/sections/tut ... aphics.txt
http://www.petesqbsite.com/sections/tut ... _smith.htm
http://www.petesqbsite.com/sections/tut ... nimate.zip