Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Scrabble
Qt 6.11 is out! See what's new in the release blog

Scrabble

Scheduled Pinned Locked Moved Unsolved Game Development
5 Posts 2 Posters 2.4k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    MFrost
    wrote on last edited by MFrost
    #1

    Hi,

    I want to create a Scrabble game and I don't really know, how best to construct the board.
    I'm thinking about using QGridLayout, but what type of widget should I put in it as squares? I need sth I can define the size and background and then implement a letter or overwrite it with another tile-like widget.

    Do you have some tips or suggestions for me?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Sounds like rather a job for QtQuick or the Graphics View framework

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • M Offline
        M Offline
        MFrost
        wrote on last edited by
        #3

        Thanks for an answer!

        Soo, considering Graphics View, how best to do it? How to create board, so that the tiles could only be dropped on the squares and I could write some conditions about them being correctly set? And how should I define tiles? I suppose, they could be QGraphicsRectItem objects. First I need to create the fixed set of them. Can I do this with an array, store them in a "bag" and then take random ones out into a players "rack" every round?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MFrost
          wrote on last edited by
          #4

          I found, how to specify positions: http://www.walletfox.com/course/qgraphicsrectitemdragdrop.php.
          What about other issues?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Take a look at the Graphics View examples. Several of your questions are already answered there.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved