Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Need some general information about integrating Qt with SFML  (Read 4722 times)

0 Members and 1 Guest are viewing this topic.

Assassinbeast

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Email
Need some general information about integrating Qt with SFML
« on: November 21, 2012, 07:49:49 pm »
Hello  ;D (it might be a dumbass question, sorry). But i just wanna know what Qt exactly kinda is, when integrating it with sfml

Is it something nice to use when you want to make a gamemenu with all kinds of buttons and images?

Normally when i make a gamemenu for my game, then i load the images, make int variables to control where the button is etc... which kinda take long time to make and its gonna get pretty messed up.

But is it that Qt can take care of?
It looks cool, but i dont know if i should learn it, if i shouldn't use it anyway   :P

masskiller

  • Sr. Member
  • ****
  • Posts: 284
  • Pointers to Functions rock!
    • MSN Messenger - kyogre_jb@hotmail.com
    • View Profile
    • Email
Re: Need some general information about integrating Qt with SFML
« Reply #1 on: November 21, 2012, 09:39:56 pm »
Qt is a GUI (and a bunch of other things) library that isn't really compatible with the type of rendering SFML does (as far as I know), not to mention that it's inner functioning is a total pain in my opinion, it's quite powerful for some things, but if it's a main menu of a game or something the like you would get the results you expect with SFGUI.

I haven't actually used Qt (though I know a bit of how it works and have seen some examples) so if it actually can be used with SFML then please correct me.
Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!

Finally back into the programming world!

Assassinbeast

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Email
Re: Need some general information about integrating Qt with SFML
« Reply #2 on: November 21, 2012, 10:56:34 pm »
Quote
if it actually can be used with SFML then please correct me.
http://www.sfml-dev.org/tutorials/1.6/graphics-qt.php
Yes, its compatible.

I just looked up SFGUI, and it looks nice too.
But all-in-all, what do you recommend me to learn?

My ultimate dream/goal is to become a professional 2d gameprogrammer and make a big game where people can log on, chat, create customgames and play with eachother, something like League of Legends  ::)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
AW: Re: Need some general information about integrating Qt with SFML
« Reply #3 on: November 22, 2012, 07:20:48 am »
Quote
But all-in-all, what do you recommend me to learn?

My ultimate dream/goal is to become a professional 2d gameprogrammer and make a big game where people can log on, chat, create customgames and play with eachother, something like League of Legends  ::)
Then you've a long way before you and you should learn both and even more.

Keep in mind that with Qt you can't draw the GUI over you SFML drawings, they need to be stricly separated, while with SFGUI/TGUI/CEGUI etc you can integrate the GUI into your game drawings.
« Last Edit: November 22, 2012, 09:32:15 am by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Need some general information about integrating Qt with SFML
« Reply #4 on: November 22, 2012, 07:57:47 am »
Quote
with Qt you can draw the GUI over you SFML drawings
"you can't" ;)
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
AW: Re: Need some general information about integrating Qt with SFML
« Reply #5 on: November 22, 2012, 09:33:02 am »
Quote
with Qt you can draw the GUI over you SFML drawings
"you can't" ;)
Arg... Why does this always happen... ::)
Thanks!
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Assassinbeast

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Email
Re: Need some general information about integrating Qt with SFML
« Reply #6 on: November 22, 2012, 01:22:33 pm »
Quote
Keep in mind that with Qt you can't draw the GUI over you SFML drawings, they need to be stricly separated, while with SFGUI/TGUI/CEGUI etc you can integrate the GUI into your game drawings.

In my future dreamgame, so far, i dont plan to draw the GUI over SFML.
I plan to make it some kind of similiar to League of Legends, where you have the log-on screen, menubar, chatbar and all other tabs in the main window.
Then when you start a game, a whole new window is gonna pop up, and then you play in that new window.

So thats what ive been thinking in my game. Where the main window is Qt, and when i start the game, the SFML window is gonna pop up and start the game and the gameloop.

But is it that Qt is capable of doing and fill the requirements of my future dreamgames needs?

Thanks a lot for helping me man!!  :) :)
« Last Edit: November 22, 2012, 01:28:30 pm by Assassinbeast »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Need some general information about integrating Qt with SFML
« Reply #7 on: November 22, 2012, 01:31:14 pm »
Quote
But is it that Qt is capable of doing and fill the requirements of my future dreamgames needs?
Yes. And much more: Qt is a full C++ framework which you can base your entire code on, not only the GUI part.
Laurent Gomila - SFML developer

