-
-
- (1373)
-
premium membership
-
Posts
976
|
|
I am just adding network support to my next game, and was very impressed by the ease of use of the new network code, it was a very pleasant surprise when I was debugging and I got a message!
However I cannot see any way for a player to create an account.
Have I just missed it?
Or must you add additional code to allow a new player to create a windows live account.
Information is not knowledge, knowledge is not wisdom, wisdom is not truth, truth is not beauty, beauty is not love, love is not music, music is the best! Wisdom is the domain of the Wis (which is extinct).
|
|
-
-
- (9047)
-
premium membership
-
Posts
3,789
|
|
You mean an account for Xbox LIVE? In order to use any of the LIVE services they would have to already have an account to begin with.
If you're talking about using GFWL on a PC game, you cannot use/redistribute it for any games without a publishing deal with Microsoft, so you'll have to use Lidgren or another PC networking library.
Or if you mean an account for your game (a la WoW, for example), then that's something you will have to code yourself as there isn't any built in functionality for that.
"Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet" In Playtest: Avatar Land | The MANLY Game for MANLY Men The signature that was too big for the 512 char limit
|
|
-
-
- (1373)
-
premium membership
-
Posts
976
|
|
I find that a tad confusing, I can, and have, written PC code to create a lobby, search for a lobby, etc.
The network sample comes with a PC version.
All I am trying to do is give a new player an opportunity to create a windows live ID, once they have that I can use the guide to do all the save games etc.
If they don't have a gold membership, okay they won't be able to play online, but surely the PC has the equivalent of the silver membership?
Or is all the code I have just written a complete waste of time......
Information is not knowledge, knowledge is not wisdom, wisdom is not truth, truth is not beauty, beauty is not love, love is not music, music is the best! Wisdom is the domain of the Wis (which is extinct).
|
|
-
-
- (9047)
-
premium membership
-
Posts
3,789
|
|
string Q = "Are you making a PC game or an Xbox game?";
string A = ReplyBox.Text;
if(A == "I'm making a PC only game!")
{
You cannot use LIVE on the PC for anything other than testing purposes. You do not need LIVE profiles for an online PC game since you won't be using LIVE. So no, it wasn't a waste of time at all, but you'll need to change your networking library to something other than LIVE. Lidgren has pretty much the same syntax so I would start there.
}
else if(A == "I'm making an Xbox game!")
{
You can prompt the user to sign in if they already aren't, and tell them they can't use the LIVE features if they only have Silver. I think much of this is already handled by NetworkStateManagement, as is the whole lobby system.
}
else if(A == "Both - it's going to be cross platform!"
{
Xbox and PC builds can't interact with each other, so it can't be truly cross platform (PC gamers playing with Xbox gamers). But if you're going to have two versions of the game, then you'll still have to change the networking library in answer 1 to get it running (legally) on the PC.
}
Does that answer your question? ;-)
"Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet" In Playtest: Avatar Land | The MANLY Game for MANLY Men The signature that was too big for the 512 char limit
|
|
-
-
- (1373)
-
premium membership
-
Posts
976
|
|
Well that's a bit of a downer.
What is the point of having support for all the networking stuff on the PC then?
You have to test xbox code on the xbox....
Using libgren, or winsock, or anything else won't get you lobby support, you will have to set up your own server and manage that.
In fact why call it Windows Live, if you can't actually use it on Windows?
Information is not knowledge, knowledge is not wisdom, wisdom is not truth, truth is not beauty, beauty is not love, love is not music, music is the best! Wisdom is the domain of the Wis (which is extinct).
|
|
-
-
- (1373)
-
premium membership
-
Posts
976
|
|
Sorry I think you are wrong.
Check this thread
http://forums.xna.com/forums/p/22786/121991.aspx#121991
According to this you CAN use live on the PC.
Though I can't see any answer to my original question.
Information is not knowledge, knowledge is not wisdom, wisdom is not truth, truth is not beauty, beauty is not love, love is not music, music is the best! Wisdom is the domain of the Wis (which is extinct).
|
|
-
-
- (9047)
-
premium membership
-
Posts
3,789
|
|
Stainless:What is the point of having support for all the networking stuff on the PC then?
If you only have 1 Xbox + Premium Membership + Gold account and can't rope anyone else into helping you (or want to test it a lot yourself), then you can use it to test most of your networking code with a PC to Xbox connection, using System Link.
Stainless:Using libgren, or winsock, or anything else won't get you lobby support, you will have to set up your own server and manage that.
Not really. Look at how the NetworkStateManagement Sample does it - it has support for a really nice lobby system, yet it's all peer to peer - there is no dedicated server set up. Why couldn't you just copy that and replace the networking bits with the equivelent Lidgren commands?
Stainless:In fact why call it Windows Live, if you can't actually use it on Windows?
Because there actually is a service, much like Xbox Live, called Games For Windows Live. It requires a publishing deal with Microsoft to use in your game if you wish to distribute or sell it. They included the functionality just so you could easily test your networking code meant for the Xbox.
Stainless:
Yes - for testing purposes only. You cannot use it in a game you want to sell or otherwise distribute to non-developers, unless you have a publishing deal with Microsoft. See this FAQ - it should answer that question definitively.
Stainless:Though I can't see any answer to my original question.
Probably because your question is moot. ;-) If you're on Windows you can't use LIVE anyway so there's no point in making extra work for yourself, and on Xbox the framework takes care of most of it for you. And if you're on the PC but are making some type of MMO and want to have accounts and profiles, you'll have to do that yourself anyway.
"Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet" In Playtest: Avatar Land | The MANLY Game for MANLY Men The signature that was too big for the 512 char limit
|
|
-
|
|
|
Stainless:According to this you CAN use live on the PC.
You can, but you cannot redistribute your game on Windows then.
Stainless:Though I can't see any answer to my original question.
That's not your games business, e.g. it is provided through the GfWL UI (enter the thing and open the account panel).
We are boki. The rest is known. The not so known part of the rest: It is Björn or Bjoern, but never Bjorn. Twitter ~ Bnoerj ~ SharpSteer ~ SgtConker.com
|
|
-
-
- (1373)
-
premium membership
-
Posts
976
|
|
Thanks that makes more sense.
Though I think it is a little mean to give us all this functionality, then take it away again.
I feel like a kid who has just had his lolly stolen.
Information is not knowledge, knowledge is not wisdom, wisdom is not truth, truth is not beauty, beauty is not love, love is not music, music is the best! Wisdom is the domain of the Wis (which is extinct).
|
|
-
|
|
|
Stainless:Thanks that makes more sense.
Though I think it is a little mean to give us all this functionality, then take it away again.
I feel like a kid who has just had his lolly stolen.
I really felt the same when I made research on online game. Xna is a way too focused on xbox games I guess everybody was aware except me.
But was I didn't understand and I guess stainless would be interested too is about the peer to peer thing.
How can you join a game using peer to peer ? I mean is it a way to do a online game without using an dedicated server.
|
|
-
|
|
|
This was actually one of the things that bugged me about XNA. Because the focus seems infinitely more focused on the 360 side of things, us Windows developers kind of get the shaft in the long run. They're fine offering entire frameworks of functionality on the 360, yet requesting a little more exposure on simple things like the GameWindow object so we can control a little more out of the box gets little attention (For example, being able to hook the keyboard form events and not being required to build our own keyboard handler in a fashion similar to using DirectInput just so we can support some form of typing)
I've got nothing against the XNA developers, and in fact I think they're doing a bang up job. Still, I wouldn't mind being thrown a bone now-and-again in regards to Windows specific XNA development.
|
|
-
-
- (1373)
-
premium membership
-
Posts
976
|
|
black reaper:
How can you join a game using peer to peer ? I mean is it a way to do a online game without using an dedicated server.
I have been wracking my brain to try and work this out, I cannot think of any way?
Information is not knowledge, knowledge is not wisdom, wisdom is not truth, truth is not beauty, beauty is not love, love is not music, music is the best! Wisdom is the domain of the Wis (which is extinct).
|
|
-
-
- (14748)
-
premium membership
Team XNA
-
Posts
9,342
|
|
|
|
-
|
|
|
Nick Gravelyn:
yeah I didn't look through it because it was using live, so from what I understand you can't use live with PC.
I'm not being lazy asking, it's just I don't want to start learning networking to just realize half way it was impossible. I'm not planning on doing an Xbox game so I'll try to ask the question some other people may be interested. ( the ones like me not really aware of networking on xna)
Is it a way using lindgren or another library to create a online game without using a dedicaded server ? If so how can people join the session ?
Is it possible from my simple website to keep the record or the session ? Or is it just allowed to do so with a dedicated server ?
Sorry stainless if I'm hijacking you thread. I hope those questions are related to what you wanted to know. If not I'll create a new thread.
cheers
|
|
-
-
- (14748)
-
premium membership
Team XNA
-
Posts
9,342
|
|
black reaper:yeah I didn't look through it because it was using live, so from what I understand you can't use live with PC.
Network topology is network topology. The APIs will change, but you should still be able to learn the deal with peer to peer networking from it.
black reaper:Is it a way using lindgren or another library to create a online game without using a dedicaded server ? If so how can people join the session ?
One person plays "host" so that the other can connect, but once connect each box shares the burden of updating the game.
black reaper:Is it possible from my simple website to keep the record or the session ? Or is it just allowed to do so with a dedicated server ?
Depends on how you set up your game and what your web server allows. Anything's pretty much possible on Windows with all the various libraries out there.
|
|
-
-
- (1373)
-
premium membership
-
Posts
976
|
|
The problem with peer to peer networking for a game is that you need to know the other player.
Most online games you say you want to play online and either you are given a list of available games to join, or you are thrown into a game.
At no time do you have to enter an IP address, or such like.
I cannot see any way a peer to peer system can handle a lobby.
Regardless of API or what happens after the game has been negotiated, I just cannot see any way to find another player to play against without a lobby system.
Which means a dedicated server somewhere
Information is not knowledge, knowledge is not wisdom, wisdom is not truth, truth is not beauty, beauty is not love, love is not music, music is the best! Wisdom is the domain of the Wis (which is extinct).
|
|
-
|
|
|
I've been searching information ebook on peer to peer connection and it's not that clear. from what I could understand you'll need a sever ( maybe less demanding ) to hold a record of the current game or the lobby. Maybe on lindgren forum you could find some information.
but now because we are free to do as we please it's really hard to pick a way and just stick to it because you don't really know the advantage and disadvantage. So yea you are free to do whatever you want but it's seem a way harder than just using live.
I thought of my website, is deploying a lobby that hard on a simple website if I'm using a peer to peer.
But the question is if anyone manage to create a online game for pc without live and if so where can I found some valuable information. Also is this situation will be forever ? Is the Xna team planned to find a workaround ?
cheers
|
|
-
-
- (9047)
-
premium membership
-
Posts
3,789
|
|
I don't see why a non-LIVE P2P system wouldn't work. It's the same principle as Xbox-to-Xbox. The networking APIs don't have anything special in them for lobbys (well they do, but nothing that couldn't be easily replicated with just a little bit of coding).
Why don't you take the P2P sample, and replace every XNA networking call with the equivelent from Lidgren, and see what happens?
black reaper:from what I could understand you'll need a sever ( maybe less demanding ) to hold a record of the current game or the lobby. Maybe on lindgren forum you could find some information.
Why? If you want to save statistics for "most aweseome n00b-pwner", then you can do that with your current web host - no dedicated server necessary. You can find very detailed instructions on it here.
black reaper:Also is this situation will be forever ? Is the Xna team planned to find a workaround ?
The only workaround would be some type of "Community Games for Windows" serivce, and while it's been requested many times before, all the team has said was "we're looking into it" or some equally vague comment. Read this FAQ for why.
And honestly, from my experience you can read all the books and theory you want, but it just doesn't compare to opening up VS and tinkering until you find something that works. I would start with the P2P sample and convert it to Lidgren.
"Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet" In Playtest: Avatar Land | The MANLY Game for MANLY Men The signature that was too big for the 512 char limit
|
|
-
-
- (15398)
-
premium membership
MVP
-
Posts
8,548
|
|
UberGeekGames:I would start with the P2P sample and convert it to Lidgren.
Seconded. With all the time that's been spent whining about not being able to use GfWL you could have been done with the networking piece! :)
Jim Perry - Microsoft XNA MVP If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job. Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki. Please mark posts as Answers or Good Feedback when appropriate.
|
|
-
|
|
|
I'm already working with lidgren and p2p.
Anyway you probably know better even if you are not answering the question.
|
|
-
-
- (9047)
-
premium membership
-
Posts
3,789
|
|
So what is your question?
If you really need a server, you may not have to get a dedicated one if you're doing a really small scale game. Look at the tutorial I linked to above. It might be able to be adapted so that instead of high scores, when a player hosts a game it writes his IP to the file on the server. Then when another player searches for a game, it reads the same file from the server, and can link up with the other player. It may work for a small game with only a few players on at a time. Now if you're doing WoW 2 then you'll probably need one or more dedicated servers, especially if you have 100 players in the same area and need to sync them.
"Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet" In Playtest: Avatar Land | The MANLY Game for MANLY Men The signature that was too big for the 512 char limit
|
|
-
-
- (13069)
-
Team XNA
-
Posts
8,589
|
|
Stainless:Regardless of API or what happens after the game has been negotiated, I just cannot see any way to find another player to play against without a lobby system.
Which means a dedicated server somewhere
Exactly.
There are fundamentally only four ways to establish a network connection:
- Ask the user to provide the address of the machine to connect to (old-skool approach: not a good user experience and not much used any more)
- Send a broadcast UDP packet, have hosts listen for this broadcast and respond with a packet identifying themselves (this is how system link networking works: downside is that UDP broadcasts only reach within the local subnet)
- Give the host a fixed name so the client can just be hardcoded where to connect to (good approach for server based games, MMOs, etc)
- Run a matchmaking server which has a fixed name, and which can pass on the addresses of whatever hosts are currently available (approach used by Xbox LIVE)
A secondary problem in addition to the need to host a matchmaking server is how you identify the machines that are trying to connect to each other. In a simple world, every machine would have a unique IP address, so the matchmaking process could just pass these addresses around, after which everyone could use them to connect to everyone else.
Trouble is, the Internet is no longer so simple. Most home users do not have a unique IP address: instead they typically sit behind some kind of NAT box that allows their provider to serve a larger number of customers with a smaller number of actual addresses. This is a nightmare for matchmaking, because if I contact the server, the server may see an incoming packet from one address, but if the server sends that address on to a second machine and this other machine tries to contact me using it, chances are it will get either no connection at all, or end up talking to an entirely different machine by mistake!
Dealing with NAT is a really hard problem. The LIVE networking infrastructure does a pretty good job of it, but is still far from perfect: most home users can play on LIVE even if they are behind a NAT, but there are always corner cases where the NAT traversal algorithm fails so two particular users are unable to connect to each other.
Of course you can decide to ignore this issue, but if you do, your game will only be playable by people who have an open NAT, or are able to configure their NAT hardware to route your game traffic via a fixed port mapping (which rules out most people with a regular cable internet connection).
XNA Framework Developer -
blog - homepage
|
|
-
|
|
|
@Ubergeek the problem was asked by stainless and Shawn just answered it
@ Shawn what do you think about the method sugessted by ubergeek? ( even you still need a web hosting)
|
|
-
-
- (9047)
-
premium membership
-
Posts
3,789
|
|
@black reaper: Stainless's problem was about using profiles in GFWL, which I had explained wasn't possible. Did I miss a post somewhere? [edit]: Yup, I see it now.
@Shawn: Ah, that makes more sense. Sorry, I thought I knew what I was talking about until you came in. :-) It's been awhile since I've done any PC networking, and I thought you could do it that way.
In that case, my approach might actually work if it's on a small enough scale. I'd try it myself but my current web host doesn't allow PHP scripts. What do you think Shawn?
"Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet" In Playtest: Avatar Land | The MANLY Game for MANLY Men The signature that was too big for the 512 char limit
|
|
-
-
- (13069)
-
Team XNA
-
Posts
8,589
|
|
black reaper:
@ Shawn what do you think about the method sugessted by ubergeek? ( even you still need a web hosting)
I'm just guessing here, but it seems like it could work apart from two issues:
- That won't give you any kind of NAT traversal technology, so the game will only work for players who are not behind restrictive NATs.
- It will be hard to know when to remove sessions from the server if they are rudely interrupted (host quits or loses network connection and never sends the "I'm going away now" notification) - a robust matchmaking system usually employs some kind of heartbeat to make sure each host they are advertising is still alive.
XNA Framework Developer -
blog - homepage
|
|
|