New prog!
- Posted by Matthew A Nunyabidness <matt1421 at JUNO.COM> Sep 17, 1998
- 585 views
I wrote a color band program in Euphoria and QuickBASIC(just a comparison). See for yourself the speed: band.ex: include graphics.e --include graphics file include get.e integer smode --declare smode smode=graphics_mode(19) --equal to mode 13 in QuickBASIC for a=0 to 256 do pixel(a,{a,0}) pixel(a,{a,1}) pixel(a,{a,2}) pixel(a,{a,3}) pixel(a,{a,4}) pixel(a,{a,5}) pixel(a,{a,6}) pixel(a,{a,7}) pixel(a,{a,8}) pixel(a,{a,9}) pixel(a,{a,10}) pixel(a,{a,11}) pixel(a,{a,12}) pixel(a,{a,13}) end for puts(1,"\n\nThe color band, by matt1278 at juno.com") puts(1,"\nEnjoy!") if smode then end if puts(1,"\nHit any key") object wkey wkey=wait_key() if wkey then end if smode=graphics_mode(-1) clear_screen() band.bas: CLS SCREEN 13 FOR a = 1 TO 256 FOR b = 1 TO 10 PSET (a, b), a NEXT b NEXT a LOCATE 3, 1 PRINT "The color band rewritten in QB 4.5" PRINT "Contact matt1278 at juno.com for questions and comments" PRINT "Hit any key" SLEEP SCREEN 0 WIDTH 80, 25 CLS Try it out! Band.ex is wwwwwwwaaaaaaayyyyyyyy faster. I bet it would be even s-l-o-w-e-r in QBasic. QBasic is slower than QuickBASIC. But I think the compiled version of band.bas(on my trusty disk here) is fast too. Try binding band.ex! If you think you can enhance it or something, email me. If you have any tips on how to make a screen mode in Euphoria or BASIC(256 colors, 640x480 graphics, 80x25 text), tell me!!!!!!!!!!!!! Screen 13 is the best I can get, but I want a finer resolution.