• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

j33lee

What is the best way for players to communicate with server

16 posts in this topic

Ah, but it's not...

Especially not if the game is all (or mainly) server side, and you are even remotely interrested in clients that sit behind a firewall. Sockets won't bypass a firewall (in general).

In this case you need to move up a layer, and go for HTTP - it is not as fast but for a lot of applications it's a lot easier, at it has benefits (such as the firewall issue)...

I'll launch a new site in the comming weeks, which is a client/server game using HTTP, that should give an impression of what can be done with HTTP. (Java for the UI on the client, ASP for the prototype server - that might change to ISAPI, or MTS components)

/Niels

0

Share this post


Link to post
Share on other sites
Firewalls are easily accounted for. SOCKS4 for TCP, SOCKS5 for UDP.

As for HTTP...why punish yourself unnecessarily??? ;-)

------------------
DavidRM
Samu Games

0

Share this post


Link to post
Share on other sites
Correct me if I'm wrong, but doesn't both SOCKS4 and SOCKS5 require special measures with the client-side firewall, such as opening specific ports? Or possibly installation of client-side proxies?

Anyhow, I want people to be able to play my game from work (Yes I know, I'm a bad guy ) and I generally don't think IT departments are too trilled about people installing various proxies on the inside of the firewall ...

/Niels

0

Share this post


Link to post
Share on other sites
I've never implemented SOCKS5, but I use SOCKS4 in my game, Artifact. So long as the firewall they have supports the SOCKS4 protocol, they just have to supply the proxy server address and port # and away we go... =)

I also achieve a certain amount of "at work" players by having Artifact run in a "normal" window. It's resizeable, so they can make it fit behind their spreadsheet app with only a gold "A" icon showing in the taskbar... ;-)

------------------
DavidRM
Samu Games

0

Share this post


Link to post
Share on other sites
Are there any good net refrences to these protocols? SOCKS4 and SOCKS5 that is?

-ddn

0

Share this post


Link to post
Share on other sites
It's not exactly a specification...but here's how you use SOCKS4.

First, you point the socket to the proxy server IP and port # and initiate the connection.

Second, when the connection is established, you send the following information:

4 (8-bit value: 0x04)
1 (8-bit value: 0x01)
Port # (16-bit value)
IP address (32-bit form)
NULL (8-bit value: 0x00)

That's it.

The 4 specifies SOCKS4. I forget what the 1 does. The port and IP are obvious.

It's been a while since I researched and implemented this, so I feel a bit rusty. Hope this is helpfule.

------------------
DavidRM
Samu Games

0

Share this post


Link to post
Share on other sites
Hm! Never heard of companies opening for socks4 or 5 - do you have any numbers, or at least an idea as to how widespread this is?

I could imagine that it would be common if some large corperate systems already used it - you could kind of piggy bag your way through the firewall . But as far as I know, most companies are open for HTTP ONLY - and that sort of settles it for me.

There's no doubt that I'd prefer UDP for the performance gain, but it's no good if you miss your target audience ...

/Niels

0

Share this post


Link to post
Share on other sites
At the last place I worked, which was about a 1000-employee technology company, the firewall proxy was "invisible." If you were on the inside, getting out required no extra effort. However, getting *in* was pretty tightly locked down.

I don't know how typical that is, though.

I added the proxy support primarily so that players with home networks and modem sharing could play. But I do have a number of worker-players... =)

------------------
DavidRM
Samu Games

0

Share this post


Link to post
Share on other sites
Wow! Lots of responses! That's great! Thanks to everyone. I'm going to extend my question a bit farther. Does anyone know where I can get information on, or knows how to do socket programming in C++?
0

Share this post


Link to post
Share on other sites
The day I work for a company that allows the use of Sock4/5 is the day I buy you all a bottle of booze.

IT companies HATE socks4 and socks5 simply because it DOES allow tunneling of TCP/IP data.

HTTP is the only real way to get through firewalls, and you have to do all kinds of tricks to make it work -- but once it does its really worth it.

0

Share this post


Link to post
Share on other sites
Socks4 is great, I've got a couple players on my game who play through various government organizations' T1s/T3s at work, and normal places at work, but I think it's funny, tax dollars working for YOU and all that other stuff.

If you really wanted to be evil, you could have a server side approach to bypassing firewalls. Make the client establish a keep-alive connection with the server and have it poll it for packets every half seconds with a GET command...and have it use GET with your actual packet afterwards for sending packets. I dunno it might work it sounds sneaky and underhanded

0

Share this post


Link to post
Share on other sites
Zer: Amazing! That's exactly the same idea I had just a couple of weeks ago. I was thinking of making a program that listens on a local port on the machine, then, when you want to use an application, tell it to connect to that local port. Then the program will ask for for the real destination and port.

Then, it connects to a predefined server on the Internet using HTTP, tunneling its packets through the proxy, to the server, which then masquerades them to the REAL destination. Bingo! You have complete access to every server and every port using nothing but a restrictive HTTP proxy!

Anyone here interested in doing it with me?

------------------

- Splat

0

Share this post


Link to post
Share on other sites
Actually, I already did that in my previous job - it works flawlessly, and the funny thing was, that it outperformed the original strict TCP version, despite the fact that the HTTP tunneling was an additional layer (I.e. no changes was made to the original code, neither server nor client). I figure the speed increase was caused by HTTP using UDP and not TCP, but I really don't know...

/Niels

0

Share this post


Link to post
Share on other sites
Hi,
I'm just starting out, and I was wondering what was the best way for players to communicate with the server. Is it through sockets? The multiplayer game I have in mind is one which the entire game is on the server (so no game data lies on the client side) and it's in real time.
I hope my jabbering makes some sense.
Thanks in advance.
0

Share this post


Link to post
Share on other sites
Hm! It's not that I don't want to, but I'd probably be violating a few hundred copyright laws - Like I said, the code belongs to a company I used to work for, sorry.

It's not a big deal though - The client was a Java class inherited from the Socket class to make it look like a socket. Internally, it wrapped binary socket data in HTTP, called the HTTP server extension (an ISAPI module). The ISAPI extension unwrapped the data, and forwarded it (using sockets) to the original socket server). There's a bit of book keeping and error handling, but other than that, it's a no-brainer ...

/Niels

0

Share this post


Link to post
Share on other sites