Results 1 to 6 of 6

Thread: QGraphicsView and game programming

  1. #1
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    3
    Thanked 5 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Examples of QGraphicsView

    Is anybody here knows that the new QGraphicsView class are fast enough to be using on game programming? Thanks.

  2. #2
    Join Date
    Jul 2006
    Posts
    27
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Examples of QGraphicsView

    What kind of game do you mean?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Examples of QGraphicsView

    Quote Originally Posted by grosem
    What kind of game do you mean?
    Good question, because it's surely fast enough for go or solitaire

  4. #4
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsView and game programming

    It is fast enough for sprite and tile based games. Think civilization, simcity, etc. One of the demos Trolltech provides is asteroids. If you're worried about frames per second, stick with OpenGL and use a QGLWidget. Otherwise QGraphicsView should work for most non-frenetic games.

  5. #5
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    3
    Thanked 5 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsView and game programming

    How about some game like Final Fantasy VII? It is 2-D in map which mixed with 3-D object and character, and is totally 3-D in battle scene.

  6. #6
    Join Date
    Jan 2006
    Location
    Norway
    Posts
    124
    Thanked 38 Times in 30 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsView and game programming

    It's fast enough for flat 2D games with mixed-in 3D characters as long as you don't transform the view. The background will be cached, and QGraphicsView will basically blit it over at close-to-no cost, but with several layers of 2D graphics (like you typically have in FF7/8 or all the old Sierra games), transforming the view will perform pretty bad on X11, and only slightly bad on the other platforms. I hope QGraphicsView will support general cacheing of items too in the future (QGraphicsSvgItem already does), but as for now the items need to be re-rendered and re-transformed for each expose.
    Bitto / Andreas Aardal Hanssen - andreas dot aardal dot hanssen at nokia
    Nokia Software Manager, Qt Development

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.