Poll: What challenge should the first one be about.
You do not have permission to vote in this poll.
A game
100.00%
7 100.00%
Size based program
0%
0 0%
Other(please post below)
0%
0 0%
Total 7 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New Challenge Forum
#31
Quote:Pseduo bad entry ;-)

Code:
SCREEN 13

time! = TIMER
DO: del = del + 1: LOOP UNTIL TIMER - time! > .05
time2 = TIMER

FOR i = 0 TO 360
DRAW "M160,100TA" + STR$(i) + "C0L5C0C15U10R10D10L10"
FOR dell = 0 TO del: NEXT dell
WAIT 986, 8
CLS
NEXT i

lol. that works, I guess. I read it as 'cube', not 'box', though... started digging up my trig rotations. sin and cos...
#32
Wow..... someone actually knows how to use the DRAW command......

[edit] oh hey, 100 posts..... do i get money or anything?[/edit]
b]Hard Rock[/b]
[The Stars Dev Company] [Metal Qb flopped] [The Terror]
Stop Double Posts!
Whats better? HTML or Variables?
#33
Yeah, I prefer to take the easiest/simplest apporach ;-) 2D rotating.. 3d would probably have gone down well.

Quote:Wow..... someone actually knows how to use the DRAW command......

Back in my day... before we had libraries.. hehe nah I think I've just used qb for ages and have messed around a lot(hence no projects/products of mine available). The DRAW command can be very useful albeit annoying ;-)
#34
hahaha can you believe it? I first used the DRAW command instead of PUT for sprites HAHAHAHAHHAA I'll look for the code to show it to you.

ANd I only had a 486DX2/66Mhz running uncompiled QBasic 1.1... Imagine the speed Big Grin

heh, I mean BITMAP SPRITES!!
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
#35
Hey... I first used GW-basic on my dad's Business Depot fodder 486-33. And I tried to make it display some sprites with Draw, too. They were a six cell monochromatic animation of a man running that I found in a (really, really) old book.
#36
Actually, a qb book I read, didn't even cover the put statement..., it seemed to focus more on using lines and circles :rotfl:...
#37
Heh it is really weird. I had an editor which placed the cursor in the middle of the screen and opened a file for output. You could be in drawing mode or moving mode. You could move in 8 directions using the keys Q W E D C X Z A. When you pressed the numbers or shift+number you could choose a colour.

It worked this way: If you pressed "A" (LEFT), a "L1" was added to the file. If you pressed "E" (UP RIGHT), a "E1" was added to your file. If you pressed "SHIFT+6" (LIGHT YELLOW), a "C14" was added to your file. If you were in drawing mode, the strings were written without alter, but if you were in moving mode a "B" was put before the commands.

Then, in your game, you opened the file and loaded its contents to a variable, say o$. Everytime you wanted to draw a sprite, you PRESET to the position and called a DRAW o$.

It is the weirdest way to draw a sprite that I've seen... Still looking for the code.

Anyhow, now that we are on this topic: Let's write the weirdest PUT (bitmaps) replacement! I'll post mine (explained above) when I find it, or maybe when I recode it.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
#38
Oh - I should be editing... I forgot that there are people who hate double posts Big Grin Big Grin just kidding. Well, I found something. And I consider that it is cleaner to post it separately. It is sumthing like this:

The Editor