Assassinbeast

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Email
Re: Need some general information about integrating Qt with SFML
« Reply #8 on: November 22, 2012, 01:55:55 pm »
Ok cool, thanks a lot  :D

masskiller

  • Sr. Member
  • ****
  • Posts: 284
  • Pointers to Functions rock!
    • MSN Messenger - kyogre_jb@hotmail.com
    • View Profile
    • Email
Re: Need some general information about integrating Qt with SFML
« Reply #9 on: November 22, 2012, 06:24:25 pm »
As a side-note, something as big as LoL is not something you can expect to try to do alone and not get disappointed (or develop in less than at least 2 years (can take much more be sure of that) if not dropped out of frustration). So for something as ambitious as that you should get more people, games that big are by no means trivial in any way. Not to mention the requirement of a server (or servers) and tons of not-mentioned issues. Take all that into account before you get overwhelmed by the enormous amount of work something that big can take.
« Last Edit: November 22, 2012, 06:26:23 pm by masskiller »
Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!

Finally back into the programming world!

Assassinbeast

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Email
Re: Need some general information about integrating Qt with SFML
« Reply #10 on: November 22, 2012, 11:44:50 pm »
As a side-note ........ Take all that into account before you get overwhelmed by the enormous amount of work something that big can take.

Hehe, ty for you sidenote  ;)

But right now, i still have a tons of things to learn...
Networking, AI, OOP, Qt, Math, hardcore C++ stuff (pointers, polymorphism and other standard c++ libraries).

So i think its gonna take more than 2 years at least just to learn that  ;D

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: Need some general information about integrating Qt with SFML
« Reply #11 on: November 22, 2012, 11:57:53 pm »
So i think its gonna take more than 2 years at least just to learn that  ;D
You can easily multiple this with up to 10... ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

didii

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Need some general information about integrating Qt with SFML
« Reply #12 on: November 23, 2012, 08:19:19 am »
So i think its gonna take more than 2 years at least just to learn that  ;D
You can easily multiple this with up to 10... ;)
Not so very encouraging :P

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
AW: Re: Need some general information about integrating Qt with SFML
« Reply #13 on: November 23, 2012, 10:05:20 am »
Not so very encouraging :P
I'm not gonna tell people what they want to hear, I simply tell the truth. C++ is not a language you 'learn' in a year or two. Because on one side C++ or programming in general is not only about the syntax and the sematic, but it also about code design, which takes much time to learn diffrent patterens and learn when to use what.
On the other side is C++ very complex and you essentially have no restriction; to write good code you need to know how code gets executed and learn why one way of doing things in one situation is better than another.

For a game similar to LL you need a very good understanding of programming and even then, the time it takes to write such a game is large. Don't expect to be able to create a really big game on your on, while others spent month or years developing a game in a team and thos as their job and not as hobby. ;)

Then again everyone as their dream-game and I guess it's a very good motivator (in the beginning), so keep trying to reach your goal, but don't be disapointed if you don't. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Need some general information about integrating Qt with SFML
« Reply #14 on: November 23, 2012, 11:36:48 am »
And very important: Don't begin directly with huge projects. Otherwise they are doomed to fail.

Before you have a realistic chance to master such a big project, you need to gather a lot of experience. You do this by reading books (especially about modern C++, but also on game development) on one side and on writing several smaller projects on the other side. Start with small games, but actually finish them. This may also be helpful if you search a team for a later development: You have some proof that you have the skill and motivation to finish a project.

And don't underestimate the importance of good C++ knowledge. By "good", I mean you know concepts like RAII, type erasure, functionals or templates. You understand why new/delete should be reduced to a minimum, and how STL components (containers, iterators, algorithms) interact with each other. How to decide between static and dynamic polymorphism. What other possibilities of abstractions exist in C++. Why you should avoid global variables where possible. And so on... The reason why this knowledge is crucial, even if advanced, is because it determines your everyday programming. You write code in a completely different way if you do not understand those topics -- usually, code is more complex and error-prone, harder to maintain and less efficient. You will see how much more fun it makes to maintain a project with a well-designed code base (and also how completely frustrating it is to spend days of debugging because of bad code).

Also be aware that programming is only one part of game development. Graphics, audio, artificial intelligence, physics become also important in complex games. Even more, it pays to have a team when developing bigger games.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: