Page 1 of 1

Looking for help (formerly Unable to test networking in XNA)

Posted: Fri Nov 12, 2010 11:29 pm
by EccentricDuck
After working on networking in XNA for about half a year now, stupidly not testing it along the way (for about half of that it was unbuildable because I was refactoring a 2D framework into a 3D framework to take advantage of the built-in networking code). Now that I'm trying to run tests on it with a friend of mine, I found out that you're not able to test it with networking enabled unless the other person has a Creator's Club membership. This puts me in a bit of a pickle since I don't personally know anyone else who has a Creator's Club membership.

I assumed that there would be support for testing it without too much hassle since they have areas in the community with code samples dedicated to adding networking to your game. Of course, anyone would need to modify these for their own use, and you'd then expect that you'd need to test that with other players. Unfortunately, this isn't allowed unless they're another "Creator" because Microsoft doesn't trust developers to not give away networked games to their friends haphazardly. I can understand their hesitation in that regard, but it certainly presents me with a major dilemma.

There is however a potential solution. Might I be able to send one of you who has a Creator's Club membership my current build to test it? I can think of one developer on here who for sure has one, and there may be others that I'm not aware of. It would be an enormous help to me! :bow:

Re: Unable to test networking in XNA

Posted: Fri Nov 12, 2010 11:57 pm
by EdBoon
EccentricDuck wrote:After working on networking in XNA for about half a year now, stupidly not testing it along the way (for about half of that it was unbuildable because I was refactoring a 2D framework into a 3D framework to take advantage of the built-in networking code). Now that I'm trying to run tests on it with a friend of mine, I found out that you're not able to test it with networking enabled unless the other person has a Creator's Club membership. This puts me in a bit of a pickle since I don't personally know anyone else who has a Creator's Club membership.

I assumed that there would be support for testing it without too much hassle since they have areas in the community with code samples dedicated to adding networking to your game. Of course, anyone would need to modify these for their own use, and you'd then expect that you'd need to test that with other players. Unfortunately, this isn't allowed unless they're another "Creator" because Microsoft doesn't trust developers to not give away networked games to their friends haphazardly. I can understand their hesitation in that regard, but it certainly presents me with a major dilemma.

There is however a potential solution. Might I be able to send one of you who has a Creator's Club membership my current build to test it? I can think of one developer on here who for sure has one, and there may be others that I'm not aware of. It would be an enormous help to me! :bow:
I would definitely be willing to help you out no problem, but this weekend I have family in town, possibly later on Sunday but if i cant find a little time and if not then I can next week for sure. Throw me a PM w/ an email or something and I'll keep in touch.

Re: Unable to test networking in XNA

Posted: Sun Nov 14, 2010 2:53 am
by EccentricDuck
All right, I've got the latest build up here for anyone who wants to try it (as I said above though, you need a Creator's Club membership):
http://compscistu.capilanou.ca/~davidra ... aBuild.zip

The game isn't currently a full game, but it seems pretty stable. There are built-in, partially complete mechanisms for scoring and win conditions that are disabled in this build, as well as the basic for a HUD that is currently disabled.

Also, I need to do some sort of optimization. There's a console window open with the game and it will count the number of balls you drop behind you. When they get too high the game really starts to lag.

