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
  • How much Qt power in Game Design?

    14
    0 Votes
    14 Posts
    8k Views
    B

    There are great tuturials on youtube for this

  • Any GLSL and Qt tutorial?

    1
    1 Votes
    1 Posts
    1k Views
    No one has replied
  • Using qt widgets as texture in 3D

    3
    0 Votes
    3 Posts
    5k Views
    J

    Great work! Thank you for sharing. This inspires me with an interesting idea.

  • 0 Votes
    5 Posts
    2k Views
    R

    Well I dont think its the game code, because if I move the camera without moving the mouse over the units (or remove the setOverrideCursor function) the game doesn't slow down.
    And yes I got the *(new QPixmap(…)) part from the net and pasted it without really thinking about it.
    But It doesn't matter, I got it :)
    I set the cursor with qt to an image once at gamestart. And change it ingame with irrlicht if I move it over a unit. And if I move the cursor over the interface it doesn't change because I tell qt to use the same image as Irrlicht

    Thanks for your help and good night ;)

  • Opengl textures with glDrawElements

    10
    0 Votes
    10 Posts
    10k Views
    S

    You can use glDrawElements for each face

  • Qt and Autocad or Blender

    11
    0 Votes
    11 Posts
    9k Views
    I

    Blender. Why? vladimir_s said everything.

  • Qt3D Animations?

    4
    0 Votes
    4 Posts
    4k Views
    J

    @ JanDal: thanks for thoose links, nice material.

  • Best way to create multi-textured terrain

    8
    0 Votes
    8 Posts
    5k Views
    E

    Right, I was under the mistaken assumption that QMultiMap () would insert over the same key. The opposite is true. The documentation was staring me in the face.

  • Rotation based on Mouse-Position

    6
    0 Votes
    6 Posts
    4k Views
    V

    hi,,,
    i am beginner to QML i too have same problem i am creating small applications in that whenever i change the cursor position all my fishes has to come to eat the cursor point.. i am able to move it with cursor position but unable to move with direction.

    kindly help me

    Thanku

  • Where to put game sound files?

    8
    0 Votes
    8 Posts
    4k Views
    H

    If you look in the qmake Variable reference, under DEPLOYMENT: it reads

    bq. This is only used on Windows CE and the Symbian platform.

    That doesn't solve your problem, but you should definitely not use DEPLOYMENT on a Mac. Sadly DEPLOYMENTFOLDERS is not even mentioned in the reference :-/

  • 0 Votes
    8 Posts
    5k Views
    F

    Hi,
    if you like using QML for your game, you can consider V-Play, a Qt-based game engine we have been working on for the last 1.5 years. It contains platform-specific plugins like "Game Center":http://v-play.net/doc/qmlmodule-plugins1-plugins-1-0.html, Flurry or native Facebook SDK accessibe from QML, together with other gaming components for 2D games. We'll add a cross-platform solution (supported on all platforms) for leaderboards, achievements, challenges and in-app-purchases til this summer. It's free for the desktops, Symbian and MeeGo and also free to try for your iOS or Android test devices and available for download "here":http://v-play.net.

    Cheers, Chris

  • 0 Votes
    2 Posts
    2k Views
    A

    I've found the error.
    The camera's upVector has not been updated (default: 0,1,0). When the camera's direction (eye-center) is not parallel to the plane (as it is in the example), then the initial upVector is no longer orthogonal to the camera direction. For a correct projection, however, it must be. So you have to calculate a new upVector in initializeGL, after having positioned the eye.

  • 0 Votes
    2 Posts
    2k Views
    K

    Closing this duplicate too

  • [Solved] Two Concerns

    9
    0 Votes
    9 Posts
    3k Views
    S

    Oh, sure.

    I have this

    @void MainWindow::establishConnection(){
    tcpSocket->connectToHost("localhost", 5000);
    }@

    Which is called in my constructor.

    I had
    @establishConnection();@

    without doing

    @tcpSocket = new QTcpSocket(this);@

    So far, using pointers has been really tripping me up, and tbh I'm still unsure of 75% of their use. I just know that in this case, it caused my program to crash without it.

    And another question has come up. I've been trying at this for about two hours now, searching the forums and Google to no avail. All I'm trying to do is...

    @...
    connect(tcpServer, SIGNAL(newConnection()), this, SLOT(processConnection()));
    }@
    in a function called beginListening.

    Whenever my client is opened, it immediately establishes a connection with the server, making processConnection run. k. Here's my processConnection function.

    @// process new connections...
    void MainWindow::processConnection(){
    if (tcpServer->hasPendingConnections()){
    onlinePlayers++;
    //cout << onlinePlayers << endl;

    player[onlinePlayers] = new QTcpSocket(); player[onlinePlayers] = tcpServer->nextPendingConnection(); addText(tr("New connection received from %1.") .arg(player[onlinePlayers]->peerAddress().toIPv4Address())); //testing junk addText(player[onlinePlayers]->peerAddress().toString()); }

    }@

    in an attempt to display to the server that a new connection has indeed been accepted, and then I want to save that connection in my own defined array of QTcpSockets. So far, everything seems to go well until we get to the part where I'm trying to return the host connection's IP address. When I use the .toIPv4Address() call, it returns 0. When I use the toString() call, it returns a strange string "::1%0". Even did a Google search on that string, with no luck.

  • Wanna start game development

    8
    0 Votes
    8 Posts
    4k Views
    F

    fully agree Muegen!

  • Using OpenGL without Qt class

    4
    0 Votes
    4 Posts
    2k Views
    M

    This:
    [quote author="ZapB" date="1361178528"]Why not just use QWindow and QOpenGLContext? That takes away the pain of context and window creation. Then you can do as you please for the rest of your GL work either use Qt's enabler classes or do it yourself. This is Qt5 though.[/quote]

    Use the ease of Qt for the window/ui, use GL for the rest(just like if you weren't using Qt).

  • 0 Votes
    3 Posts
    3k Views
    J

    [quote author="Code_ReaQtor" date="1364534260"]AFAIK you can use OpenGL as a renderer in QGraphicsView.... but the performance is not that good since it is, IIRC, still experimental. Have tried to use it in windows and it is slow. Some people who used it in Linux says it has better performance.[/quote]
    Well on some machines OpenGL is a quality nightmare, I've tried the example, I shows that it doesn't support Anti-aliasing.

  • Filippakoc_mechanic_pacman_demo

    1
    0 Votes
    1 Posts
    839 Views
    No one has replied
  • GlActiveTexture() linker error with Qt5

    2
    0 Votes
    2 Posts
    3k Views
    S

    Hi obab,

    I got the same problem some time ago and i solved it like this (I am also using the desktop openGL version):

    Instead of using directly
    @
    glActiveTexture(GL_TEXTURE0);
    @

    u do smth like that
    @
    QOpenGLFunctions f(yourQOpenGLContextInstance);
    f.glActiveTexture(GL_TEXTURE0);
    @

    Works perfectly in my case!

    Greetings

  • Build Qt3D

    4
    0 Votes
    4 Posts
    5k Views
    S

    Hello,

    Just upgraded from a previous version I decided to get the latest of all.

    On Ubuntu installation, check dependencies as for QT5 git install.
    I guess the point is similar on Windows.

    Directories
    ./depot/qt5 for the git
    ./build/qt5 for build

    Git Qt5.1 + QT3D
    cd depot
    git clone git://gitorious.org/qt/qt5.git qt5
    cd qt5
    git clone git://gitorious.org/qt/qt3d.git qt3d
    ./init-repository --no-webkit
    cd ../../build/qt5

    ../../depot/qt5/configure -developer-build -opensource -nomake examples -nomake tests -confirm-license && make -j 9

    ./qtbase/bin/qmake /home/laurent/SrcExt/depot/qt5/qt3d/qt3d.pro
    make -j 9

    QT Creator
    Downloaded the v2.7 and work, now I need to fix the code.

    Let me know if it work on your side.

    Started this Wiki page if you want to update the procedure or add the windows one: https://qt-project.org/wiki/Category:Developing_with_Qt::Qt-3D