omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    [share] Grid-based game for Pythonista

    Pythonista
    4
    25
    16068
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chriswilson
      chriswilson last edited by

      Hi @omz
      I'm glad you're getting the hang of the game. Thanks for the pull request - I've merged it. The squares thing is now fixed as well - it must have changed during my edits earlier. Seems to working fine now.

      Thanks again!

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by omz

        @chriswilson Oh, one other thing: Are you on Twitter? I sometimes tweet about cool projects that are made with Pythonista, and I'd like to give proper credit (I'll just link to your GitHub otherwise). There is a chriswilson, but that doesn't seem to be you.

        1 Reply Last reply Reply Quote 0
        • chriswilson
          chriswilson last edited by

          @omz Unfortunately I'm not on Twitter (yet). Feel free to link to my GitHub repo though. Thanks!

          1 Reply Last reply Reply Quote 0
          • chriswilson
            chriswilson last edited by

            Oh and I should say thanks to @Cethric and @JonB who helped with some queries in this post last month.

            1 Reply Last reply Reply Quote 1
            • omz
              omz last edited by

              @chriswilson Thanks, I've posted a little video (with custom color scheme).

              1 Reply Last reply Reply Quote 1
              • chriswilson
                chriswilson last edited by

                @omz Thanks! I like the colours!

                1 Reply Last reply Reply Quote 0
                • omz
                  omz last edited by

                  @chriswilson I just noticed a little bug: When you start the game while the device is in landscape mode, the layout isn't calculated correctly, because you're using get_screen_size, and the width/height are swapped in this situation. Could be fixed like this, for example:

                  screen_w, screen_h = min(get_screen_size()), max(get_screen_size())
                  
                  Webmaster4o 1 Reply Last reply Reply Quote 1
                  • chriswilson
                    chriswilson last edited by

                    @omz Thanks. That fix works a treat! I'll commit it to GitHub shortly.

                    1 Reply Last reply Reply Quote 0
                    • Webmaster4o
                      Webmaster4o @omz last edited by

                      @omz @chriswilson A shorter solution is just to write

                      screen_w, screen_h = sorted(get_screen_size())
                      
                      1 Reply Last reply Reply Quote 2
                      • chriswilson
                        chriswilson last edited by

                        I've noticed that the timer does not always reset when closing the settings screen and I cannot figure out why! The cancel() and save_settings() functions both call the new_game() method, and a new grid is made, but sometimes the timer is part-way through its cycle. Any ideas?

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB Forums | Contributors