Skip to content

Game Development

What can we say - we like games. And you can use Qt to write some. Questions? Ask here.
875 Topics 4.1k Posts
  • Call and SMS interruption in QML

    2
    0 Votes
    2 Posts
    2k 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
    8k 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 :)
  • How can I render to fbo out of QGLWidget::PaintGl

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Brick Breaker, Need help on moving the panel and the ball

    3
    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
    3k 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
  • Generating 9x9 tiles/blocks with random images and create a board

    4
    0 Votes
    4 Posts
    3k 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
    5k 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?
  • Unessesary repaint how to avoid

    9
    0 Votes
    9 Posts
    4k Views
    M
    Please edit your posts (using the edit link on the right-hand side of the post) instead of creating a new entry for corrections. I've merged the two entries into one. Thanks!
  • Asteroids Game, need help moving ship

    6
    0 Votes
    6 Posts
    4k Views
    M
    Sounds like someone has skipped trigonometry lessons in school :) I guess what you want is to form a forward vector which is something like f = cos(angle)x + sin(angle)y depending on what you choose angle=0 to represent.. Then you form a velocity vector of s*f (s=scalar speed) and use that to move your ship's position. M
  • Creating bullet collision objects fromQGLSceneNode

    4
    0 Votes
    4 Posts
    2k Views
    M
    Number of (active) collision shapes & their complexity is what build the CPU strain of the process, obviously - so, use as simple collision shapes as possible (you can use combinations to represent more complex objects) and only include the shapes you need in the calculations; if some objects are far away from the "action", just remove them from the list of active shapes and save some calculation power. I would suggest asking this on the Bullet Forums as they are the right people to discuss this with. My experience with it is limited to a single "mobile app":http://777-team.org/~matti/software/ToyBlocks/ where I used a multithreaded approach to do the physics calculations in a separate thread, using some 8-50 box collision shapes at once. I have no experience in PhysX nor have no idea how much complexity can a gaming PC handle, for instance. M
  • Moving Objects in a Game

    3
    0 Votes
    3 Posts
    6k Views
    I
    Hi Gmaro, thank you for your help. However, I've been looking through the QML examples for a very long time.. Most of them have restricted X & Y axis movement, my river is very twisty and bendy, requires the objects to move in diagonals and in different angles. Is this possible with QML?
  • QImage/QPixmap not initialized in Symbian device, working fine on desktop

    2
    0 Votes
    2 Posts
    2k Views
    I
    Texto original en español Me sucedia algo similar con: @image("../carpeta/archivo")@ Lo solucione cuando coloque las imágenes en una carpeta directamente en donde se aloja el main del programa. Cuando use archivos *.js era necesario colocar "../carpeta/archivo", pero al colocarlo en archivos *.qml solo coloque "/carpeta/archivo". Traducción Something similar to: @ image("../ folder/file") @ when you place the images in a folder directly in that it hosts the * main* program. When you use *.js files needed to put "../ folder/file", but to put it in files only *.qml put "/ folder/file".
  • Open GL ES2.0 - glDrawelements()

    2
    0 Votes
    2 Posts
    4k Views
    M
    @m_sampleProgram.enableAttributeArray(vertexAttr); m_sampleProgram.setAttributeBuffer(vertexAttr, GL_FLOAT, 0 * sizeof(GLfloat), 3, 5 * sizeof(GLfloat)); m_sampleProgram.enableAttributeArray(texAttr); m_sampleProgram.setAttributeBuffer(texAttr, GL_FLOAT, 3 * sizeof(GLfloat), 2, 6 * sizeof(GLfloat)); m_sampleProgram.enableAttributeArray(normalAttr); m_sampleProgram.setAttributeBuffer(normalAttr, GL_FLOAT, 5 * sizeof(GLfloat), 3, 5 * sizeof(GLfloat));@ Looks like vertex strides are wrong.
  • Resizing QGL Widget

    3
    0 Votes
    3 Posts
    5k Views
    M
    You need also to change projection matrix.