Author Topic: Competition  (Read 6982 times)

0 Members and 1 Guest are viewing this topic.

Offline johnno56

  • Forum Resident
  • Posts: 1166
  • Live long and prosper.
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: 3663
    • 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

  • Forum Resident
  • Posts: 7449
  • b = b + ...

Offline Pete

  • Forum Resident
  • Posts: 2303
  • Cuz I sez so, varmint!
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: 367
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

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

Offline bplus

  • Forum Resident
  • Posts: 7449
  • b = b + ...
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: 2303
  • Cuz I sez so, varmint!
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: 1166
  • Live long and prosper.
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

  • Forum Resident
  • Posts: 7449
  • b = b + ...
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]
_Title "One Key Challenge - Cryptogram Puzzle" ' b+  started One Key Challenge 2021-09-25
' from Cryptogram Puzzle   2021-09-09
' 2021-09-07 intended for QB64 home programming entertainment use only."
' Thank you Best Life ref: https://bestlifeonline.com/funny-short-jokes/"
'
' 2021-10-02 installed new GetInput but it needs a chunk of screen space setup
' Have it basically working now for some cleanp. Move the file into data statements.
' Make a utility to do this.

Randomize Timer: Width 120, 30
Dim Shared Answer$ '  beginning phrase to be guessed    '   3 stages of the Puzzle
Dim Shared Coded$ '   hidden in code
Dim Shared Working$ ' decoded and solved when working$ becomes = ucase$(answer$)
Dim Shared Letters$(1 To 26) ' for coding and highlited letters
Dim Shared LCodes$(1 To 26) '  for code and decode by number 1 to 26
Dim Shared Guesses$(1 To 26) ' track all the guess to decode
Dim Shared HighLited ' cursor over letters to guess
Dim Shared Mode
_FullScreen 'I guess it does make it easier to tell E from F...
Dim jokes$(1 To 100)
For i = 1 To 100
    Read r$
    If r$ <> "EOD" Then jokes$(i) = r$: jCount = jCount + 1 Else Exit For
Next
restart:
Answer$ = jokes$(Int(Rnd * jCount) + 1)
For i = 1 To 26: Guesses$(i) = "-": Next 'setup the display guesses array
For i = 1 To 26 ' use letters for display of letters to pick second and to create a code
    Letters$(i) = Chr$(i + 64)
    LCodes$(i) = Letters$(i) ' these will convert between each other by index number
Next
For i = 26 To 2 Step -1 ' shuffle the letters in LCode$()
    Swap LCodes$(i), LCodes$(Int(Rnd * i) + 1)
Next
Coded$ = "": Working$ = "" ' reset for next go around
For i = 1 To Len(Answer$) 'third: put the phrase in coded$ and hide it in working$
    a = Asc(UCase$(Answer$), i)
    If a >= 65 And a <= 90 Then
        Coded$ = Coded$ + LCodes$(a - 64)
        Working$ = Working$ + "*"
    Else
        Coded$ = Coded$ + Mid$(Answer$, i, 1)
        Working$ = Working$ + Mid$(Answer$, i, 1)
    End If
Next
HighLited = 1 'setup done start game
Mode = 1
Do
    Mode = 1 - Mode
    DisplayScreen
    k$ = GetInput$(61, 22)
    If Mode = 0 Then ' highlight a letter
        'm replaces arrows and mouse select of highlited 1 to 26 for letters
        test = InStr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", k$)
        If test > 0 Then HighLited = test
        test = InStr("1234", k$)
        If test > 0 Then
            Select Case test
                Case 1: GoSub do1: Mode = 1
                Case 2: GoSub do2: Mode = 1
                Case 3: GoSub do3: Mode = 1
                Case 4: GoSub do4: Mode = 1
            End Select
        End If
    Else
        Select Case k$
            Case "1": GoSub do1
            Case "2": GoSub do2
            Case "3": GoSub do3
            Case "4": GoSub do4
            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"
                Guesses$(HighLited) = k$ ' for screen updates
                For i = 1 To Len(Working$)
                    If Letters$(HighLited) = Mid$(Coded$, i, 1) Then Mid$(Working$, i, 1) = k$
                Next
        End Select
    End If
    _Limit 60
