• 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.
Sign in to follow this  
Followers 0
!Null

Networking A Game

10 posts in this topic

Okay so I'm taking this courses while I'm abroad and our final big project is to build a game (which is fine) and network it.

The latter is my concern. We had a lecture / lab on building a echo server in C which i got most of I guess. But now I'm not sure how I'm suppose to mold this to help me network my game.

The game is developed using a scripting language developed by the college (which has heavy hints of C++).

I'm not looking for you guys to 'do my homework for me' I'd just appreciate some step in the right direction.

If you need to know anything just let me know. Edited by !Null
0

Share this post


Link to post
Share on other sites
[quote name='!Null' timestamp='1354038870' post='5004590']
It's an FPS
[/quote]

Wait a second. From a one lecture that teaches you an Echo Server, you're supposed to know how to program an FPS networked game? I think something is missing here. Is it just a 2 player game or a true multiplayer (ie, 2 - 16)?

FWIW, creating a truly robust FPS Networked game is PRETTY FRIGGING HARD. Now, you can create a protocol that runs good over LAN, but would do poorly over the internet that's not too difficult (not too difficult for someone who understand networking protocols at least).

BTW, there's a networking forum here that has loads of information that you may want to look over all the posts there.
0

Share this post


Link to post
Share on other sites
[quote name='BeerNutts' timestamp='1354047137' post='5004647']
[quote name='!Null' timestamp='1354038870' post='5004590']
It's an FPS
[/quote]

Wait a second. From a one lecture that teaches you an Echo Server, you're supposed to know how to program an FPS networked game? I think something is missing here. Is it just a 2 player game or a true multiplayer (ie, 2 - 16)?

FWIW, creating a truly robust FPS Networked game is PRETTY FRIGGING HARD. Now, you can create a protocol that runs good over LAN, but would do poorly over the internet that's not too difficult (not too difficult for someone who understand networking protocols at least).

BTW, there's a networking forum here that has loads of information that you may want to look over all the posts there.
[/quote]

yep you got it right.

We haven't been given the exact spec yet but i get the impression that a 1v1 would be enough but even if you got a 1v1 going it would be just as 'easy' to get more players going.

If i could get it working over LAN that would at least be a step. I do know a little about networking but if I'mhonest I don't really like doing it from a programmatic stand point.

I've been looking through some of the functions and stumbled through some networking functions

[quote]
NetAcceptTCP();
NetClose();
NetConnectTCP();
NetCreateChannel();
NetCreateChannelTCP();
NetDataReady();
NetGetIP();
NetReceiveFrom();
NetReceiveFromTCP();
NetSendTo();
NetSendToTCP();
NetSetMulticastIP();
NetVarReceiveFrom();
NetVarReceiveFromTCP();
NetVarSendTo();
NetVarSendToTCP();
[/quote]

Also thanks I might move the post over. And i'll have a look a look through there too.
0

Share this post


Link to post
Share on other sites
[quote name='!Null' timestamp='1354047514' post='5004651']
We haven't been given the exact spec yet but i get the impression that a 1v1 would be enough but even if you got a 1v1 going it would be just as 'easy' to get more players going.
[/quote]

That's not really true at all. If you know you're making a 2 player game (1v1), then you wouldn't (or at least I wouldn't) waste time on making it client server, you should just make it peer-to-peer.

If it were me, and for a school project (with a strict deadline), I'd design the 1v1 FPS game like this:
Every update sent will include the players position and velocity. If nothing substantial happens (player is just moving), then you send an update every x milliseconds (say 100 mS) to the remote player.
The Clients sends immediate updates for actions (Bullet Fired, item picked-up, bullet hit).
So, when one client gets an update from the other player, he ensures the player is where he's supposed to be, and gives him his current velocity. If a special action occurs, like bullet fired, he puts the bullet into his local world and starts to move it.

All bullet hits happen locally (so, if the local player see it hit himself, it happens, but if the local player see the bullet hit the remote player, it may not, if that remote player has actually moved on his local machine).

Anyway, that's the general idea I'd start with since it's fairly simple and shouldn't be too difficult to implement in a short amount of time. Of course, there are tons of other ways you could do this, and mine may not even be the bets for this situation, but just one I thought of.

Good luck.
0

Share this post


Link to post
Share on other sites
[quote name='BeerNutts' timestamp='1354051866' post='5004683']
That's not really true at all. If you know you're making a 2 player game (1v1), then you wouldn't (or at least I wouldn't) waste time on making it client server, you should just make it peer-to-peer.
[/quote]

You say that as if making it "peer-to-peer" would be easier than establishing a client-server model. In my experience, it's the other way around; If you run the game on the server, and treat clients as dumb input/output terminals, you greatly simplify the architecture of the network system, and there's a whole class of problems that you don't have to worry about (like cheating, or overly ridiculous sync issues).

[b]@!Null[/b]

I have a video tutorial that demonstrates how one could design and implement a relatively simple networking system:

http://www.youtube.com/watch?v=4xZRfzOtxzA

I'm doing this within the blender game engine, using python, but the concepts are the same no matter what languages/platforms you use.

Hope that helps
1

Share this post


Link to post
Share on other sites
[quote name='Goran Milovanovic' timestamp='1354128116' post='5005025']
You say that as if making it "peer-to-peer" would be easier than establishing a client-server model. In my experience, it's the other way around; If you run the game on the server, and treat clients as dumb input/output terminals, you greatly simplify the architecture of the network system, and there's a whole class of problems that you don't have to worry about (like cheating, or overly ridiculous sync issues).
[/quote]

In my experience (having done both), I think it is easier to do p2p for 1v1 games, but that may not be the case with everyone. Hopefully, by the time the OP has to start developing it, he'll have a grasp on doing either method and can choose which he wants. BTW, I don't think he's going to be concerned with cheating for a class project.

I'll have to check out your video, it looks interesting, thanks!
0

Share this post


Link to post
Share on other sites
Thanks guys for all the support. I'll continue to try to make this work and when I'm done i'll post the result (after its submitted otherwise It wont get marked at all)

Goran Milovanovic
Thanks I'll have a look at it :)
0

Share this post


Link to post
Share on other sites
[quote name='!Null' timestamp='1354047514' post='5004651']
I've been looking through some of the functions and stumbled through some networking functions

(list of functions)
[/quote]

I think there's a big assumption being overlooked here: they're using an academic-proprietary scripting language. That may well remove a lot of the complexity of the task depending on how the script-hooked methods are designed.
0

Share this post


Link to post
Share on other sites

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  
Followers 0