Skip to content

Game Development

What can we say - we like games. And you can use Qt to write some. Questions? Ask here.
841 Topics 4.1k Posts

QtWS: Super Early Bird Tickets Available!

  • [Solved] D3D output in a Qt widget?

    8
    0 Votes
    8 Posts
    13k Views
    B

    Hey gpgpu, Thanks for your prompt reply. But I am actually looking for something different and I figured it out.

    @
    -> Create a QWidget
    -> Override paintEngine() method, does nothing, just returns NULL
    -> Assign HWND to widget->winId()

    #ifdef USE_QTGUI QApplication a(argc, argv); CD3DWidget wndw; wndw.show(); wndw.resize(1280,960); hWnd = wndw.winId(); #else hWnd = CreateAppWindow(name,300,300); #endif //CD3DWidget class contains only the following definitions CD3DWidget::CD3DWidget(QWidget * parent):QWidget(parent){ } QPaintEngine *CD3DWidget::paintEngine (){ return NULL; }

    @

    I also posted here
    http://stackoverflow.com/questions/1641286/using-qt-with-directx/5595356#5595356

  • A few questions about Game Development

    3
    0 Votes
    3 Posts
    3k Views
    M

    Yes they can. MeeGo is closely integrated with Qt and therefore with QML, and it's the official platform.
    If you create apps using Qt/QML you can also reach other mobile platforms. There will be phones later this year. You can also run them on Symbian ^3, and Maemo.

    As for is it the best for games. Probably not. There are other specialized libraries for games, which are better, but with Qt/QML you can reach the biggest audience, because it runs on so many platforms. As I heard there are unofficial ports of Qt to android, iPhone, WebOS and many more.
    Not long ago I started working on a QML game "Sink Submarines":https://projects.forum.nokia.com/sinksubmarines for the "MeeGo Coding Competition 2011":http://talk.maemo.org/showthread.php?t=71561
    You could join us. :)

  • Path Finding

    2
    0 Votes
    2 Posts
    3k Views
    L

    Hi,

    In my opinion it is always easier to explain such kind of algorithm with a block diagram (espesially if it is executed by a single thread) :) You can also get inspiration for optimal solution from existing solutions for path finding algorithms such as the different implementations of the traveling salesman problem ;)

    Best regards,
    Leon

  • 0 Votes
    8 Posts
    4k Views
    V

    change one string in only the client or server side and see what happens

    edit:
    http://doc.qt.nokia.com/4.7/qsettings.html.
    Its all in here

  • Qv(Puzzle game) demo with Pure QML

    3
    0 Votes
    3 Posts
    4k Views
    K

    Upload source code to "github":https://github.com/khris/qv .

  • 0 Votes
    2 Posts
    2k Views
    S

    Does it have to be Direct3D?

    If you use OpenGL then your game or whatever can run on other platforms apart from Windows.

    Also if you're interested in using OpenGL then you can use "Qt3D":http://doc.qt.nokia.com/qt3d-snapshot/.

    Full screen is no problem, and you have vertex and fragment (ie "pixel") shaders as in d3d8.

  • Adventure Game Engine: reports

    3
    0 Votes
    3 Posts
    3k Views
    C

    yes, but if i need do all mouse input in C++ i need do all draw with in C++ too. (if exists a way t get mouse input of a qml elementet in C++ tell me. I don't find one yesterday, only mouse global coordinates)
    So, i will use qml for what?

  • Creating the GUI for a Monopoly game

    7
    0 Votes
    7 Posts
    5k Views
    ?

    do post back your monopoly in showcase, i'd like to download it ;)

  • 0 Votes
    2 Posts
    2k Views
    G

    You must create two methods operator<<() and operator>>().

    See my "comment":http://developer.qt.nokia.com/forums/viewreply/22324/ in another thread for some sample code.

  • Efficiency of QGLWidget

    2
    0 Votes
    2 Posts
    2k Views
    D

    From my experience, the performance is quite good. I use QGLWidget to setup the context and that's about it. From then on, I write all of the other OpenGL code myself. That includes creating textures, rendering fonts and images. I havn't seen any slowdown when doing this. I've also been able to use the QGLWidget in an editor tool without any problems. In that case, I still do all the OpenGL rendering myself, but the widgets for the rest of the tool is rendered outside of the OpenGL context by Qt. I've not tried rendering Qt Widgets inside of the OpenGL widget.

  • Box2d for Qt 4.7

    3
    0 Votes
    3 Posts
    3k Views
    D

    Integrating Box2D is pretty simple. There was a Qt Labs post about it awhile ago. I was also able to integrate it into my game engine. It's works very well. The one thing to watch out for is the differences in scale. Box2D works will with things on the order of 10 units. If you match one Box2D unit to one pixel, you won't have very good results. So what I did was apply a constant scale factor when converting from Qt/pixel coordinates to Box2D coordinates.

  • JoyStick integration in QT

    9
    0 Votes
    9 Posts
    21k Views
    Z

    Another option that you might want to consider is using SFML.
    http://www.sfml-dev.org/

    SFML is a free multimedia C++ API that provides you low and high level access to graphics, input, audio, etc.

    Here is a tutorial on how to integrate it into Qt.
    http://www.sfml-dev.org/tutorials/1.6/graphics-qt.php

    And here is the input class.
    http://www.sfml-dev.org/documentation/1.6/classsf_1_1Input.htm

  • Grid-aligned 2D game with QGraphicsView

    9
    0 Votes
    9 Posts
    8k Views
    Y

    Dear MTK358,

    How your game is coming along? can you share the structure of the game you've designed.

    Does it use state machines? How do you shift between Intro screen, Game Screen , help screen / Score screens.. etc.

    How do you capture mouse interactions? Game Screen as one Widget or use MouseGrab items on interactive parts of games?

    I am also intrested in making simple 2d games.

  • 0 Votes
    2 Posts
    3k Views
    T

    Please stick with your "other thread on this topic":http://developer.qt.nokia.com/forums/viewthread/3562. Closing this thread.

  • Psycho-Naut, Global Game Jam

    7
    0 Votes
    7 Posts
    3k Views
    A

    [quote author="sleam" date="1296516870"]Well done for the time spent!
    I like the game design, nice idea to make the game go dark at certain spots!
    [/quote]
    thanks very much!
    [quote]
    Thank you for sharing with us.[/quote]
    It is a pleasure, I always wanted to do something for the developers community.

    Greetings.

  • 0 Votes
    2 Posts
    3k Views
    T

    Not sure what 'Texture' is in this context. If it's OpenGL, this link might help; or this is what I'm studying myself right now.
    http://www.digitalfanatics.org/projects/qt_tutorial/chapter14.html
    see chapter six and seven for a simple set up.

    Also, if you could elaborate a little on what you are trying to show and which events need to take place, someone would be able to help. Right now, the way I understand your code, calling show() would be the first command required to 'see' anything, but you wrote it's already visible.

  • Game Interfaces

    6
    0 Votes
    6 Posts
    5k Views
    W

    It depends upon how you will launch your game. If you want it to only reside on a windows(as DirectX is platform Dependant) based machine, then by all means use DirectX(and yes you can use it with Qt from what i understand, but you must override the Qt paint event to null in order to render properly), DirectX tends to be much easier to use than openGl, and by easier I simply mean you can do more in less lines of code generally. I have used both and it simply boils down to preference. If you use openGl, you do not have to do any workarounds, if you use DirectX to create the UI you do.

  • 0 Votes
    10 Posts
    12k Views
    M

    QGraphicsItem::setTransformOriginPoint(x, y) is working perfectly for me with smooth 60fps animation in a game on Symbian (N8). I'm not using the animation class on top though - I'm doing the rotation myself in the game loop.

  • Parallel Game Engine

    5
    0 Votes
    5 Posts
    6k Views
    D

    Probably they are talking about Havok...

  • Path Finding and Binary Heaps

    13
    0 Votes
    13 Posts
    8k Views
    C

    This is what I found when I started working with Boost. I did some basic math and figured that I wouldn't really gain any significant performance improvements over using my own code.

    Of course, I am running this code on a very small set of data. At the most, some of the datasets will only contain perhaps 100 elements. If I were coding against a very large (and/or complicated) set of data (i.e. pattern matching across thousands of elements is a good example) then I would rethink my using Boost.