Author Topic: Competition  (Read 35261 times)

0 Members and 1 Guest are viewing this topic.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Competition
« on: October 02, 2021, 08:25:34 am »
Quick question... Is anyone from this site participating in the Syntaxbomb competition... or is that a bite of a taboo topic? Just curious...
Logic is the beginning of wisdom.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Competition
« Reply #1 on: October 02, 2021, 08:27:21 am »
Got a link?  Never heard of it.  😘
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Competition
« Reply #3 on: October 02, 2021, 12:50:26 pm »
Unless the competition is exclusively in SCREEN 0, then no.

Kidding aside, I wish Rob had finished his Zaxon clone he made 10+ years ago. It really showcased the power of the then still infant QB64. I suppose that now a lot of the entries would be 3-D, but we do have a few OpenGL enthusiasts parked around here, somewhere. Did you intend to enter?

Pete

How can we prove intelligent life exists on other planets? Simple, they won't visit here!
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: Competition
« Reply #4 on: October 02, 2021, 01:02:34 pm »
at first I thought: what a ridiculous limitation, only one key or button, how could one possibly write an interesting game with that limitation, but then I thought that it would be simple enough to make a "pop the balloons" game where a rectangle moves randomly across a screen full of balloons and you hit the key to pop the balloon that the rectangle targets, or you could make other similar games

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #5 on: October 02, 2021, 01:06:08 pm »
Flappy Bird pretty much is a single key game.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #6 on: October 02, 2021, 01:08:58 pm »
I started a discussion about accessing all letters and numbers (for menu) with a single key here:
https://www.qb64.org/forum/index.php?topic=4239.msg136134#msg136134

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Competition
« Reply #7 on: October 03, 2021, 01:14:25 am »
You could make a Defender clone with one button. Just have the ship shoot continuously as it simultaneously moves upwards to the top of the screen and reappears at the bottom. Take your finger off the button, and it stops elevating and shooting. You could make the ship in the shape of a hand, with the middle finger extended forward, and name it, Windows Offender.