You need to have Games for Windows Live installed to run it (as well as having a Live ID w/ Creator's Club membership). If you don't have a Creator's Club membership, the game will generate a Windows error report when you try to log in. Assuming you logged in, host an internet or network game to start. If you have an xbox controller, you can select the color of your craft. If you have an xbox 360 controller, feel free to plug it in and play it with that (that's what it's being designed for anyway).

WASD is to move, arrows keys shift the camera, shift drops spheres behind you that you can collide with (collide 5 times and you blow up), and escape will prompt you to exit the game.
Image
Image
Image

Re: Looking for help (formerly Unable to test networking in XNA)

Posted: Mon Nov 15, 2010 5:36 pm
by EccentricDuck
Currently, I'm just using a distance squared collision for the spheres. That's one of the reasons that I can't go past a few hundred of those spheres without noticing some kind of lag (and up around 500 it starts to get really bad).

Following an idea from my comp sci instructor, I'm going to try an array based approach for dropping the spheres and then tracking collisions. I'll only track collision with spheres that are in an adjacent spot on the plane. I could use a quad tree too I suppose (or oct tree, but you only ever move on a flat plane corresponding to the side of the cube shaped surface that the game takes place on), but I've never implemented one and this sounds like it'd fit just fine with my static, cube-shaped level layout.

I intend on implementing that, as well as the HUD on Thursday if I can (although if I get an opportunity to test networking instead I'll jump on that). I'd also like to post a video since there seems to be interest in viewing people's projects (you'd think I'd have caught on to that sooner given what these forums are based around ;) ).

Re: Looking for help (formerly Unable to test networking in XNA)

Posted: Mon Nov 15, 2010 6:03 pm
by epicasian
I just wanted to say, I love the style of it. :D

</offtopic>

Re: Looking for help (formerly Unable to test networking in XNA)

Posted: Wed Nov 17, 2010 3:43 am
by EccentricDuck
Glad you like it :) I'm using a shader for post-processing blur effects to give that fuzzy warm glow effect, and using another basic shader for coloring (which will correspond to players 1 through 6, blue being player 1). Aside from the model for the player and the balls (which are just models based on basic geometric shapes), everything graphical is programmed in (partially to make up for my lack of skills with modeling/textures).

The grid is done using primitives that are loaded into the graphics card's vertex buffer, then it connects them point-by-point using a simple algorithm (which basically just goes through which order to connect them in and creates a list of indices that can also be uploaded to the card - so it can handle the ~10 000 vertices pretty easily since the majority of the processing and transfer of data is done only once and it's all stored in the VRAM.

Re: Looking for help (formerly Unable to test networking in XNA)

Posted: Wed Nov 17, 2010 6:48 am
by EdBoon
So sorry, i know i said i could get to it prob monday but i started working on my game and couldnt stop, and yesterday, well, assassin's creed brotherhood came out :) I'm going to try and find time tonight.

Re: Looking for help (formerly Unable to test networking in XNA)

Posted: Wed Nov 17, 2010 6:59 pm
by EdBoon
you ready to test it out? let me know, jamesonisu@gmail.com

Re: Looking for help (formerly Unable to test networking in XNA)

Posted: Wed Nov 17, 2010 9:49 pm
by EccentricDuck
EdBoon wrote:So sorry, i know i said i could get to it prob monday but i started working on my game and couldnt stop, and yesterday, well, assassin's creed brotherhood came out :) I'm going to try and find time tonight.
That's all right, I've been pretty busy the past few days as well.

Does the game run properly in a solo session for you? I'll check back here periodically - give me a heads up if you're still up for it.

Re: Looking for help (formerly Unable to test networking in XNA)

Posted: Sat Nov 20, 2010 8:35 am
by EccentricDuck
EdBoon, was a big help. I finally got to verify that the networking did actually work, and to my surprise there weren't any major errors aside from one rather wacky one that only sort of seems like a bug.

Networking was a big success on Thursday, a few minor bugs were worked out, and names now render to the screen for the HUD. Since making some modifications to scale of the gameplay area, I'm not as worried about performance issues. While testing, we got up to about 1300-1400 objects without experiencing too much lag (once modifications to the scale of the grid that the game takes place on were made). I'm not entirely sure why that made such a big different, but hey, I'll take my wins where I can get them :) Xbox testing still needs to be done so performance could still be an issue (or not, it may run it far smoother than my laptop), but I'll deal with that when I get there.

I'll try to get a video clip as well - I meant to take one while testing networking but the thought totally slipped my mind. I've never been one for catching things on video, but I want to get something up for others to see.

Re: Looking for help (formerly Unable to test networking in XNA)

Posted: Mon Nov 22, 2010 9:23 pm
by EdBoon
EccentricDuck wrote:EdBoon, was a big help. I finally got to verify that the networking did actually work, and to my surprise there weren't any major errors aside from one rather wacky one that only sort of seems like a bug.

Networking was a big success on Thursday, a few minor bugs were worked out, and names now render to the screen for the HUD. Since making some modifications to scale of the gameplay area, I'm not as worried about performance issues. While testing, we got up to about 1300-1400 objects without experiencing too much lag (once modifications to the scale of the grid that the game takes place on were made). I'm not entirely sure why that made such a big different, but hey, I'll take my wins where I can get them :) Xbox testing still needs to be done so performance could still be an issue (or not, it may run it far smoother than my laptop), but I'll deal with that when I get there.

I'll try to get a video clip as well - I meant to take one while testing networking but the thought totally slipped my mind. I've never been one for catching things on video, but I want to get something up for others to see.
hey let me know how it works out when you test on 360. I will be interested in how it responds. For example, in my game I can get to about 2500 enemies on pc before it starts to lag at all, but on 360 it lags at 10 (not a typo). Obviously i need some tweaking geared towards how the 360 processes things. but i will be interested to see if you experience a performance hit. From what I have come across on the xna forums, usually you will find a big performance hit from pc to 360 if your not aware of the common coding mistakes that lag up 360. Still trying to figure out where all the garbage is coming from on my game because the garbage collector runs about 3 times a second which is pretty bad, but still not the cause to run from 16ms frames to 150+ms frames. again let me know, and if u need help testing again just ask.

Re: Looking for help (formerly Unable to test networking in XNA)

Posted: Thu Dec 23, 2010 9:55 pm
by EdBoon
sooo.. still up for helping me test a few things for online multi-player in my game?? :)
just let me know,

