Sign in to follow this  

Qt C++ MMORPG

This topic is 2008 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am starting making a mmorpg game using qt and c++ does if anyone can point my in the right direction such as books, tutorials, website anything to help me get started.

Share this post


Link to post
Share on other sites
http://www.gamedev.net/page/resources/_/technical/game-programming/how-do-i-make-games-a-path-to-game-development-r892 - Start with Tetris. Realize the ridiculously immense scale of the project you've set yourself. Lower your expectations.

Share this post


Link to post
Share on other sites
I'm a very good programmer and have programmed many other games including android and xna game so I'm not worried that my project to big i just need to how to get started.

Share this post


Link to post
Share on other sites
Write some code?


Seriously, if you're experienced enough as a programmer to handle writing a game like this, it should already be second nature to you to just start hacking on a project and then take it through to completion. Something tells me this isn't the case.

Share this post


Link to post
Share on other sites
Wow, it's been a while since we've had one of these infamous MMO threads.

[quote name='shawk08033' timestamp='1342475146' post='4959768']
I'm a very good programmer and have programmed many other games including android and xna game so I'm not worried that my project to big i just need to how to get started.
[/quote]

Have a look at the credits for some MMORPGs and count the amount of people who helped develop it. When you've done that go find some information about how much those projects cost to develop and maintain and how many years were spent actually developing the base game.

All those people who worked on those MMORPGs were experienced in their fields, yet they still require large teams and large budgets.
An MMO first of all is not a single person project, it's not a no- or low-budget project, and it definitely isn't a project for someone with moderate experience.

Also this: http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect

Share this post


Link to post
Share on other sites
[quote name='shawk08033' timestamp='1342475146' post='4959768']
I'm a very good programmer and have programmed many other games including android and xna game so I'm not worried that my project to big i just need to how to get started.
[/quote]

If this is the case then pointing out the direction is fairly easy:
Fire up your code editor / IDE and get to work, you might want to do a rough system sketch for the backend first though, (Depending on your design it doesn't have to be all that complex), normally however the words MMO and tutorial don't mix all that well.

For proper MMOs you might want to pick up a book or two on distributed simulations (As its pretty much required knowledge to get that first M in there), you could also look at HeroEngine which solves some of the harder technical challenges for you (I don't know what kind of MMO you want to make but i'd highly recommend going into space, space is rather empty and thus it is fairly easy to make alot of it) (a massive number of concurrent players require a large world and a large world can require quite insane amounts of artwork and other assets)

Once you got a playable prototype you can make a post in the classifieds section here to recruit more people. (Don't bother recruiting until you actually got a solid start though) Edited by SimonForsman

Share this post


Link to post
Share on other sites
You said you've made some games for Android and XNA, but of what complexity? If you're not worried about the project size getting too big, you should then have an idea on how to break it down into simpler goals and projects, so you can figure out the first step. However, this contradicts the statement that you don't know how to get started. Can you be more specific on what kind of games you've made before?

Share this post


Link to post
Share on other sites
One step in the right direction may be to rethink the decision to use Qt for your game. I'm a Qt user myself, and am currently using it on my game - but my game is a 2D RPG where performance isn't critical.
Qt isn't really designed with games in mind, and as such, has some performance issues that pop up at unpredictable times - in particular I'm thinking about a blog post I read recently, where someone was making a Minecraft clone using OpenGL and Qt, and showed performance measurements for his game where Qt was eating the lion's share of it.

Also Qt kinda enforces it's own programming paradigm on you, forcing you to use signals and slots whether you want to or not, and takes complete control of the main loop of the application. I begrudgingly tolerate that in my project.
However, I suppose being open source and all, you could edit it to fit your needs and then recompile it (LGPL, so your changes need to be made available to others). I intend to do that myself in the future on different projects, but for my present projects I'm not bothering with that.

If I was using Qt for a 3D game, I'd edit it in the following ways before proceeding on the project:
A) I'd reclaim control of the main loop.
B) I'd swap out signals and slots (which is fine for applications) for a different kind of messaging system.
C) I'd make the rendering happen when I say and not when Qt feels like it.

That being said, the RIFT mmo uses Qt... I bet they didn't just use it out of the box, though. You have to weigh the pros and cons.

Share this post