By the way, the forum crashed again, while I was trying to post ths.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Competition
« Reply #8 on: October 03, 2021, 04:49:02 am »
How about that Trex runner? One click to duck; double-click to jump; release to run... Just a thought...
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #9 on: October 03, 2021, 08:28:06 am »
This is Screen 0, One Key Game I made from my variation of Cryptogram Puzzle:
Code: QB64: [Select]
  1. _Title "One Key Challenge - Cryptogram Puzzle" ' b+  started One Key Challenge 2021-09-25
  2. ' from Cryptogram Puzzle   2021-09-09
  3. ' 2021-09-07 intended for QB64 home programming entertainment use only."
  4. ' Thank you Best Life ref: https://bestlifeonline.com/funny-short-jokes/"
  5. '
  6. ' 2021-10-02 installed new GetInput but it needs a chunk of screen space setup
  7. ' Have it basically working now for some cleanp. Move the file into data statements.
  8. ' Make a utility to do this.
  9.  
  10. Dim Shared Answer$ '  beginning phrase to be guessed    '   3 stages of the Puzzle
  11. Dim Shared Coded$ '   hidden in code
  12. Dim Shared Working$ ' decoded and solved when working$ becomes = ucase$(answer$)
  13. Dim Shared Letters$(1 To 26) ' for coding and highlited letters
  14. Dim Shared LCodes$(1 To 26) '  for code and decode by number 1 to 26
  15. Dim Shared Guesses$(1 To 26) ' track all the guess to decode
  16. Dim Shared HighLited ' cursor over letters to guess
  17. Dim Shared Mode
  18. _FullScreen 'I guess it does make it easier to tell E from F...
  19. Dim jokes$(1 To 100)
  20. For i = 1 To 100
  21.     Read r$
  22.     If r$ <> "EOD" Then jokes$(i) = r$: jCount = jCount + 1 Else Exit For
  23. restart:
  24. Answer$ = jokes$(Int(Rnd * jCount) + 1)
  25. For i = 1 To 26: Guesses$(i) = "-": Next 'setup the display guesses array
  26. For i = 1 To 26 ' use letters for display of letters to pick second and to create a code
  27.     Letters$(i) = Chr$(i + 64)
  28.     LCodes$(i) = Letters$(i) ' these will convert between each other by index number
  29. For i = 26 To 2 Step -1 ' shuffle the letters in LCode$()
  30.     Swap LCodes$(i), LCodes$(Int(Rnd * i) + 1)
  31. Coded$ = "": Working$ = "" ' reset for next go around
  32. For i = 1 To Len(Answer$) 'third: put the phrase in coded$ and hide it in working$
  33.     a = Asc(UCase$(Answer$), i)
  34.     If a >= 65 And a <= 90 Then
  35.         Coded$ = Coded$ + LCodes$(a - 64)
  36.         Working$ = Working$ + "*"
  37.     Else
  38.         Coded$ = Coded$ + Mid$(Answer$, i, 1)
  39.         Working$ = Working$ + Mid$(Answer$, i, 1)
  40.     End If
  41. HighLited = 1 'setup done start game
  42. Mode = 1
  43.     Mode = 1 - Mode
  44.     DisplayScreen
  45.     k$ = GetInput$(61, 22)
  46.     If Mode = 0 Then ' highlight a letter
  47.         'm replaces arrows and mouse select of highlited 1 to 26 for letters
  48.         test = InStr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", k$)
  49.         If test > 0 Then HighLited = test
  50.         test = InStr("1234", k$)
  51.         If test > 0 Then
  52.             Select Case test
  53.                 Case 1: GoSub do1: Mode = 1
  54.                 Case 2: GoSub do2: Mode = 1
  55.                 Case 3: GoSub do3: Mode = 1
  56.                 Case 4: GoSub do4: Mode = 1
  57.             End Select
  58.         End If
  59.     Else
  60.         Select Case k$
  61.             Case "1": GoSub do1
  62.             Case "2": GoSub do2
  63.             Case "3": GoSub do3
  64.             Case "4": GoSub do4
  65.             Case "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"
  66.                 Guesses$(HighLited) = k$ ' for screen updates
  67.                 For i = 1 To Len(Working$)
  68.                     If Letters$(HighLited) = Mid$(Coded$, i, 1) Then Mid$(Working$, i, 1) = k$
  69.                 Next
  70.         End Select
  71.     End If
  72.     _Limit 60
  73. Loop Until Working$ = UCase$(Answer$)
  74. DisplayScreen
  75. Color 1, 2
  76. cp 17, "You got it!    5 secs to next puzzle..."
  77. GoTo restart
  78.  
  79. do1: ' display answer
  80. Working$ = UCase$(Answer$) ' show the answer$ guesses correct moves to next puzzle
  81. DisplayScreen
  82.  
  83. do2: ' get decode letter for highlighted Letter
  84. For i = 1 To 26
  85.     If LCodes$(i) = Letters$(HighLited) Then c$ = Chr$(i + 64): Exit For
  86. Guesses$(HighLited) = c$ ' for screen updates
  87. For i = 1 To Len(Working$)
  88.     If Letters$(HighLited) = Mid$(Coded$, i, 1) Then Mid$(Working$, i, 1) = c$
  89.  
  90. do3: ' find a uncoded letter
  91. Color 15, 2: Locate 24, 40: Print "Select Find Letter"
  92. d$ = GetInput(61, 22)
  93. c$ = LCodes$(Asc(d$) - 64)
  94. Guesses$(Asc(c$) - 64) = d$
  95. For i = 1 To Len(Working$)
  96.     If c$ = Mid$(Coded$, i, 1) Then Mid$(Working$, i, 1) = d$
  97.  
  98. do4: ' clear guess letter from code letter
  99. Guesses$(HighLited) = "-"
  100. For i = 1 To Len(Working$)
  101.     If Letters$(HighLited) = Mid$(Coded$, i, 1) Then Mid$(Working$, i, 1) = "*" ' clear the letter
  102.  
  103. 'one liners
  104. Data "What kind of exercise do lazy people do? Diddly-squats."
  105. Data "What do you call a pony with a cough? A little horse!"
  106. Data "What is Forrest Gump's password? 1Forrest1."
  107. Data "Why did the M&M go to school? He wanted to be a Smartie."
  108. Data "What did one traffic light say to the other? Stop looking at me, I'm changing!"
  109. Data "What do you call bears with no ears? B."
  110. Data "What's a foot long and slippery? A slipper!"
  111. Data "Why do French people eat snails? They don't like fast food!"
  112. Data "What's red and moves up and down? A tomato in an elevator!"
  113. Data "I invented a new word today: Plagiarism."
  114. Data "What is sticky and brown? A stick!"
  115. Data "How does a rabbi make coffee? Hebrews it!"
  116. Data "Rest in peace boiling water. You will be mist!"
  117. Data "How do you throw a space party? You planet!"
  118. Data "Want to hear a construction joke? Oh never mind, I'm still working on that one."
  119. Data "Why don't scientists trust atoms? Because they make up everything!"
  120. Data "I hate Russian dolls they're so full of themselves!"
  121. Data "Talk is cheap? Have you ever talked to a lawyer?"
  122. Data "Why did the gym close down? It just didn't work out!"
  123. Data "Two artists had an art contest. It ended in a draw!"
  124. Data "A plateau is the highest form of flattery."
  125. Data "I have a fear of speed bumps. But I am slowly getting over it."
  126. Data "You can only get spoiled milk from a pampered cow."
  127. Data "What do you call a boomerang that doesn't come back? A stick!"
  128. Data "You know what I saw today? Everything I looked at."
  129. Data "What are a shark's two most favorite words? Man overboard!"
  130. Data "If we shouldn't eat at night, why do they put a light in the fridge?"
  131. Data "Have you ever tried eating a clock? It's really time-consuming, especially if you go for seconds."
  132. Data "Why are ghosts such bad liars? Because they are easy to see through."
  133. Data "It's cleaning day so naturally, I've already polished off a whole chocolate bar."
  134. Data "What did the buffalo say when his son left for college? Bison!"
  135. Data "Here, I bought you a calendar. Your days are numbered now."
  136. Data "Where do fish sleep? In the riverbed."
  137. Data "What did one plate say to his friend? Tonight, dinner's on me!"
  138. Data "Where are average things manufactured? The satisfactory."
  139. Data "I tried to sue the airport for misplacing my luggage. I lost my case."
  140. Data "Why doesn't the sun go to college? Because it has a million degrees!"
  141. Data "I was wondering why the Frisbee was getting bigger, then it hit me."
  142. Data "I have many jokes about rich kids unfortunately none of them work."
  143. Data "What do you call a singing laptop? A Dell!"
  144. Data "Why was six afraid of seven? Because seven ate nine."
  145. Data "Why are skeletons so calm? Because nothing gets under their skin."
  146. Data "How do trees get online? They just log on!"
  147. Data "Some people think prison is one word but to robbers it's the whole sentence."
  148. Data "My girlfriend treats me like a god. She ignores my existence and only talks to me when she needs something."
  149. Data "Where does the sheep get his hair cut? The baa baa shop!"
  150. Data "Why did the orange stop? It ran out of juice!"
  151. Data "I never make mistakes. I thought I did once, but I was wrong."
  152. Data "What does the man in the moon do when his hair gets too long? Eclipse it!"
  153. Data "What did 0 say to 8? Nice belt!"
  154. Data "EOD"
  155.  
  156. Sub DisplayScreen
  157.     Color 11, 2: Cls
  158.     Color 1
  159.     cp 2, "*** One Key Challenge - Cryptogram Puzzle ***"
  160.     Color 7
  161.     cp 4, "All selections are made by pressing spacebar when letter or menu number is highlighted."
  162.     cp 5, "Solve by selecting a code letter then selecting a letter guess."
  163.     cp 6, "Use the _ steps to move down or up on last row."
  164.     cp 7, "Use the escape key to quit immediately."
  165.     cp 9, "To get the answer and move onto next puzzle, select 1."
  166.     cp 10, "To decode current highlighted letter, select 2."
  167.     cp 11, "To solve a letter, select 3 and then select letter to find."
  168.     cp 12, "To clear a guess at highlighted letter, select 4."
  169.     Color 4
  170.     Locate 15, (120 - Len(Answer$)) / 2: Print Coded$
  171.     Color 11
  172.     Locate 16, (120 - Len(Answer$)) / 2
  173.     For i = 1 To Len(Answer$)
  174.         w$ = Mid$(Working$, i, 1): c$ = Mid$(Coded$, i, 1)
  175.         a$ = Mid$(Answer$, i, 1): h$ = Letters$(HighLited)
  176.         If w$ = "*" Then
  177.             pc$ = "*": If h$ = c$ Then Color 14, 0 Else Color 10, 2
  178.         Else
  179.             Color 10, 2: If w$ = UCase$(a$) Then pc$ = a$ Else pc$ = w$
  180.         End If
  181.         Print pc$;
  182.     Next
  183.     spaces = 9
  184.     For i = 1 To 26
  185.         If i = HighLited Then Color 14, 0 Else Color 4, 2
  186.         Locate 19, spaces: Print Letters$(i)
  187.         If i = HighLited Then Color 14, 0 Else Color 10, 2
  188.         Locate 20, spaces: Print Guesses$(i)
  189.         spaces = spaces + 4
  190.     Next
  191.     Color 15, 2: Locate 24, 40
  192.     If Mode Then Print "Guess Letter|Menu#" Else Print "Select Code Letter"
  193.  
  194. Sub cp (row, text$) ' center text on text screen
  195.     Locate row, (_Width - Len(text$)) / 2: Print text$
  196.  
  197. Function GetInput$ (LocateCol, LocateRow)
  198.     Dim g$(5)
  199.     g$(0) = "_ABCDE_"
  200.     g$(1) = "_FGHIJ_"
  201.     g$(2) = "_KLMNO_"
  202.     g$(3) = "_PQRST_"
  203.     g$(4) = "_UVWXY_"
  204.     g$(5) = "_Z1234_"
  205.     py = 0: px = 0
  206.     Do
  207.         If _KeyDown(27) Then System ' quit
  208.         GoSub show
  209.         lp = lp + 1
  210.         If lp = 60 Then
  211.             lp = 0
  212.             px = px + 1
  213.             If px > 6 Then px = 0
  214.         End If
  215.         If InKey$ = " " Then
  216.             If pick$ = "_" Then
  217.                 py = py + 1
  218.                 If py > 5 Then py = 0
  219.             Else
  220.                 GetInput$ = pick$: Exit Function
  221.             End If
  222.         Else
  223.         End If
  224.         'Locate 1, 40: Print py, px
  225.         _Limit 60
  226.     Loop
  227.     show:
  228.     For row = 0 To 5
  229.         For col = 0 To 6
  230.             If col = px And row = py Then Color 0, 15: pick$ = Mid$(g$(row), col + 1, 1) Else Color 15, 0
  231.             Locate LocateRow + row, LocateCol + col: Print Mid$(g$(row), col + 1, 1);
  232.         Next
  233.     Next
  234.     Color 15, 0
  235.     Return
  236.  
  237.  
  238.  

