Results 1 to 3 of 3

Thread: Code/tutorial for the developing the "board" part of a board game

  1. #1
    Join Date
    Apr 2014
    Posts
    34
    Thanks
    14
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11

    Default Code/tutorial for the developing the "board" part of a board game

    Hello,

    I am looking for source code for board games like Life, Sorry, Monopoly, or Risk (or similar turn-based games with a static game board). Specifically, I am trying to figure out how to develop the "board" part of a board game. I am familiar with using a QWidget and its paintEvent() function. I've used that to display a Tic-Tac-Toe board. But I am not sure if using this method is appropriate for a board game that has more complex tiles and tokens and interactions.

    I have been looking at QT Graphics View framework; but I have not been able to relate the examples to what I am trying to accomplish. I was hoping there might be QT code out there for a finished board game like the ones I've mentioned above; but it there is, it's well hidden, because I haven't found any after several Google search attempts.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,239
    Thanks
    303
    Thanked 865 Times in 852 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Code/tutorial for the developing the "board" part of a board game

    If your board is static, you could use an image instead of some complex graphics / view construct. If you do want to use graphics view, you could use a QGraphicsPixmapItem as the parent item, and make your tokens and other movable items children of that.

    I don't know of any Qt apps where source code is available, but there might be something in KDE (which is Qt-based).
    Last edited by d_stranz; 23rd November 2015 at 21:35.

  3. The following user says thank you to d_stranz for this useful post:

    SpiceWeasel (24th November 2015)

  4. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Code/tutorial for the developing the "board" part of a board game

    If you are looking for the source of a Qt board game (or any other type of application) then indeed, as d_stranz already said, it makes sense to look at the code of the biggest Qt Open Source project: KDE.
    Since you mentioned Risk: https://www.kde.org/applications/gam...rk/development

    Cheers,
    _

  5. The following user says thank you to anda_skoa for this useful post:

    SpiceWeasel (24th November 2015)

Similar Threads

  1. single board computer embeddede board, mini2440v2, sky2440v2
    By wujianwen in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 2nd November 2016, 07:29
  2. QT Simple board game
    By Damiank2708 in forum Qt Programming
    Replies: 0
    Last Post: 20th November 2015, 14:39
  3. Replies: 2
    Last Post: 31st July 2012, 08:55
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  5. Help with Board Game!
    By drake1983 in forum Newbie
    Replies: 3
    Last Post: 8th July 2007, 03:22

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.