Link to post
Share on other sites
[quote name='Servant of the Lord' timestamp='1342483067' post='4959811']
One step in the right direction may be to rethink the decision to use Qt for your game. I'm a Qt user myself, and am currently using it on my game - but my game is a 2D RPG where performance isn't critical.
Qt isn't really designed with games in mind, and as such, has some performance issues that pop up at unpredictable times - in particular I'm thinking about a blog post I read recently, where someone was making a Minecraft clone using OpenGL and Qt, and showed performance measurements for his game where Qt was eating the lion's share of it.

Also Qt kinda enforces it's own programming paradigm on you, forcing you to use signals and slots whether you want to or not, and takes complete control of the main loop of the application. I begrudgingly tolerate that in my project.
However, I suppose being open source and all, you could edit it to fit your needs and then recompile it (LGPL, so your changes need to be made available to others). I intend to do that myself in the future on different projects, but for my present projects I'm not bothering with that.

If I was using Qt for a 3D game, I'd edit it in the following ways before proceeding on the project:
A) I'd reclaim control of the main loop.
B) I'd swap out signals and slots (which is fine for applications) for a different kind of messaging system.
C) I'd make the rendering happen when I say and not when Qt feels like it.

That being said, the RIFT mmo uses Qt... I bet they didn't just use it out of the box, though. You have to weigh the pros and cons.
[/quote]

You can use QT without it taking over your mainloop if you want, (IIRC you only have to call ProcessEvents on your QApplication from your own loop) and i think you can call thinks like the updateGL method directly as long as its done from the thread that owns the QGLWidget.

It is however probably a better idea to use a different library for games unless the game is GUI driven. (QT is a great desktop GUI library, most of it is fairly useless in the average game though)

Share this post


Link to post
Share on other sites
Here is a good link: http://www.gamedev.net/index.php?app=core&module=search

More seriously, about the Qt thing, we've gone over this before, e.g. http://www.gamedev.net/topic/625708-use-qt-something-else-or-roll-my-own/page__p__4948203

Share this post


Link to post
Share on other sites
[quote name='Servant of the Lord' timestamp='1342483067' post='4959811']
One step in the right direction may be to rethink the decision to use Qt for your game. I'm a Qt user myself, and am currently using it on my game - but my game is a 2D RPG where performance isn't critical.
Qt isn't really designed with games in mind, and as such, has some performance issues that pop up at unpredictable times - in particular I'm thinking about a blog post I read recently, where someone was making a Minecraft clone using OpenGL and Qt, and showed performance measurements for his game where Qt was eating the lion's share of it.[/quote]If that's the post I'm thinking of, it was specifically only to do with using the Qt GUI, overlayed with the graphics scene.

It's still perfectly fine to use Qt as an API for game development on a similar level to say SDL and SFML. Qt provides far more than a GUI - it provides windowing, input, sound, 2D graphics (or 3D via OpenGL/D3D, like with SDL), networking, SMP and so on, all the things you'd want in a cross-platform game API.

The key thing that's an issue for performance is if you want to have a GUI rendered as part of your scene, on the GPU. But say SDL doesn't provide any support for that whatsoever, but that's not a reason to not use SDL. As always, you either have to roll your own, or get a game UI toolkit that's built specifically for that job. (OOI, is there an open source cross-platform toolkit that does provide all the low level things like windowing, input, sound, networking, *and* a fast GUI toolkit as well?)

(This is a few times I've seen references to that blog post now - I fear it's starting a "Qt can't be used for games" myth, which completely misses the point of what Qt can provide, and what that blog post was measuring. Even without fast OpenGL/D3D based GUI, Qt still provides plenty for game development, and does just as well as the likes of SDL IMO.)

Now yes, Qt is perhaps most well known for its GUI engine and it perhaps seems a waste to not use that at all - but if we've decided that the GUI shouldn't be used, that doesn't mean there's nothing left to offer when it comes to low level game APIs like SDL etc. I'm not saying Qt is necessarily better than SDL, but they're both viable choices. Also a well written game/engine shouldn't necessarily be restricted to one or the other, and it shouldn't be the constraining choice in developing a game - I have a game that uses SDL for Windows/Linux/OS X, but I added Qt support for Symbian and Android (on Android, the Qt port seems better supported and easier to use than SDL or anything else I could find for C++). Nothing in my game code has signals/slots forced upon it, apart from a small amount of Qt specific code.

