Announcement

Collapse
No announcement yet.

A little game for the PB community

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    A little game for the PB community

    I have posted a game in the source code forum.

    The layout for the game was designed with PBForms.
    DDT used throughout the game.

    The game involves switching the colors of labels, and since it is the first game I ever wrote, I thought I'd share it.

    Rod
    Rod
    In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

    #2
    Just a comment: The green and Yellow are VERY alike for the color blind people.

    I would suggest: Purple, Red, Green and Blue.

    Comment


      #3
      I was having trouble seeing the green no matter what it was beside.
      I figured that anyone that wanted other colors could do a simple 'Find' and 'Replace All'.

      Rod
      Rod
      In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

      Comment


        #4
        Originally posted by Elias Montoya View Post
        Just a comment: The green and Yellow are VERY alike for the color blind people.

        I would suggest: Purple, Red, Green and Blue.
        Depending on the type of color blindness, those could be just as bad

        Comment


          #5
          Code:
          === USER SETUP ======
          
            Color 1      [     ]   <pick>
            Color 2      [     ]   <pick>
            Color 3      [     ]   <pick>
            Color 4      [     ]  <pick>
          
          ...
           ======
           LOCAL CC AS ChooseColor
           ,,,,
            iRet = ChooseColor (CC)
            IF ISTRUE iRet THEN
               UserChoice = CC.rgbResult
               ...
          MCM
          Michael Mattias
          Tal Systems (retired)
          Port Washington WI USA
          [email protected]
          http://www.talsystems.com

          Comment


            #6
            Originally posted by Rodney Hicks View Post
            I was having trouble seeing the green no matter what it was beside.
            I figured that anyone that wanted other colors could do a simple 'Find' and 'Replace All'.

            Rod
            I did, but there were several matches. I gave up. :P
            Michael's suggestion is very good.

            Comment


              #7
              The advantage of posting this for programmers is that they can adjust what they think needs adjusting. I was trying to keep it as simple as possible so those newer to PB might be able to follow it better.

              However, there are several things that in hindsight I could have done differently. Like the dropping and the shifting of the colors. It would have been simpler for coding to have started at the bottom left instead of the top left. I should have been able to use 'ARRAY DELETE" as a filter to shift the colors, but I never even thought about it until I was finishing.

              Something that came to me while coding this was that if there was some way that PBForms could make use of a FOR/NEXT loop there would have been a lot fewer lines of code. I suppose I could have done that myself but I wanted others to see that PBForms does a fine job when you let it, even if it doesn't use all the tools in the toolbox.

              Another thing that occurred to me was that in a SELECT/CASE block when you use a range of values such as :
              Code:
              SELECT CASE AS LONG idvalue
              CASE 100 to 200
              ....
              that you cannot do
              Code:
              SELECT CASE AS LONG idvalue
              CASE 100 to 200 STEP 4
              ...
              It would have been handy.(Don't know that it should be on any wish list though)

              Yes Michael's idea is a good one, but I never considered that color choices would be too important for programmers since they can adjust the code to their wishes.

              Other than issuing a few exes to friends and family, this game is going no further since I really don't do games.

              Rod
              Rod
              In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

              Comment


                #8
                Code:
                SELECT CASE AS LONG idvalue
                   CASE 100 to 200 STEP 4
                ...It would have been handy.(Don't know that it should be on any wish list though
                ===>
                Code:
                SELECT CASE AS LONG idvalue
                   CASE 100 TO 200
                     IF idvalue MOD 4 = 0 
                          yadda yadda
                     END IF
                   CASE....
                (Also, I think you could have used arrays to eliminate many, many lines of sourcecode)
                Michael Mattias
                Tal Systems (retired)
                Port Washington WI USA
                [email protected]
                http://www.talsystems.com

                Comment


                  #9
                  I never even considered MOD for that, silly me.

                  Also, I think you could have used arrays to eliminate many, many lines of sourcecode
                  The ARRAY DELETE would have made them essential. And I really wish I'd gone that way, but since time was a wastin, I decided to post it the way I did. It would run a little faster but since someone playing the game is wasting time already, what's a little more time?

                  It got to be a case of "Once I get my mind made up, don't confuse me with the facts."
                  Rod
                  In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

                  Comment


                    #10
                    I'm not color blind so the colors are just fine for me.

                    I had a dream about that "stupid" game. Finished Level-1 and Level-2 wound up being a game of Tetris.
                    There are no atheists in a fox hole or the morning of a math test.
                    If my flag offends you, I'll help you pack.

                    Comment


                      #11
                      Rod,

                      I tried running the game but nothing happens. The screen fills up with colored labels but nothing happens when clicking on them.
                      It's a pretty day. I hope you enjoy it.

                      Gösta

                      JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
                      LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

                      Comment


                        #12
                        Originally posted by Gösta H. Lovgren-2 View Post
                        Rod,
                        ...nothing happens...
                        Click the "New Game" button.
                        There are no atheists in a fox hole or the morning of a math test.
                        If my flag offends you, I'll help you pack.

                        Comment


                          #13
                          Thanks, Rodney, for a neat game!
                          Regards,
                          Bob

                          Comment


                            #14
                            Originally posted by Mel Bishop View Post
                            Click the "New Game" button.
                            And is located where? I see no buttons.

                            Just looked and see where Buttons are added in "The Heap" dialog but they don't show on the screen. I had to run an "extra line deleter" utility I use to eliminate the extra lines added when C&P'ing from the Code window. Maybe that whacked something up.
                            It's a pretty day. I hope you enjoy it.

                            Gösta

                            JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
                            LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

                            Comment


                              #15
                              I had to run an "extra line deleter" utility I use to eliminate the extra lines added when C&P'ing from the Code window.
                              Take a look at Adam Drake's "Clipboard Listener" in Source Code Forum. Very, very handy for copying posted code.

                              I'm not normally this effusive about stuff I find in the source code forum, but this program was really nicely thought out in terms of its user interface and ease of use.. definitely one of the better "designs" I've found. (I am big on design).

                              MCM
                              Michael Mattias
                              Tal Systems (retired)
                              Port Washington WI USA
                              [email protected]
                              http://www.talsystems.com

                              Comment


                                #16
                                Robert- you're welcome!
                                Michael-thank you for the kind words.
                                Alexander-thank you, now we all have two games.

                                Rod
                                Rod
                                In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

                                Comment


                                  #17
                                  Finally broke a 1,000,000 on this game. Level 10. First time to that level as well.
                                  I was at first a little disappointed in how tough the game was to advance levels, but since it took me, the perpetrator, 52 day to get to that score, I figure to get some good mileage from the game. I should have put an elapsed time feature in it.

                                  Rod
                                  Rod
                                  In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

                                  Comment

                                  Working...
                                  X
                                  😀
                                  🥰
                                  🤢
                                  😎
                                  😡
                                  👍
                                  👎