1
\$\begingroup\$

I am making a small game for a course in my school and was planning on using QT to build it. I have worked with pygame[last year] and turbo c++[about 5 years agao] to make games, small easy stuff. This time I am planning to make a game that supports multiplayer over lan, the game idea is simple however, information about the game is here.

I was hoping to know from you all, if it is a good choice to use QT for this! I am totally new to QT, but a decent c++ programmer. Also what problems would I encounter when it is a LAN game, for a start I just want it to support 2 players on the local network.

Thanks

\$\endgroup\$
1
  • \$\begingroup\$ what is your target platform? is it going to be a windows based game or linux/mac based game? \$\endgroup\$
    – Ali1S232
    Sep 18, 2011 at 14:27

2 Answers 2

1
\$\begingroup\$

Using QT is not a bad choice, more important is the networking. As you are developing for LAN you should be alright with TCP networking. In fact I'd even go so far as to recommend it to a first timer. Just be aware when you are working with TCP it will guarantee delivery, guarantee packets arrive in order, and provide a stateful connection for you. The problem with TCP is it doesn't work well over the Internet, the things it guarantees come at a price that increases with bad connections, which over the Internet it becomes too costly for some applications. Either way I would recommend the use of RakNet because it's open source you can learn a lot of useful tips for networking in general. Google for website URL. Good luck!

\$\endgroup\$
0
1
\$\begingroup\$

As it is over a LAN there shouldn'nt even be a discussion about UDP/TCP, go with TCP as it is much more easier to use.

Qt for a game or not?

That is a completely different history, go with it if you feel like it, it is a nice framework.

What you should check out is IP broadcasting (or scanning as routers usually just dismiss IP broadcasts) or if you can, Ethernet broadcast so you can find the other computers on the network fast and easily (you will want to know where the PC that hosts the game is).

Also read up on dead reckoning if you don't know that one or go with the 'ol 'lock step' method (simpler but that will be hell to use over the internet :-) to synchronize gamestates.

Anyway, do use the technology you feel most at ease with, that usually does the trick.

[edit] BTW: a must have for network programming is Beej's Guide to Network Programming simple, fun and precise.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged .