Results 1 to 4 of 4

Thread: Game programming basic questions?

  1. #1
    Join Date
    Mar 2009
    Posts
    104
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Game programming basic questions?

    Hi,

    i review a lot of forums dedicated to gaming, but i need info how to do it using QT.

    1.The difference in using QPaint and OpenGL?
    2.What is the best approach if i want to make a game using raster graphic for example game like BigFishgames with background and another
    pictures that move around?
    3.Is OpenGL only for vector graphic?
    4.Some examples of simple game made with QT?

    Thanks in advance

  2. #2
    Join Date
    Aug 2009
    Location
    Greece, Chania
    Posts
    63
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Game programming basic questions?

    OpenGL is an API to produce 2D or 3D graphics while QPaint* classes are used to draw something in your application whether it's a widget or something else. If you want to create a classic 2D game I would suggest SDL, a lot simpler than OpenGL api (that doesn't mean you can't do it with Qt ).

    Some examples
    Tetris using QtScript-> Script Tetrix Example
    Tetris using Qpaint* classes (Qt 4.3 doc)-> Tetrix Example
    Asteroids using graphics view framework-> Ported Asteroids Example
    Examples with openGL(not games but it'll give you and idea)-> http://doc.trolltech.com/4.6/examples-opengl.html
    Misha R.evolution - High level Debugging IDE

    Programming is about 2 basic principles: KISS and RTFM!!!

  3. #3
    Join Date
    Mar 2009
    Posts
    104
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Game programming basic questions?

    Thank you a lot

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Game programming basic questions?

    Quote Originally Posted by unix7777 View Post
    1.The difference in using QPaint and OpenGL?
    QPainter is a painting frontend, OpenGL is a painting backend that can be used by QPainter.

    2.What is the best approach if i want to make a game using raster graphic for example game like BigFishgames with background and another
    pictures that move around?
    Probably QGraphicsView.
    3.Is OpenGL only for vector graphic?
    Well.... in general yes. You can do raster graphics with it using shaders or keeping sprites as textures and manipulating rectangles but I wouldn't call it straightforward (but essentially if you use QPainter with OpenGL backend that's what you get).
    4.Some examples of simple game made with QT?
    There are some in Qt docs, there is Google Earth... ups... that's not a game..., also "WolfenQt" (it's on Qt Labs) is a nice example of what you can do with Qt.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. 2 basic questions?
    By unix7777 in forum Newbie
    Replies: 5
    Last Post: 28th January 2010, 09:44
  2. Starting game programming using Qt
    By sophister in forum Qt Programming
    Replies: 4
    Last Post: 4th November 2009, 05:31
  3. Basic Qt Questions
    By BalaQT in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2009, 17:13
  4. a basic questions!!
    By unix7777 in forum Newbie
    Replies: 1
    Last Post: 28th March 2009, 19:10
  5. QGraphicsView and game programming
    By ball in forum Newbie
    Replies: 5
    Last Post: 9th January 2007, 21:14

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.