Skip to content

Game Development

What can we say - we like games. And you can use Qt to write some. Questions? Ask here.
862 Topics 4.0k Posts
  • 0 Votes
    2 Posts
    2k Views
    A

    Check the qml tutorials on "ics.com":http://www.ics.com/learning/icsnetwork/
    and also check qt elearning video tutorials like qt quick for c++ developers. it helps to make connections between c++ and qml..keep us updated about your game...

  • A proper game loop

    13
    0 Votes
    13 Posts
    10k Views
    M

    I know it wasn't meant for real-time games, that's why i benchmarked it. I'll check Qt Quick though.

  • 0 Votes
    6 Posts
    3k Views
    A

    Actually, you can use SQL in-memory. SQLite is able to work with in-memory databases. Still, perhaps SQL is not the interface best suited for what you want...

    Again: I'd just create your own data structure. It can internally use QMap, QHash (prefer this over QMap if you can!), QVector (prefer over QList if you can!) etc., but it would keep your API sane and the resulting code readable, and it would allow items to point to each other.

  • 0 Votes
    2 Posts
    2k Views
    A

    Problem solved.

    The issue was not caused by the grabFrameBuffer()-function as suspected, but by re-use of a QPixmap the data was passed to.
    After creating a new QPixmap (one for each texture) everything worked as it should.

    Thanks for everyone who took their time reading this!

  • Scalable application

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    K

    There is no need to "double post. ":http://qt-project.org/forums/viewthread/18898/

    I am closing this thread.

  • 0 Votes
    2 Posts
    3k Views
    S

    Two further related questions. After the game, I'm generating a second High Score Screen with names and scores, currently in a 2nd QStackedWidget. All of my score/name data is in the Qt side, in a QList<myHighScoreStruct>. I saw in the "QML/C++ integration slides":http://get.qt.nokia.com/training/QtQuickforCppDevelopers/slides/qml-cpp-integration.pdf that you can use slots and Q_INVOKABLE to pass simple parameters, but only pass-by-value, so nothing complicated like passing a data structure.

    Possible solutions:

    Use QML animations to change to a HighScoreTable-like state (with a blank table), then at the end of the animation inform Qt's MainWindow, which switches to the HighScore part of the StackedWidget, making only it visible. So the Qt part draws the table. BUT how to know when the QML animation is finished? In Qt draw all of the text in a custom QWidget with transparent background, then expose that QWidget to QML so QML draws the custom QWidget (with high score data embedded) as well as any border graphics.

    I guess I'll try#2, but would appreciate any feedback on any of the other questions.

  • GL Debug Context with Qt 5

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Call and SMS interruption in QML

    2
    0 Votes
    2 Posts
    1k Views
    T

    Hi, ~theCrazyCrap.

    I am not Mobile Game Developer but I know how to find in Google. I found for you some links where you may find information you need:

    NOKIA developers Wiki "article":http://www.developer.nokia.com/Community/Wiki/Pausing_a_Symbian_app_on_an_incoming_SMS. NOKIA forum "thread":http://www.developer.nokia.com/Community/Discussion/showthread.php?232138-How-to-pause-QML-app-when-it-s-in-background-in-QML-1.0

    As far as I understood you should use QEventFilter like this:
    @
    bool MainWindow::eventFilter(QObject *object, QEvent *event)
    {
    switch(event->type()) {
    case QEvent::WindowActivate: qDebug() << "Window activated"; return true;
    case QEvent::WindowDeactivate: qDebug() << "Window DEactivated"; return true;
    default:
    return false;
    }
    }
    @

  • Check username/password through a PHP file

    9
    0 Votes
    9 Posts
    7k Views
    D

    awesome, thank you so much guys, will surely test it all out, eventhough I lack the knowledge, but I will try, test and learn this week :)

  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    3 Posts
    3k Views
    R

    Assuming this is a 2D game, you should look into the "Graphics View Framework":http://qt-project.org/doc/qt-4.8/graphicsview.html

    When you use the QGraphicsItem as base class for your viewable items, you get the collision detection algorithm for free. Allthough not the top of the edge, it will satisfy your needs.

    You should check the "Colliding Mice example":http://qt-project.org/doc/qt-4.8/examples-graphicsview.html

    It will show you how to move items etc, also look at Asteroids.

    The logic behind the original arcanoid, was very simple towards ball movement. It will change the velocity of the ball depending on the collision location (left, middle, right).

    I think you have enough to look at, so get started.

  • 3D Game

    2
    0 Votes
    2 Posts
    2k Views
    T

    The best way to create 3D games on Qt, using QtOpenGL module. It has standart OpenGL API and QWiidget wrapper to paint it.

    So, you should learn about it - QtOpenGL.

  • QGLWidget vsync Mac

    3
    0 Votes
    3 Posts
    3k Views
    M

    Would be sweet to have something like CADisplayLink in Qt that would prompt for a redraw as fast as possible. Using a timer seems quite inefficient to me, although I have no idea how it performs under the hood.

  • How to create board with block elements

    9
    0 Votes
    9 Posts
    4k Views
    M

    Well, I wasn't exactly asking for all of your code.

    The forum's and the help that I, and most of the people, can offer is only for specific questions. But as I said to you before, I think that you need to read again the tutorial, and maybe try to do simple modifications to it (add more colors, change the score, etc.), so you can understand it better.

    There are many things that you need to understand better. For example:

    You can only have one root element in a QML file, here you have two, a timer and a rectangle. You need to read about positioning elements in the screen. (Absolute Positioning, with x and y coordinates, "Positioning elements":http://doc.qt.nokia.com/4.7/qml-positioners.html and "anchors":http://doc.qt.nokia.com/4.7/qml-anchor-layout.html) Not everything needs to be inside a rectangle. You need to specify more properties to the timer in order to make it work (interval, running, repeat)

    When you have read more about it,I'll be happy to help you with some specific doubt or problem.

  • Stuck in loading page For Game

    5
    0 Votes
    5 Posts
    2k Views
    A

    is there any other references beside these? because i have the use the image for my project.
    can loader element be done?

  • How to use joystick in Qt?

    2
    0 Votes
    2 Posts
    6k Views
    L

    [quote author="lesner" date="1336731487"]
    Is there any library for Qt to access a joystick?
    ![/quote]

    Please read this "discussion":http://qt-project.org/forums/viewthread/2868 and "this article for accessing joysticks with Qt and SDL":http://www.fredemmott.co.uk/blog/2009/07/23/Accessing joysticks with Qt

  • 0 Votes
    4 Posts
    2k Views
    A

    [quote author="AhWoon92" date="1336727333"]sorry about that..
    because i need help as my deadline of my game submission is coming soon.[/quote]
    You obviously did not understand the FAQ: that is your problem, not ours. If you need ultra-fast support, go and get yourself a paid support engineer. Here on the forum, you're in no position to solicit special or expedited attention over all the other people who also work on their projects.

  • 0 Votes
    5 Posts
    3k Views
    C

    I think you can subclass QDeclarativeView (which is a QGraphicsView) and reimplement QGraphicsView::drawBackground() to do your rendering. You might need to call painter->beginNativePainting() and painter->endNativePainting() around your rendering code to let Qt know that the GL state might have changed.

  • How to setup OpenGL 3.x?

    5
    0 Votes
    5 Posts
    4k Views
    M

    Example of using QGLWidget with GLEW:

    https://github.com/minimoog/portals

  • QtGameEnabler and QGraphicsView

    2
    0 Votes
    2 Posts
    2k Views
    Q

    I have managed to do soemthing like

    graphicsView->setViewPort(new GE::GameWindow);

    but the perfomance sucks, as well, am facing a screen flicking issues

    Do you think I should stick to QGLWidget?