Code:
x% = 0
y% = 0
SCREEN 7
PRINT "Your drawing will be saved to a file."
PRINT "You may press 'S' to close the file and"
PRINT "EXIT."
INPUT "File Name"; n$
CLS
PAINT (0, 0), 15
OPEN n$ FOR OUTPUT AS #1
LINE (128, 0)-(128, 128), 0
LINE (0, 128)-(128, 128), 0
mode% = 0   ' Not Drawing
c% = 0
oc% = POINT(8 * x%, 8 * y%)
COLOR 7
LOCATE 19, 1: PRINT " MOVE:QWEDCXZA         "
LOCATE 20, 1: PRINT " COL:[SHIFT]+12345670  "
LOCATE 21, 1: PRINT " ENTER:DRAW|SPACE:MOVE "
DO
  
   IF NOT mode% THEN
      LINE (8 * x%, 8 * y%)-(7 + 8 * x%, 7 + 8 * y%), oc%, BF
   ELSE
      LINE (8 * x%, 8 * y%)-(7 + 8 * x%, 7 + 8 * y%), c%, BF
   END IF
  
   k$ = UCASE$(INKEY$)
   SELECT CASE k$
      CASE "W":
         IF y% > 0 THEN
            IF NOT mode% THEN PRINT #1, "B";
            PRINT #1, "U1";
            y% = y% - 1
         END IF
      CASE "E":
         IF y% > 0 AND x% < 15 THEN
            IF NOT mode% THEN PRINT #1, "B";
            PRINT #1, "E1";
            y% = y% - 1
            x% = x% + 1
         END IF
      CASE "D":
         IF x% < 15 THEN
            IF NOT mode% THEN PRINT #1, "B";
            PRINT #1, "R1";
            x% = x% + 1
         END IF
      CASE "C":
         IF x% < 15 AND y% < 15 THEN
            IF NOT mode% THEN PRINT #1, "B";
            PRINT #1, "F1";
            x% = x% + 1
            y% = y% + 1
         END IF
      CASE "X":
         IF y% < 15 THEN
            IF NOT mode% THEN PRINT #1, "B";
            PRINT #1, "D1";
            y% = y% + 1
         END IF
      CASE "Z":
         IF y% < 15 AND x% > 0 THEN
            IF NOT mode% THEN PRINT #1, "B";
            PRINT #1, "G1";
            x% = x% - 1
            y% = y% + 1
         END IF
      CASE "A":
         IF x% > 0 THEN
            IF NOT mode% THEN PRINT #1, "B";
            PRINT #1, "L1";
            x% = x% - 1
         END IF
      CASE "Q":
         IF x% > 0 AND y% > 0 THEN
            IF NOT mode% THEN PRINT #1, "B";
            PRINT #1, "H1";
            x% = x% - 1
            y% = y% - 1
         END IF
      CASE CHR$(13):
         mode% = -1
      CASE " ":
         mode% = 0
      CASE "1" TO "7", "0": c% = VAL(k$): PRINT #1, "C" + k$;
      ' This is mapped for Spanish keyboard.
      ' These are the symbols which can be gotten pressing the
      ' keys 1-7 and 0 with Shift.
      ' Change for your keyboard layout.
      CASE "!": c% = 9: PRINT #1, "C9";
      CASE CHR$(34): c% = 10: PRINT #1, "C10";' ["] character = 34.
      CASE "ú": c% = 11: PRINT #1, "C11";
      CASE "$": c% = 12: PRINT #1, "C12";
      CASE "%": c% = 13: PRINT #1, "C13";
      CASE "&": c% = 14: PRINT #1, "C14";
      CASE "/": c% = 15: PRINT #1, "C15";
      CASE "=": c% = 8: PRINT #1, "C8";
      CASE "S": EXIT DO       ' GOTO Fin, originally

   END SELECT

   oc% = POINT(8 * x%, 8 * y%)
   IF mode% THEN
      LINE (8 * x%, 8 * y%)-(7 + 8 * x%, 7 + 8 * y%), c%, BF
      LINE (8 * x%, 8 * y%)-(7 + 8 * x%, 7 + 8 * y%), 15 - c%, B
   ELSE
      LINE (8 * x%, 8 * y%)-(7 + 8 * x%, 7 + 8 * y%), 15 - oc%, B
   END IF

LOOP
Fin:
CLOSE #1
SYSTEM

The SUB which draws it

Code:
DECLARE SUB SCRPUT (x%, y%, o$)
' SPRPUT.BAS
SCREEN 7
INPUT "Sprite filename"; sp$
OPEN sp$ FOR INPUT AS #1
LINE INPUT #1, o$
PRINT "DRAW COMMAND:"
PRINT o$
PRINT : PRINT "PRESS A KEY"
SLEEP: k$ = INKEY$: CLS : PAINT (0, 0), 15
CLOSE #1
WHILE INKEY$ = ""
x% = INT(RND * 320)
y% = INT(RND * 200)
SCRPUT x%, y%, o$
WEND

SUB SCRPUT (x%, y%, o$)
   PRESET (x%, y%)
   DRAW o$
END SUB

Sample sprite
(Cut and paste to notepad, REMOVE THE LINE BREAKS [it should be in ONE SINGLE LINE!!] then save it as sprite.spr, and load it from the previous code) (I've broken the lines 'cause the whole thing screwed the forum layout)

Code:
BF1BF1BF1BF1BR1BR1BR1BU1BL1R1R1R1D1L1C12L1L1D1L1R1R1
R1D1L1L1U1U1C7R1C10C12R1C7F1C8D1D1C4F1F1R1L1H1H1L1
L1L1G1L1H1H1F1F1R1E1R1D1D1D1R1U1U1R1D1D1D1C2L1L1G1
G1D1D1C6L1L1R1U1R1C2U1E1E1R1R1D1D1F1R1C6R1D1U1U1

Weird, isn't it?
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
#39
Yeah...
#40
I made a weird kind of put routine once, it used "compressed" sprites...
It wasn't working very good, though :lol:.
I can't find the code for it...


Forum Jump:


Users browsing this thread: 1 Guest(s)