I'm also using it in a game where I use the Qt GUI elements in separate windows (and RPG, where the UI surrounds the main game window), and so I'm not sure if the performance criticisms apply there(?) since the GUI won't be rendered every frame.

[quote]Also Qt kinda enforces it's own programming paradigm on you, forcing you to use signals and slots whether you want to or not, and takes complete control of the main loop of the application.[/quote]Signals and slots are great things, though yes it does mean you aren't writing "pure" C++. Though as I say, you don't have to use signals and slots everywhere, only where your game/engine interfaces with the Qt API.

The latter is a good thing, particularly for mobile development (it means the programmer doesn't have to be trusted when it comes to things like sleeping, not wasting battery life on unnecessary CPU and so on). E.g., you don't get a main loop in Android at all - see [url="http://stackoverflow.com/questions/1099640/main-loop-in-android"]http://stackoverflow.com/questions/1099640/main-loop-in-android[/url] . Edited by mdwh

Share this post


Link to post
Share on other sites
double post Edited by mdwh

Share this post


Link to post
Share on other sites
[quote name='shawk08033' timestamp='1342473445' post='4959748']
I am starting making a mmorpg game using qt and c++ does if anyone can point my in the right direction such as books, tutorials, website anything to help me get started.
[/quote]

As it happens I am almost a certified QT programmer. I've had an in-depth course of one year by an expert. I don't know if you want your game to be in 3D then you have to check out the QtOpenGL module, from that point on you have an OpenGL context. If you want the mmo to be 2D the QGraphicsView and the Animation State Machine are a solid option.

The QGraphicsScene implements a search tree that let's you easily handle millions of drawn elements on screen.

[url="http://qt-project.org/doc/qt-4.8/QGraphicsScene.html"]http://qt-project.or...phicsScene.html[/url]

Essentially, you have a QGraphicsScene, a QGraphicsView and then add items that inherit QGraphicsItem for custom behavior. This is mostly for a 2D game. Otherwise I'd go with OpenGL.

Keep in mind that QT isn't an engine, it doesn't provide game-peculiar tools to help you in your development. If you are feeling adventurous, Qt Quick can be worth it. It has a similar writting style to javascript and CSS, yet you can write C++ backend for intensive tasks if you wish.

QT has very, very good documentation, I doubt you really need any book at all. Here's the page with examples, there's a tetris and an asteroid game in there:

[url="http://doc.qt.nokia.com/4.7-snapshot/all-examples.html"]http://doc.qt.nokia....l-examples.html[/url]

There's a QT Dev who wrote a game down where you shoot things down on a boat using a cannon. That's it. Edited by DZee

Share this post


Link to post
Share on other sites
[quote name='shawk08033' timestamp='1342532910' post='4960000']
I want to use qt because of it network classes and its portability.
[/quote]

The network code from one game is the most easiest part of its development. If the game's architecture is well written it can take a day or two to make "the multiplayer mode".
Nothing more to say. Call me when you finish it, but with this SDK priorities it won't be soon [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
My opinion, no offence. However, good luck! Edited by Nickie

Share this post


Link to post
Share on other sites
[quote name='mdwh' timestamp='1342533284' post='4960003'](This is a few times I've seen references to that blog post now - I fear it's starting a "Qt can't be used for games" myth, which completely misses the point of what Qt can provide, and what that blog post was measuring. Even without fast OpenGL/D3D based GUI, Qt still provides plenty for game development, and does just as well as the likes of SDL IMO.)[/quote]Other people have been burned by using Qt in their games too, it's not as if that person who blogged about it was the only one.

Nobody is saying that it "can't" be used for games, but rather that there are important issues to weight into consideration.
[quote name='DZee' timestamp='1342540656' post='4960039']As it happens I am almost a certified QT programmer. I've had an in-depth course of one year by an expert.
[/quote]How much of this course was related to game programming? Don't get me wrong, Qt is pretty good at what it is designed for, just in my experience Qt has been a bad choice for games.

Share this post


Link to post
Share on other sites
[quote name='mdwh' timestamp='1342533284' post='4960003']
[quote name='Servant of the Lord' timestamp='1342483067' post='4959811']
One step in the right direction may be to rethink the decision to use Qt for your game. I'm a Qt user myself, and am currently using it on my game - but my game is a 2D RPG where performance isn't critical.
Qt isn't really designed with games in mind, and as such, has some performance issues that pop up at unpredictable times - in particular I'm thinking about a blog post I read recently, where someone was making a Minecraft clone using OpenGL and Qt, and showed performance measurements for his game where Qt was eating the lion's share of it.[/quote]If that's the post I'm thinking of, it was specifically only to do with using the Qt GUI, overlayed with the graphics scene.[/quote]
Yes, I meant the GUI in particular. Here's [url="http://www.shamusyoung.com/twentysidedtale/?p=15904"]the post[/url].

[quote]It's still perfectly fine to use Qt as an API for game development on a similar level to say SDL and SFML. Qt provides far more than a GUI - it provides windowing, input, sound, 2D graphics (or 3D via OpenGL/D3D, like with SDL), networking, SMP and so on, all the things you'd want in a cross-platform game API.[/quote]

You're absolutely right. For myself personally, one of the main draws of Qt is the GUI, so I do tend to think of Qt as a 'GUI' toolkit, even though I have made use of many other parts of its extensive libraries. It is definitely more than just GUI, as you said.

As I mentioned earlier, my own game project uses Qt for the editor, and the editor is built into the game itself (Qt-controlled SFML window for the game, and Qt-controlled Qt widgets all around the sides). For my 2D RPG, the performance costs aren't a hindrance. The signals and slots, which are nice for desktop applications, don't sit too well with me for game messenging, but that's probably from a lack of experience with them.

Qt is definitely very useful! Especially when it comes to desktop applications. I should rephrase my criticism to the OP as:
"[i]If you are using Qt for a [u]GUI[/u] in your 3D MMORPG (if your MMO is 3D), then you ought to be aware of possible performance hogging by Qt's widget system. However, Qt is open source, so you can alter it to fit your needs, or just not use the GUI part of Qt - Qt has much more than just widgets that may benefit your project.[/i]"

Better? [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

I appreciate the correction, Qt is an awesome set of libraries! I only meant to make sure the OP weighs the pros and cons (of the Qt widget system) for his particular project, not dissuade him from all Qt use, or even from all Qt for games use - so thank you for making me clarify my statements. [img]http://public.gamedev.net//public/style_emoticons/default/wink.png[/img]

Share this post


Link to post
Share on other sites
[quote name='scniton' timestamp='1342546252' post='4960074']
[quote name='DZee' timestamp='1342540656' post='4960039']As it happens I am almost a certified QT programmer. I've had an in-depth course of one year by an expert.
[/quote]How much of this course was related to game programming? Don't get me wrong, Qt is pretty good at what it is designed for, just in my experience Qt has been a bad choice for games.
[/quote]

Well, since QT was originally a wrapper to make writing cross-platform C++ code there was never an intention to write native classes with gaming in mind. My course mostly went trough the different layers of the QT hierarchy starting from QtCore to QtGui all the way to phonon and multi-threading etc. There was too much ground to cover to have anything to do with games. I'd say that QT works well for games that rely heavily on graphical interfaces. I wrote a Sudoku and it took around 1 hour to style it with QSS in Qt Designer. So in that regard it's interesting.

Personally QT has an interesting approach in the sense that you are forced to use an MVC-like structure with each entity being a graphical item with a set position in space(Already done for you in 2D) which eases understanding of the code. I've worked at a company that remade the interface of a flight simulator with graphs in QT and it handled it very well with at least 1000 classes. My only gripe with QT is that the moc it generates for it's signal/slot mechanism and custom slang can sometimes cause headaches during compilation time.

If I were to write a desktop application with a GUI Qt would be a definite choice. It's up-to-date and the documentation is stellar. Also, projects with a large scope of different tasks would leverage the library well. If your goal is to use QT by spawning a window with a blank canvas to draw space ships and stuff then it's crap. You're gonna include half the world for something other more straight-forward libraries can do for you.

Here's an interesting page that shows what people have done with QT, ranges from small and big projects:

[url="http://qt.nokia.com/qt-in-use"]http://qt.nokia.com/qt-in-use[/url]

So to sum it up, you can very well use QT for your game. It provides touch support too. So I suppose making games for some embedded devices could be interesting. Edited by DZee

Share this post


Link to post
Share on other sites

This topic is 2008 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this