What do ya think? Competition ready? QB64 embarrassment?

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Competition
« Reply #10 on: October 03, 2021, 08:58:39 am »
Mini-golf would be great for this competition.

Imagine a bar with a slider going back and forth.  Click a button to stop it to set your angle.

Like this is my bar:  [……………………]

And then the slider moves back and forth:  […………………|…]

In this case, that’s to the far right.  (The | is my slider.)

Now, do the same thing a second time for power.

You now can shoot a ball, at various angles, with different levels of power, and try and get it to the target up the screen.


Simple interface.  One button interactive.  It’s a game — especially if you code it where 2 people can compete in it. 
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #11 on: October 03, 2021, 09:34:36 am »
Sounds interesting Steve, look forward to seeing it coded up ;-))

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #12 on: October 03, 2021, 10:02:37 am »
How about a competition here? 

Rules: One key, lets just say spacebar, and Screen 0 are only restrictions I can think of, by Halloween.
Maybe bonus consideration for Halloween themed game or puzzle.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Competition
« Reply #13 on: October 03, 2021, 11:51:28 am »
Hi boys and girls

@Steve you have described a my boxes demo with a power punch bar increasing pressing key and decreasing by time
So I could resume it from Ongoing folder.

@bplus  yes one key but not one key of keyboard, we can use also one button of mouse or one button of joystick....
so with buttons and menu you can do many things.