Loop Until Working$ = UCase$(Answer$)
DisplayScreen
Color 1, 2
cp 17, "You got it!    5 secs to next puzzle..."
_Delay 5: Cls
GoTo restart

do1: ' display answer
Working$ = UCase$(Answer$) ' show the answer$ guesses correct moves to next puzzle
DisplayScreen
Return

do2: ' get decode letter for highlighted Letter
For i = 1 To 26
    If LCodes$(i) = Letters$(HighLited) Then c$ = Chr$(i + 64): Exit For
Next
Guesses$(HighLited) = c$ ' for screen updates
For i = 1 To Len(Working$)
    If Letters$(HighLited) = Mid$(Coded$, i, 1) Then Mid$(Working$, i, 1) = c$
Next
Return

do3: ' find a uncoded letter
Color 15, 2: Locate 24, 40: Print "Select Find Letter"
d$ = GetInput(61, 22)
c$ = LCodes$(Asc(d$) - 64)
Guesses$(Asc(c$) - 64) = d$
For i = 1 To Len(Working$)
    If c$ = Mid$(Coded$, i, 1) Then Mid$(Working$, i, 1) = d$
Next
Return

do4: ' clear guess letter from code letter
Guesses$(HighLited) = "-"
For i = 1 To Len(Working$)
    If Letters$(HighLited) = Mid$(Coded$, i, 1) Then Mid$(Working$, i, 1) = "*" ' clear the letter
Next
Return

'one liners
Data "What kind of exercise do lazy people do? Diddly-squats."
Data "What do you call a pony with a cough? A little horse!"
Data "What is Forrest Gump's password? 1Forrest1."
Data "Why did the M&M go to school? He wanted to be a Smartie."
Data "What did one traffic light say to the other? Stop looking at me, I'm changing!"
Data "What do you call bears with no ears? B."
Data "What's a foot long and slippery? A slipper!"
Data "Why do French people eat snails? They don't like fast food!"
Data "What's red and moves up and down? A tomato in an elevator!"
Data "I invented a new word today: Plagiarism."
Data "What is sticky and brown? A stick!"
Data "How does a rabbi make coffee? Hebrews it!"
Data "Rest in peace boiling water. You will be mist!"
Data "How do you throw a space party? You planet!"
Data "Want to hear a construction joke? Oh never mind, I'm still working on that one."
Data "Why don't scientists trust atoms? Because they make up everything!"
Data "I hate Russian dolls they're so full of themselves!"
Data "Talk is cheap? Have you ever talked to a lawyer?"
Data "Why did the gym close down? It just didn't work out!"
Data "Two artists had an art contest. It ended in a draw!"
Data "A plateau is the highest form of flattery."
Data "I have a fear of speed bumps. But I am slowly getting over it."
Data "You can only get spoiled milk from a pampered cow."
Data "What do you call a boomerang that doesn't come back? A stick!"
Data "You know what I saw today? Everything I looked at."
Data "What are a shark's two most favorite words? Man overboard!"
Data "If we shouldn't eat at night, why do they put a light in the fridge?"
Data "Have you ever tried eating a clock? It's really time-consuming, especially if you go for seconds."
Data "Why are ghosts such bad liars? Because they are easy to see through."
Data "It's cleaning day so naturally, I've already polished off a whole chocolate bar."
Data "What did the buffalo say when his son left for college? Bison!"
Data "Here, I bought you a calendar. Your days are numbered now."
Data "Where do fish sleep? In the riverbed."
Data "What did one plate say to his friend? Tonight, dinner's on me!"
Data "Where are average things manufactured? The satisfactory."
Data "I tried to sue the airport for misplacing my luggage. I lost my case."
Data "Why doesn't the sun go to college? Because it has a million degrees!"
Data "I was wondering why the Frisbee was getting bigger, then it hit me."
Data "I have many jokes about rich kids unfortunately none of them work."
Data "What do you call a singing laptop? A Dell!"
Data "Why was six afraid of seven? Because seven ate nine."
Data "Why are skeletons so calm? Because nothing gets under their skin."
Data "How do trees get online? They just log on!"
Data "Some people think prison is one word but to robbers it's the whole sentence."
Data "My girlfriend treats me like a god. She ignores my existence and only talks to me when she needs something."
Data "Where does the sheep get his hair cut? The baa baa shop!"
Data "Why did the orange stop? It ran out of juice!"
Data "I never make mistakes. I thought I did once, but I was wrong."
Data "What does the man in the moon do when his hair gets too long? Eclipse it!"
Data "What did 0 say to 8? Nice belt!"
Data "EOD"