does anyone else have 360 and creators club membership?

Re: Looking for help (formerly Unable to test networking in XNA)

Posted: Fri Dec 24, 2010 9:11 pm
by EccentricDuck
Ah, sorry, I missed your last response. I still haven't had a recent test on the 360 - there was an error the last time I tried. I worked got an exception handler/debug screen to boot up on screen when the error pops up so I figured out the cause of it. I just need to do some tweaking.

Like I said in the e-mail, I'll be heading back home on Jan. 2. Looking forward to trying it out. :)

Did you find the cause of the lag when running it on the 360? I'm surprised that it would be that big of a difference.

Re: Looking for help (formerly Unable to test networking in XNA)

Posted: Fri Dec 24, 2010 10:02 pm
by EdBoon
EccentricDuck wrote:Ah, sorry, I missed your last response. I still haven't had a recent test on the 360 - there was an error the last time I tried. I worked got an exception handler/debug screen to boot up on screen when the error pops up so I figured out the cause of it. I just need to do some tweaking.

Like I said in the e-mail, I'll be heading back home on Jan. 2. Looking forward to trying it out. :)

Did you find the cause of the lag when running it on the 360? I'm surprised that it would be that big of a difference.
To be honest I think it was just sloppy coding. I couldn't find one big problem that caused it so I went through my whole project and slimmed everything up, made a lot of functions inline and just took out waste where I could find it in the code. Each time I did it, 5 more enemies before it lagged, 10 more enemies, and just kept running faster through the process of cleaning it up. I don't think it was one thing i can point at and say was the problem, i really really wish it were that way though, would have saved a lot of time. I just never realized how different the 360 processes everything, but you live and learn.

I have been messing with network stuff the last 10 days or so. I realize why hardly any indie games are online multiplayer. not fun and there is hardly ANY info on the online functions to use, or at least I couldn't find much help besides the visual studio 2010 help browser. Do you have any links or resources you used ? anything would help. I think i understand the gamer.tag event and i got that working. I also found out that if you set your session to system link you can test with more than one player on a console/PC :) anyways, any resources like i said that you found? im running solely off of Client Server example on create.msdn.com

Thanks again!