@All QB64 coders....
in programs folder  that ships with QB64 there is an ASCII game with loud sound, I have no found any reference to its author but he is Spanish or Latin people speaking Spanish language. I can argue watching the text used as output for users.
Right, the game can be optimized for output in ASCII graphic, for sound output, for input (now it uses two key, ESCAPE and UpArrow).
But it is politically uncorrect because the enemy to hit by bomb is always an antagonist of U.S.A.  So I think to change the framework story using the Spectre of 007 as bomber and adding some others countries in the list of enemies of Spectre.
Programming isn't difficult, only it's  consuming time and coffee

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #14 on: October 03, 2021, 12:49:12 pm »
Hi boys and girls

@Steve you have described a my boxes demo with a power punch bar increasing pressing key and decreasing by time
So I could resume it from Ongoing folder.

@bplus  yes one key but not one key of keyboard, we can use also one button of mouse or one button of joystick....
so with buttons and menu you can do many things.

@All QB64 coders....
in programs folder  that ships with QB64 there is an ASCII game with loud sound, I have no found any reference to its author but he is Spanish or Latin people speaking Spanish language. I can argue watching the text used as output for users.
Right, the game can be optimized for output in ASCII graphic, for sound output, for input (now it uses two key, ESCAPE and UpArrow).
But it is politically uncorrect because the enemy to hit by bomb is always an antagonist of U.S.A.  So I think to change the framework story using the Spectre of 007 as bomber and adding some others countries in the list of enemies of Spectre.

Yeah, Steve's thing sounds great for a gorilla throwing bananas at buildings sort of thing ;-))

Quote
@bplus  yes one key but not one key of keyboard, we can use also one button of mouse or one button of joystick....
so with buttons and menu you can do many things.

What?
I am hoping to get a little forum competition going:
* one key (the spacebar)
* screen 0
* Halloween Theme is plus
* Done by Halloween
Are you interested?

@TempodiBasic  the game you are describing from Samples sounds like something I dabbled with. Missile Command:
https://www.qb64.org/forum/index.php?topic=3978.msg133192#msg133192

It also reminds me of the throwing rocks thing with @SierraKen (Are you still looking in?)