Qbasicnews.com
November 15, 2019, 09:32:02 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Poll
Question: What challenge should the first one be about.  (Voting closed: September 07, 2002, 11:59:54 AM)
A game - 4 (57.1%)
Size based program - 2 (28.6%)
Other(please post below) - 1 (14.3%)
Total Voters: 7

Pages: [1] 2 3
  Print  
Author Topic: New Challenge Forum  (Read 28911 times)
wildcard
*.*
Administrator
__/--\__
*****
Posts: 2369



« on: August 31, 2002, 11:59:54 AM »

Welcome to the new challenge forum. There will be a weekly or bi-weekly challenges. Each challenge will require different skills to the previous ones. So for the first challenge I've let it be decided by a poll for the type of challenge.

Each challenge should not take long to complete but there will be no maximum time allowed(therefore take as much time as you need).
Logged
wildcard
*.*
Administrator
__/--\__
*****
Posts: 2369



« Reply #1 on: September 01, 2002, 01:35:37 PM »

The poll seems to show a game but it'll only finish within 6 more days, after then the challenge will be posted.
Logged
Neo
Na_th_an
*****
Posts: 2150



« Reply #2 on: September 02, 2002, 05:15:07 AM »

You can also do a GFX-Demo compo.

Making a graphical or sound demo. (Or somethin' else).

-Neo
Logged
LooseCaboose
I hold this place together
*****
Posts: 981



« Reply #3 on: September 02, 2002, 05:41:35 AM »

Im a bit of a geek so I like the more mathy challenges.

I dont know how many people would be interested but you could hold an obfuscated qb code contest. The object is to create a complete program that does something, but is almost impossible to understand. www.ioccc.org hold an obfuscated C code contest every year (I have a half finished entry).

I have done some cool coding challenges where you have to write a program (usually only a few lines) to perform a certain task, but with heavy constraints (such as only being allowed one for-loop or not using some statements), this really challenge peoples ability to use a language to its fullest.

Just my 2 cents
Logged

esus saves.... Passes to Moses, shoots, he scores!
Neo
Na_th_an
*****
Posts: 2150



« Reply #4 on: September 02, 2002, 07:08:57 AM »

Writing very complex programs, that do something simple, sound good  :bounce: !

-Neo
Logged
wizardlife
Na_th_an
*****
Posts: 1456


WWW
« Reply #5 on: September 02, 2002, 01:55:46 PM »

Well, if you intend us to finish it within a week or two, it'll have to be relatively simple. I recommend that most or all of the challenges be pureQB. That way there isn't preference to one library (since often one is more appropriate than another in a particular situation -- eg. DirectQB has more functions like rotation and scaling and so on, but RelLib is faster.)

I also propose that rather than having really general stuff like 'make a cool minigame', give very specific direction like 'make a platformer that sidescrolls in Screen 12 and involves a multiple on-screen projectile weapon, and allows the player to perform at least five basic operations: Left, Right, Jump, Duck, and Fire.

Evaluation should be on a per-contest basis. As in, a different rubric for each time around. Fun Factor, Graphics, and GUI might be categories in a game, but in a graphical demo, it might be more like Ingenuity, First Impression, and Attention to Detail.

Finally, having a contest every single week isn't necessarily a good idea. Particularly with us all going back to school this week. For the example I laid out above, a more realistic deadline would be two or three months down the road. But that doesn't mean the forum would have to fall silent for that time: Each entrant could start a thread for their project and then post updates and screenshots and whatever other hype material.

Just my suggestions.
Logged

na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #6 on: September 02, 2002, 02:03:32 PM »

I vote for wizardlife's suggestions.

Also I challenge you all to write a short program which inputs your name and writes "Hello, "+name$ on screen without using PRINT, INPUT nor INKEY$. C'mon!!
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
wildcard
*.*
Administrator
__/--\__
*****
Posts: 2369



« Reply #7 on: September 02, 2002, 03:57:31 PM »

Agreed, I'm aimimg for different aspects for each challenge. I think I'll move them to a monthly or bi-monthly minimum(time isn't always freely available, I know).
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #8 on: September 03, 2002, 11:01:47 AM »

Oh - Nobody even tried... Here's my sollution Cheesy Cheesy Cheesy

The input routine needs much improvement as it doesn't still support all the keys nor CAPS / ALT+GR combinations, but, oh well, I coded this straight from scratch in ten minutes... Don't ask me more Cheesy

Code:

DECLARE SUB myLocate (xx%, yy%)
DECLARE FUNCTION myInput$ ()
DECLARE SUB NL ()
DECLARE SUB myPrint (a$)
DECLARE SUB myCls ()
DECLARE SUB ScrollScreen ()
' Write an INPUT "what's your name";a$:PRINT "Hello "+a$ program without
' using INPUT nor PRINT nor INKEY$

DIM SHARED myPrintX%, myPrintY%
DIM SHARED kc$(127)      ' Far from complete

DIM SHARED MaxKey%

myCls

tecladata:
kc$(1) = CHR$(27)
kc$(2) = "1"
kc$(3) = "2"
kc$(4) = "3"
kc$(5) = "4"
kc$(6) = "5"
kc$(7) = "6"
kc$(8) = "7"
kc$(9) = "8"
kc$(10) = "9"
kc$(11) = "0"
kc$(12) = "-"
kc$(13) = "+"
kc$(14) = CHR$(8)

kc$(15) = CHR$(9)
kc$(16) = "q"
kc$(17) = "w"
kc$(18) = "e"
kc$(19) = "r"
kc$(20) = "t"
kc$(21) = "y"
kc$(22) = "u"
kc$(23) = "i"
kc$(24) = "o"
kc$(25) = "p"
kc$(26) = "{"
kc$(27) = "}"
kc$(28) = CHR$(13)

kc$(29) = CHR$(0)
kc$(30) = "a"
kc$(31) = "s"
kc$(32) = "d"
kc$(33) = "f"
kc$(34) = "g"
kc$(35) = "h"
kc$(36) = "j"
kc$(37) = "k"
kc$(38) = "l"
kc$(39) = ":"
kc$(40) = CHR$(34)
kc$(41) = "~"

kc$(42) = CHR$(0)
kc$(43) = "|"
kc$(44) = "z"
kc$(45) = "x"
kc$(46) = "c"
kc$(47) = "v"
kc$(48) = "b"
kc$(49) = "n"
kc$(50) = "m"
kc$(51) = "<"
kc$(52) = ">"
kc$(53) = "?"
kc$(54) = CHR$(0)

kc$(55) = "*"
kc$(56) = CHR$(0)
kc$(57) = " "
kc$(58) = CHR$(0)
kc$(59) = "F1"
kc$(60) = "F2"
kc$(61) = "F3"
kc$(62) = "F4"
kc$(63) = "F5"
kc$(64) = "F6"
kc$(65) = "F7"
kc$(66) = "F8"
kc$(67) = "F9"

kc$(68) = "F10"
kc$(69) = CHR$(0)
kc$(70) = CHR$(0)

kc$(71) = "7"
kc$(72) = "8"
kc$(73) = "9"
kc$(74) = "-"
kc$(75) = "4"
kc$(76) = "5"
kc$(77) = "6"
kc$(78) = "+"
kc$(79) = "1"
kc$(80) = "2"
kc$(81) = "3"
kc$(82) = "0"
kc$(83) = "."
kc$(84) = "END!"
MaxKey% = 84

myPrint "Enter your name: "
a$ = myInput
NL
myPrint "Hello, " + a$ + "!"

SUB myCls
   myPrintX% = 1
   myPrintY% = 1
   CLS
END SUB

FUNCTION myInput$
   t% = 0
   o$ = ""
   x% = myPrintX%
   y% = myPrintY%
   myLocate x%, y%
   myPrint ">"
   x% = x% + 1
   WHILE NOT t%
      ' Clear buffer
      DEF SEG = &H40
      POKE &H1A, PEEK(&H1C)      ' Head = Tail so clear :)
      DEF SEG
      ' Inp:
      k% = INP(&H60)
      IF k% < MaxKey% THEN
         ch$ = kc$(k%)
         SELECT CASE ch$
            CASE CHR$(8):
               IF LEN(o$) > 0 THEN
                  o$ = LEFT$(o$, LEN(o$) - 1)
               END IF
            CASE CHR$(13):
               t% = -1
            CASE ELSE
               o$ = o$ + ch$
         END SELECT
         WHILE INP(&H60) = k%: WEND    ' Depress
      END IF
      myLocate x%, y%
      myPrint o$ + "_ "
   WEND
   myInput$ = o$
END FUNCTION

SUB myLocate (xx%, yy%)
   myPrintX% = xx%
   myPrintY% = yy%
END SUB

SUB myPrint (a$)
   DEF SEG = &HB800
   FOR i% = 1 TO LEN(a$)
      m$ = MID$(a$, i%, 1)
      POKE (myPrintX% - 1) * 2 + (myPrintY% - 1) * 160, ASC(m$)
      myPrintX% = myPrintX% + 1
      IF myPrintX% = 81 THEN
         myPrintX% = 1
         myPrintY% = myPrintY% + 1
         IF myPrintY% = 26 THEN
            ScrollScreen
            myPrintY% = 25
         END IF
      END IF
   NEXT i%
   DEF SEG
END SUB

SUB NL
   ' CRLF :)
   myPrintX% = 1
   myPrintY% = myPrintY% + 1
   IF myPrintY% = 26 THEN
      ScrollScreen
      myPrintY% = 25
   END IF
END SUB

SUB ScrollScreen
   DEF SEG = &HB800
   FOR y% = 1 TO 24
      FOR x% = 0 TO 79
         POKE (y% - 1) * 160 + x% * 2, PEEK(y% * 160 + x% * 2)
   NEXT x%, y%
   FOR x% = 0 TO 79
      POKE 25 * 160 + x% * 2, 32
   NEXT x%
   DEF SEG
END SUB
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
wildcard
*.*
Administrator
__/--\__
*****
Posts: 2369



« Reply #9 on: September 03, 2002, 06:48:26 PM »

Sorry na_th_an but I caused some problems on the site by accident so many people can't access it unless they know to go via http://hybd.net/~qbnews
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #10 on: September 04, 2002, 08:56:15 AM »

Oh, please don't worry about that Wink
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
wildcard
*.*
Administrator
__/--\__
*****
Posts: 2369



« Reply #11 on: September 05, 2002, 09:34:37 PM »

Ok, but it is still very frustrating not to be able to access your own site as well as everyone else accessing.
Logged
wizardlife
Na_th_an
*****
Posts: 1456


WWW
« Reply #12 on: September 05, 2002, 10:24:00 PM »

Yeah, getting stuff on the screen is easy: just POKE it to &hB800. But receiving input is a different story. I would have done it with LINE INPUT or INPUT(1), two keyboard I/O commands you forgot to list.  :king:
Logged

BlueKeyboard
Wandering Guru
***
Posts: 337



WWW
« Reply #13 on: September 08, 2002, 07:12:24 AM »

A new challenge:
A program that clears the screen(SCREEN 13), without using any of qb's drawing commands, like PSET, CIRCLE, LINE, CLS(hehe), PUT.
You can't use * or FOR either...
I don't think it's impossible... Cheesy.
Logged

na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #14 on: September 08, 2002, 10:21:08 AM »

Done: HAHAHAH! Cheesy

Code:

SCREEN 13
PRINT "Hello!"
PRINT "Dummy"
PRINT "Press a key to delete"
SLEEP:K$=INKEY$
SCREEN 13
PRINT "Deleted! :D"


Also

Code:

SCREEN 13:DEF SEG=&HA000
BSAVE "CLS", 0,64000
PRINT "Hello!"
PRINT "Dummy"
PRINT "Press a key to delete"
SLEEP:K$=INKEY$
BLOAD "CLS"
PRINT "Deleted! :D"


Wizardlife: saying INPUT I meant EVERY INPUT commands (INPUT a$, LINE INPUT a$, INPUT(1), INPUT$...) Cheesy Wink  :rotfl:
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!