1

I'm creating simple online game in Qt Creator. I've created server project which analyse received data and take decisions. Also I created player project which sends requests to server for permission to move, shoot etc. Player project should be universal for Player 1 and Player 2.

Is there an option to run player project twice in Qt Creator? I need it to test how server and player project behaves when second player connects.

proton
  • 329
  • 3
  • 10

2 Answers2

5

I'm using Qt Creator 4.3.1: You can do that in Tools > Options... > Build & Run. Under the General tab, set the "Stop applications before building:" to "None"

Camilo
  • 83
  • 1
  • 8
2

Open 3 Qt Creators, 1 for the server 2 for the players and then run all of them. I have made a server-client multiplayer game in Qt and that is how i tested it. For every client(player) open a Qt Creator.

EDIT: You can also create release versions and start them, but you waste a lot of time creating a release version every time you want to debug.

kemis
  • 4,404
  • 6
  • 27
  • 40
  • I thought there could be one Qt Creator opened at time. Thanks, it works, with one problem. In second Qt Creator i have message something like: "cannot download debugger communicates". I need these communicates, is there any way to have communicates from qDebug on both Qt Creators? – proton May 17 '16 at 19:05
  • 1
    Seriously? You couldn't think of any other way of launching your application than starting multiple instances of your IDE? - *really*? Did you consider just starting the app multiple times from a shell? Or you could edit your "run" configuration in creator to start the app multiple times.. There are so many better ways.. This solution is just .. I don't know what to say .. A hack (at best)... – Jesper Juhl May 17 '16 at 19:07
  • 1
    For the qDebug problem http://stackoverflow.com/questions/14379325/cannot-retrieve-debugging-output-in-qt-creator – kemis May 17 '16 at 19:08
  • 1
    @JesperJuhl I editied and added another way. I didn't say it is a great solution but it is better then having none ;/ i was just trying to help the best i can – kemis May 17 '16 at 19:20
  • I wanted quick solution, and i got it. I believe there are more sophisticated solutions, but that one solves my problem aswell. – proton May 17 '16 at 19:24
  • @Milos Radosavljevic How does "creating a release version" have anything to do with it? Regardless of you doing a "release" or "debug" build, an executable is generated by the compiler that you can just run (as many times as you care to) in a shell (or by clicking in your GUI if you like). Release vs Debug changes nothing. Starting multiple IDE instances is just a crappy solution. – Jesper Juhl May 17 '16 at 19:26