Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
flying dot
#1
I made this a while ago and I was wondering if it could be used in games somehow, of course with modifications for each different game.

[syntax="qbasic"]SCREEN 13
'--------------------------|
'press "b" during to change|
'--------------------------|
x = 160: y = 180
B$ = "2"
DO
LINE (-1, -1)-(1, 1), 1, B
press$ = INKEY$

stimer = TIMER
DO: LOOP UNTIL TIMER > stimer + .001
ox = x: oy = y
IF press$ = "b" THEN
SELECT CASE B$
CASE "0"
B$ = "2"
CASE "1"
B$ = "0"
CASE "2"
B$ = "1"
END SELECT
END IF


qq = 15
IF press$ = CHR$(0) + "H" THEN yu = qq
IF press$ = CHR$(0) + "K" THEN xl = qq
IF press$ = CHR$(0) + "M" THEN xr = qq
IF press$ = CHR$(0) + "P" THEN yd = qq

'*********YU**************
yu = yu - 1
IF yu = -1 THEN yu = 0
y = y - yu
IF y < 0 OR y = 0 THEN y = 0
IF y > 199 THEN y = 199
'**************************


'*********YD**************
yd = yd - 1
IF yd = -1 THEN yd = 0
y = y + yd
IF y < 0 OR y = 0 THEN y = 0
IF y > 199 THEN y = 199
'**************************


'*********XR**************
xr = xr - 1
IF xr = -1 THEN xr = 0
x = x + xr
IF x < 0 OR x = 0 THEN x = 0
IF x > 319 THEN x = 319
'**************************


'*********XL**************
xl = xl - 1
IF xl = -1 THEN xl = 0
x = x - xl
IF x < 0 OR x = 0 THEN x = 0
IF x > 319 THEN x = 319
'**************************



IF ox <> x OR oy <> y THEN
IF B$ = "0" THEN
LINE (x, y)-(ox, oy), 1, B
PSET (x, y), 4: PSET (ox, oy), 4
END IF
PSET (x, y), 4
IF B$ = "2" THEN PSET (ox, oy), 0
END IF
IF x = 0 AND y = 0 THEN END
LOOP UNTIL press$ = CHR$(27)[/syntax]
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Reply
#2
Strange... Perhaps some programming notes on what it does

Anyway it might make an interesting maze type game were you lose if you run into a wall. But im not really sure what this thing is doing
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)