Results 1 to 17 of 17

Thread: QT + SDL for games?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    85
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT + SDL for games?

    You did not write what kind of game you plan. If you want something with 3D you should learn OpenGL which you can use with SDL. AFAIK you can't render with Qt in a framebuffer. You simply have a special Qt Widget in which you can display your framebuffer.
    Maybe you want something like http://libufo.sourceforge.net That should be easier to integrate, it even has a sample SDL application. Do you know the http://nehe.gamedev.net tutorials?

  2. #2
    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: QT + SDL for games?

    personally I would suggest Ogre 3D Engine

    http://ogre3d.org/

  3. #3
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT + SDL for games?

    Irrlicht is much better and the integration may not be that hard since an example demonstrate how to render inside a native window.
    Current Qt projects : QCodeEdit, RotiDeCode

  4. #4
    Join Date
    Jan 2006
    Posts
    3
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QT + SDL for games?

    SDL was chosen because we don't wan't to lock out people with low-end machines, without 3D hardware. The game is 2D and uses an isometric tile-based view.
    So the QT OpenGL makes use of hardware acceleration?

  5. #5
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    85
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT + SDL for games?

    Yes, Qt Open GL is hardware accelerated. Otherwise you probably wouldn't use it

  6. #6
    Join Date
    Jan 2006
    Posts
    1
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT + SDL for games?

    Quote Originally Posted by Brazilian Joe
    SDL was chosen because we don't wan't to lock out people with low-end machines, without 3D hardware. The game is 2D and uses an isometric tile-based view.
    So the QT OpenGL makes use of hardware acceleration?
    Hi,

    when you mentioned SDL and isometric tiles, I immediatley think of Kyra. Its C++ built on top of SDL. It has specific code for isometric tiling.
    http://www.grinninglizard.com/kyra/
    I have a couple of unfinished games written in Kyra, and thought the API was easy, and the engine very powerful. But, if you're well into SDL already, this comment wont help
    Kyra has some basic widgets built in, enough for a simple UI, but obviously its no Qt and not intended to be.

    sorry if I'm getting off-topic, I love Qt for everything else, honest...

    all the best,
    barry
    Last edited by barryrs; 20th January 2006 at 11:56.

  7. #7
    Join Date
    Jan 2006
    Posts
    18
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QT + SDL for games?

    I'm making SDL-based game now. Some notes (my game is OpenGL-based)
    I thought about making it run inside Gl widget in Qt app.. But then thought it would be slow.
    Qt has nice classes to work with network, Qt has a great QString and other container classes. Maybe I'll use them linking to QtCore... But STL is not so bad, and parts of my app are from NVidia SDK that uses STL a lot.
    The main code is OpenGL + NV_linear

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

    Default Re: QT + SDL for games?

    Quote Originally Posted by Farcaller
    I'm making SDL-based game now. Some notes (my game is OpenGL-based)
    I thought about making it run inside Gl widget in Qt app.. But then thought it would be slow.
    Could you explain how would it be slow? QGLWidget uses normal OpenGL context to render its contents, being wrapped into a Qt widget shouldn't make it slower.

  9. #9
    Join Date
    Jan 2006
    Posts
    18
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QT + SDL for games?

    Quote Originally Posted by wysota
    Could you explain how would it be slow? QGLWidget uses normal OpenGL context to render its contents, being wrapped into a Qt widget shouldn't make it slower.
    I mean that application based on Qt is slower than SDL-based application. AFAIK, Qt's event loopis more complex than event loop in SDL.

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

    Default Re: QT + SDL for games?

    Take a look at its sources It's soooooooo complex!

  11. #11
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT + SDL for games?

    Quote Originally Posted by wysota
    Take a look at its sources...
    The best C++ tutor I've ever had

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
  •  
Qt is a trademark of The Qt Company.