Sub DisplayScreen
    Color 11, 2: Cls
    Color 1
    cp 2, "*** One Key Challenge - Cryptogram Puzzle ***"
    Color 7
    cp 4, "All selections are made by pressing spacebar when letter or menu number is highlighted."
    cp 5, "Solve by selecting a code letter then selecting a letter guess."
    cp 6, "Use the _ steps to move down or up on last row."
    cp 7, "Use the escape key to quit immediately."
    cp 9, "To get the answer and move onto next puzzle, select 1."
    cp 10, "To decode current highlighted letter, select 2."
    cp 11, "To solve a letter, select 3 and then select letter to find."
    cp 12, "To clear a guess at highlighted letter, select 4."
    Color 4
    Locate 15, (120 - Len(Answer$)) / 2: Print Coded$
    Color 11
    Locate 16, (120 - Len(Answer$)) / 2
    For i = 1 To Len(Answer$)
        w$ = Mid$(Working$, i, 1): c$ = Mid$(Coded$, i, 1)
        a$ = Mid$(Answer$, i, 1): h$ = Letters$(HighLited)
        If w$ = "*" Then
            pc$ = "*": If h$ = c$ Then Color 14, 0 Else Color 10, 2
        Else
            Color 10, 2: If w$ = UCase$(a$) Then pc$ = a$ Else pc$ = w$
        End If
        Print pc$;
    Next
    spaces = 9
    For i = 1 To 26
        If i = HighLited Then Color 14, 0 Else Color 4, 2
        Locate 19, spaces: Print Letters$(i)
        If i = HighLited Then Color 14, 0 Else Color 10, 2
        Locate 20, spaces: Print Guesses$(i)
        spaces = spaces + 4
    Next
    Color 15, 2: Locate 24, 40
    If Mode Then Print "Guess Letter|Menu#" Else Print "Select Code Letter"
End Sub

Sub cp (row, text$) ' center text on text screen
    Locate row, (_Width - Len(text$)) / 2: Print text$
End Sub

Function GetInput$ (LocateCol, LocateRow)
    Dim g$(5)
    g$(0) = "_ABCDE_"
    g$(1) = "_FGHIJ_"
    g$(2) = "_KLMNO_"
    g$(3) = "_PQRST_"
    g$(4) = "_UVWXY_"
    g$(5) = "_Z1234_"
    py = 0: px = 0
    Do
        If _KeyDown(27) Then System ' quit
        GoSub show
        lp = lp + 1
        If lp = 60 Then
            lp = 0
            px = px + 1
            If px > 6 Then px = 0
        End If
        If InKey$ = " " Then
            If pick$ = "_" Then
                py = py + 1
                If py > 5 Then py = 0
            Else
                GetInput$ = pick$: Exit Function
            End If
        Else
        End If
        'Locate 1, 40: Print py, px
        _Limit 60
    Loop
    show:
    For row = 0 To 5
        For col = 0 To 6
            If col = px And row = py Then Color 0, 15: pick$ = Mid$(g$(row), col + 1, 1) Else Color 15, 0
            Locate LocateRow + row, LocateCol + col: Print Mid$(g$(row), col + 1, 1);
        Next
    Next
    Color 15, 0
    Return
End Function



What do ya think? Competition ready? QB64 embarrassment?

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3663
    • 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

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

Offline bplus

  • Forum Resident
  • Posts: 7449
  • b = b + ...
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: 1773
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

  • Forum Resident
  • Posts: 7449
  • b = b + ...
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?)