QB text-based graphical screensaver in *just* 7 lines. - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QbasicNews.Com (http://qbasicnews.com/newforum/forum-3.html) +--- Forum: Challenges (http://qbasicnews.com/newforum/forum-10.html) +--- Thread: QB text-based graphical screensaver in *just* 7 lines. (/thread-4716.html) |
QB text-based graphical screensaver in *just* 7 lines. - Adigun A. Polack - 09-20-2004 Much _grandly_ dearest all of you QB45/QB71 community, I welcome you all to my very latest and next challenge in QB which is this: create a text-based graphical screensaver in QuickBASIC or MS-DOS QBasic in only seven (7) lines! After the success of Relsoftâs 9-liners, I thought I am gonna now test you on this one just to see how VERY EXCELLENT you *really* are at your text-based graphics coding in QB, only to get all of you so warmed up and ready to sharpen up your programming skills a little bit. So here we go, shall we? !! _______________________________________________________ H E R E ⢠A R E ⢠T H E ⢠R U L E S :
Here now is a *real* example from me on how it is to be done: Code: '8 0 x 5 0 T E L E V I S I O N S T A T I C So, what are you waiting for? Prepare to devise up your RATHER BEST screensaver/demo of this kind, whether it is plasma- or fire-based or what have you!! I mean, hey, I want to see some really fine ones from you, as I am truly encouraging you as passionately as I can to do this!!! !! Talk to you all again, and do your very best!!! :king: !! WISHING YOU ALL DEFINITELY GOOD FORTUNE ON THIS INTERESTING CHALLENGE, Adigun Azikiwe Polack One of the Founders of âAura Flowâ Continuing Developer of âFrantic Journeyâ Current Developer of âStar Angelic Sluggerâ Webmaster of the âAAP Official Projects Squadâ EDIT (on September 20, 2004): Last night, I posted to you an incorrect example which was: Code: ' T W I N W H I R L W I N D O F C O L O R S In the very first three (3) replies of this thread, they commented about that code placed just above this piece of text, so *please* disregard that example and go for that other example of mine where the rules are. Thanks!! ! ______________________________________ T H E ⢠T H I R D ⢠C A L I B E R ⢠H A S ⢠C U R R E N T L Y ⢠A R R I V E D ! ! ! !! Now encouraging even more positive originality than ever before, and even featuring exclusive QB challenges based on the 2004 Athens Olympic Games, too!!! ;*) ! Got game for the QuickBASIC Caliber Programming Compo 2004/2005? Then I challenge you to please visit http://dhost.hopto.org/aapproj/qbcpc/. That means YOU, pal! QB text-based graphical screensaver in *just* 7 lines. - Antoni Gual - 09-20-2004 Adigun: Your example submission does'nt abide by the rules, so it should be diaqualified. Code: 4 PRINT " " + CHR$(176) + CHR$(177) + CHR$(178) + CHR$(219) + CHR$(219) + CHR$(178) + CHR$(177) + CHR$(176) + " " + CHR$(176) + CHR$(177) + CHR$(178) + CHR$(219) + CHR$(219) + CHR$(178) + CHR$(177) + CHR$(176) You used space chars , so you don't fullfill rule nr 7. QB text-based graphical screensaver in *just* 7 lines. - KiZ - 09-20-2004 Wow... i think i got epilepsy after running that in full screen. O_O *dizzy* QB text-based graphical screensaver in *just* 7 lines. - TheBigBasicQ - 09-20-2004 dizzy :o x.x I got a quick correction to make here myself. - Adigun A. Polack - 09-21-2004 To all of you that replied: I am *very* sorry about my first example causing some epilepsy and dizziness problems. That is why from my opening post of this thread, I have just today changed the example to my brand-new one to fix the problem. ! And to you, Antoni: You are absolutely right about the space marks and stuff, so thank you very much for spotting that error. :wtnod: ! You know, according to the rules that I have placed up there, the output of the space marks are sure grounds for disqualification here, so, I appreciate your helpful support here!! See you all later, and enjoy yourselves!! - Adigun Azikiwe Polack One of the Founders of âAura Flowâ Continuing Developer of âFrantic Journeyâ Current Developer of âStar Angelic Sluggerâ Webmaster of the âAAP Official Projects Squadâ QB text-based graphical screensaver in *just* 7 lines. - Meg - 09-21-2004 Here you go. This is my first submission. Wrote it at work, so don't expect much. ^_^ EDIT: I recognize that if you let this program run a very long time you could theoretically overflow the char.x& and char.y& variables just on random chance. However, I wanted to submit this quickly and didn't have the time to put a cap check on the first two lines of the program. *peace* Meg. Code: 'Seven Line Screensaver (submission #1) Adigun, if I may make a comment on your code: Quote:1 WIDTH 80, 50 you could combine lines 3-5 into one line: Code: LOCATE INT(RND(1) * 48) + 1, INT(RND(1) * 78) + 1 This would free up two lines of program to use for something else! Re: I got a quick correction to make here myself. - KiZ - 09-21-2004 Quote:To all of you that replied: Dont worry man, the screen saver was fine, just running so fast it made me dizzy. Nothing wrong with it though! Keep up the good work, in programming and in setting us all challenges =) Meg: Well spotted Letâs dish out some encouragement around here now. ^-^ - Adigun A. Polack - 09-21-2004 To Dark_prevail: Thank you so much on that, my man, as it is truly such an honor to have you and others like that around here!! ^_- ! And going now to you, Meg: Quote:Adigun, if I may make a comment on your code: Wow, YOUâRE REALLY CLEVER! I mean, it is such awesome strategies like yours that will no doubt help and even inspire people to create even more spectactular 7-liners of this kind that I am currently talking about, so *very* splendidly done for you now!!! d=^-^=b ! (As for your first 7-line submission, Meg, all you forgot to do was to describe to me in the remark line(s) what your thing was all about, so could you correct your code a little bit with that before I accept your entry, okay please? Thanks so much!!) See you both once again, and to the rest of you, I will welcome your creative entries (just be sure to read the rules of this challenge *first* at the beginning of this thread before you contribute one, please!). Once again, best of ace coding to you all!! ;*) - Adigun Azikiwe Polack One of the Founders of âAura Flowâ Continuing Developer of âFrantic Journeyâ Current Developer of âStar Angelic Sluggerâ Webmaster of the âAAP Official Projects Squadâ QB text-based graphical screensaver in *just* 7 lines. - Meg - 09-21-2004 Hah! In my 7-line submission, lines 3 and 6 are redundant! >:D Now I have another line to work with :) *peace* Meg EDIT: Adigun, I've been looking at both of our programs, and finding ways to optimize them and free up more lines. Your initial program: Quote:1 WIDTH 80, 50 Can be recoded like this: Code: 1 WIDTH 80, 50 The four characters in the string there are CHR$(176), CHR$(177), CHR$(178), and CHR$(219) but I'm not sure they display correctly. I'm working on an updated submission that uses these changes, as well. EDIT: This is my most current program Code: '7-line screensaver (submission #2) This still has line 3 free. Not sure what to do with it, yet. This is really stretching what can go on one line! - Meg - 09-22-2004 This is another 6-liner, but it's really cramming a lot of stuff onto a few lines. Code: '7-Line Screensaver (Submission #3) EDIT: Adigun, using this "counter" IF/ELSE method, you could rewrite your original program in just 3 lines: Code: 1 IF i = 0 THEN WIDTH 80, 50 ELSE IF i = 1 THEN COLOR 8, 0 ELSE IF i = 2 THEN LOCATE INT(RND * 48) + 1, INT(RND * 78) + 1 ELSE IF i = 3 THEN PRINT MID$("ââââ", INT(RND * 4) + 1, 1); c(>.³)b *peace* Meg. |