Something went wrong. Try again later

fobwashed

This user has not updated recently.

2818 388 76 606
Forum Posts Wiki Points Following Followers

fobwashed's forum posts

Avatar image for fobwashed
fobwashed

2818

Forum Posts

388

Wiki Points

606

Followers

Reviews: 15

User Lists: 16

#1  Edited By fobwashed

Scale back enough, and every body of land is surrounded by water. I get that in games, it's a lot less land but there's a lot more going on that's unrealistic in most games than the water to land ratio. Who knows, maybe the globe those games all take place in are much, much smaller than the Earth -_-;;

I've got 99 problems, but my masses being surrounded by water ain't one of them.

Avatar image for fobwashed
fobwashed

2818

Forum Posts

388

Wiki Points

606

Followers

Reviews: 15

User Lists: 16

#2  Edited By fobwashed

Translates to "Too many people seem to have paid attention to this and I need to keep my job so I can continue getting lobbied. Here's me trying to save face and not lose voters. By the way Reid, here's a bus, try to get under it"

Avatar image for fobwashed
fobwashed

2818

Forum Posts

388

Wiki Points

606

Followers

Reviews: 15

User Lists: 16

#3  Edited By fobwashed

Fantastic. Excellent work!

Avatar image for fobwashed
fobwashed

2818

Forum Posts

388

Wiki Points

606

Followers

Reviews: 15

User Lists: 16

#4  Edited By fobwashed

@Branthog: I've been burgled and whatnot before and it's true that cops will come by, take a statement and a list of what was stolen and maybe take some prints but for the most part, they can't really do much. They just don't have the manpower/resources to go after every burgler that burgles =\ Though, I've spoken to a cop friend about this a while back, and they do occasionally catch a dude and find stolen goods then match them up to the place they were stolen from and return said stuff but typically, they aren't caught due to the actual burglary but some other crime. There's no real point to what I'm writing other than to say, getting your shit stolen really, really sucks. To the OP, best of luck. I hope you catch the jackass that stole your laptop.

Avatar image for fobwashed
fobwashed

2818

Forum Posts

388

Wiki Points

606

Followers

Reviews: 15

User Lists: 16

#5  Edited By fobwashed

Loot at me! I'm so smart and you're so dumb! Things you like, they're dumb too! I'm so much better for knowing how stupid it is that you enjoy the things you enjoy and I'm going to spend time writing on an internet forum how wrong it is for you to think highly of other people when they don't even have credentials! I am. . . bemuuuused.

I'm stupider for having read his post. Anytime anyone does anything, there'll always be some ass clown out there trying to shit on it. Fuck em, they don't matter. Most times, it's just for attention. At least kmdrklfg had some purpose to his post other than stroking his own ego.

As for the vids, good stuff and good luck =D

Avatar image for fobwashed
fobwashed

2818

Forum Posts

388

Wiki Points

606

Followers

Reviews: 15

User Lists: 16

#6  Edited By fobwashed

@Burzmali: Oops, I missread this "(4-byte max for left stick.X, 4-byte max for left stick.Y)" and thought you meant that you were using 4 bools (each being a single bit?). One for up,down,left,right. I'm still not certain how you're changing the stick position's two floats into 8 bytes of data. I suppose you could convert the stick's angle in radians into a byte and also tag along a second byte that contains the amount the stick is pushed in that angle which could quickly be reconstructed on the receiving end into a stick position.

"The problem scenarios you mentioned about players hitting first or picking up collectibles happen with my system or with a constant, every 32ms sync update." I'm not sure what this means but I don't see how having two different things happening on two different computers gets resolved when sending those different resolutions to other machines in what'd end up being a random order depending on each machines ping to each other. I'm still not certain whether this is a P2P or client/host system.

" This method, by the way, is a simplified version of how RTS games work online." I don't think the network system used for an RTS would be the best system for an action platformer. I'm sure some portions of how things work would transfer and be usable but what's good for an RTS may not be the ideal way to work with a different genre of game.

You sound pretty knowledgeable about all this stuff. Have you written any networking code during your 7 year stint testing compliance? If so, what game's have you worked on? I may need to pick your brain =P

Avatar image for fobwashed
fobwashed

2818

Forum Posts

388

Wiki Points

606

Followers

Reviews: 15

User Lists: 16

#7  Edited By fobwashed

@Burzmali: The example I gave was just to show how limited your available bandwidth is and in no way was representative of how things should be done. Actually, it's a clear example of why it's a bad way to update and is pretty much just there to show how you need to come up with better ways to sync up your players. Also, the 8kb cap isn't a cap at all. As far as I know, it's just some guidelines backed by Halo 3 beta numbers. During level loads and whatnot, that limit is exceeded greatly. For instance, when a new player joins, the host or other clients must send the new player all the relevant information that player needs to get up to speed and so this happens as fast as possible rather than limiting the speed that data is sent to the new player.

Anyway, the system you've outlined sounds good in theory, but I think would break down during gameplay. It looks as though you're outlining P2P rather than Client/host as there doesn't seem to be any indication that all this information is going to a single person and then that host updating everyone else. In this case, there's the first problem of if two players hit the same enemy, how do you determine who hit first? Since both games are updating independently the enemy positions and the local player's actions, they would both register as hitting the attack button at the same time, and then that information would be sent out to everyone else. Everyone else would then be receiving the information that the two players hit the attack button, but there would be some amount of discrepancy between who hit the button first. To some players, it will have been player A that hit the enemy while others will register player B as having hit the enemy. While the game could just assume that both players hit the enemy and the order doesn't matter, there's also the possibility of player A or player B's packet that indicated they were attacking having been dropped in which case, since there is no host that all this information is going through, to some players (who didn't drop either packet), the enemy was hit twice while to other players, either A or B hit, but not the other. Well, you could then just say that any attacks are sent out using a reliable packet rather than fire and forget, but in this case, you get more ping, and again run into the problems of some players receiving the packet and registering on their console much sooner or later than the others depending on how many times the packet may have been dropped.

This problem is compounded when it comes to something that needs to be definite such as "who picked up this power up?". Also, the 4 byte bool that determines which of the 4 directions is currently pressed which can result in 8 directional movement is okay for a game that only supports 8 way movement, but a lot of games use analog control which is going to be two floats (X and Y axis of the joystick) instead of 4 bools (on/off). In addition, any 3D game with vertical space will be using the Z axis as well. If you're playing a game like castle crashers, you've also got to take into account whether the player is running, jumping, etc and 200 ms is the difference between whether the player will register as having attacked while falling down from a jump or attacking after actually landing.

That's the first I've heard of those figures but they seem reasonable enough. While I personally think 8kbps is way low, it's just what's recommended because otherwise you're assing out 1% of XBLA users. In theory -_-;; Yea, your game doesn't have to work with ALL those things happening at once, but you should make sure it functions properly even though it were to run into them all. I guess you don't have to, but. . . you know, you really don't have to do anything. You don't even have to make a game fun =P It's just, nice if you do.

Avatar image for fobwashed
fobwashed

2818

Forum Posts

388

Wiki Points

606

Followers

Reviews: 15

User Lists: 16

#8  Edited By fobwashed

@Rowr said:

@Fobwashed said:

@Rowr: Dollars to donuts the omission of local co-op when an online co-op exists is due to technical limitations. Like, the system just can't deal with updating an entire second character or just outright can't render a second viewpoint if the game needs to be split screen. That's a whole nother topic I may get into if I end up looking into split screen co-op -_-;;

I'm not talking about adding co-op to like games that are entirely unsuited to it. I've just found in recent times where it seems like there would be an obvious split screen mode it has been ommitted.

I'm also referring to games that are suited to split screen. I mean that it takes more processing power to render a split screen to support local co-op than you might think. Also, depending on the game, having to process all that second player game stuff may be too much for the console to handle. Especially if it were already being pushed to it's limits prior to attempting it. In most cases where there is split screen, they tend to tone down the effects and the visual quality of the game decreases in more ways than just lowering the resolution per split screen. The latest game I played split screen was that new Fear game and it looked way worse. I do appreciate that the option was there, but I'd rather just play the thing online with a friend at full screen. But that's just my personal preference. The Lego games on the other hand, are perfectly suited to split screen and way more fun that way. . . I dunno. I do agree that there seems to be much fewer games that support split screen play but I think it's offset by the increased number of online available games which is the direction I prefer if I had to choose one over the other.

@WEB_War4 said:

I bought two copies of 50 Cent. I can only play co-op through Live. No system link or split screen. Kind I garbage. I don't pay for Live because I don't care about competitive multiplayer. What I'm saying is, more offline co-op that's not behind a paygate.

I played through that game with a friend and while the game itself was pretty mediocre, we loved the hell out of it. Goddamn gem of a game. The co-op jankyness added to the fun. Every time we lifted a gate, the other person would sort of just sliiiiiiiide into place. Also, whenever one person was doing a melee kill thing, on the other person's screen they were just sorta standing there. Oh, and shooting rockets point blank into your team mate resulted in it being inserted into the player and they could walk around with a rocket smoke trail. Excellent game.

@nintendoeats: On one hand, the severe limitations makes things seem easier but depending on the type of game you're working on, I can imagine latency, ping and lost packets to be a goddamn nightmare. It's definitely rewarding and almost a puzzle game in and of itself but it's pretty crazy how intertwined the idea of putting a game online has to be with the core of your game. I'm currently finding myself going through every engine I've got implementing the ability and checks for online. I can't imagine how much of a nightmare it must be to try to do this to an already completed or mostly finished game =P

Avatar image for fobwashed
fobwashed

2818

Forum Posts

388

Wiki Points

606

Followers

Reviews: 15

User Lists: 16

#9  Edited By fobwashed

@Rowr: Dollars to donuts the omission of local co-op when an online co-op exists is due to technical limitations. Like, the system just can't deal with updating an entire second character or just outright can't render a second viewpoint if the game needs to be split screen. That's a whole nother topic I may get into if I end up looking into split screen co-op -_-;;

Avatar image for fobwashed
fobwashed

2818

Forum Posts

388

Wiki Points

606

Followers

Reviews: 15

User Lists: 16

#10  Edited By fobwashed

Have you ever played a game that had local multiplayer and wondered why the hell you can't play it online with your friends over Xbox live or PSN?

Play me with your friends, just not online...
Play me with your friends, just not online...

Or, other times, wondered why the hell it's taking so long for a developer to deliver that very feature in a timely manner since it was promised?

While I can't really speak to all games, I've not gotten a small taste of implementing some basic multiplayer into a game. The following is my own personal experience and is in no way comprehensive. Hell, I'm totally new to this so I'm sure I'm doing a lot of it wrong and badly, but I think some of what I've learned is fairly solid and should at the very least, explain some of what's going on behind the screen.

What I'm writing is in regards to XBL

The game I've been writing networking code for is currently being written specifically for the 360. I'm not certain what the requirements or overhead on PSN/PC games are but I'm going to assume that they're probably fairly close to the restrictions I'm currently working with. Still, I think it's a good idea to put forth that these numbers are for an Xbox Live game.

Latency and Ping

I'm sure anyone worth their salt in online gaming knows about the almighty ping and latency. Everyone's experienced a laggy game and I'll first get the basics out of the way. I've been playing online games since it was just starting out with dial up modems and even I had some revelations when it came to the actual numbers of why my ping is what it is. Those of you already in the know, pat yourselves on the back and scroll on down. For the rest of us, here's a quick and dirty breakdown of how your ping got to what it is. (BTW, ping is the time it takes from data to get from your computer, to another computer over the internet).

Light speed, still not fast enough!

First we'll start with the speed of light (186,282 miles per second), which, while fast as all shit, is still slow enough to measure. To travel a mere 1,000 miles, it takes 5 milliseconds. Also, we're talking about the speed of light here, not the speed that data travels down a cable. Signals travelling down fiber or copper network will slow to around 60% the speed of light. On top of sheer distance, data doesn't tend to go directly from one computer to another. Every router in its path will add around another 5ms. I'd say when I'm playing any online game be it starcraft, counter-strike or whatever, I consider anything below 20 ping amazing (with the server or host being in the same county), 30~40 very solid and when given the option stay away from anything higher than around 60. When I used to play more DoTA, if I had over 100 ping, I'd definitely notice the lag in between my clicks and the game's responses.

XBL recommends

The text involving implementing multiplayer into an XNA game reads that the recommended limit be 8kb a second. The reason for this specifically, I don't know but I do know that during the Halo 3 beta in 2007, Bungie Studios reported that 1% of consoles on Xbox Live have less than 8kb downstream and 8kb upstream. 50% had less than 42k downstream and 44kb upstream. Yes, 1% isn't much, but it does mean that for every hundred people who actively play online (since the data is specifically from a beta to a hardcore online focused FPS, I'd have to guess this number may actually be higher) will have a bad or unplayable game if you decide to break that recommended limit. On top of this, Xbox games are expected to function with at least 1% packet loss and 200ms ping.

Xbox doesn't even give you the entire 8kb...

Here's a breakdown of how expensive it is to send information, and how damn quickly you can fill that 8kb per second limit. Say you have a game that runs at 30 FPS with 8 players and you want to send the player's position (Vector 3 (X,Y,Z coordinates)), their velocity (another Vector 3) and whether or not they're doing something (a true/false boolean). Also, on Xbox, you always have to factor in the possibility of voice (since even if you're not using voice in this game, you may be in a chat lobby) adding an additional 500bytes a second.

that'll be 7(players) * 30(fps) * (12(vector3) + 12(vector3) + 1(bool) + 51) + 500(voice) = 19k.

Yup, sending those three simple things to 7 people in an 8 player game once a frame will put you over the limit two fold. Oh, and that 51 that's crammed in there, that's the header that automatically gets added to every packet you send which contains some basic data that all packets need. Specifically

20bytes IP header

8bytes UDP header

16bytes Microsoft Live Encryption

7 bytes XNA framework Overhead

so I suppose if you were to not be using XNA, you'll be saving yourself a whopping 7 bytes off the header that I'm fairly certain would be used up by something else in your own framework.

Anyway, due to that expensive overhead, sending absolutely no information and empty packets to 7 players 30 times a second would end up costing around 13kb per second. Still over the limit >,< Oh, and we still haven't talked about the possibility that your data isn't even guaranteed to end up where you're sending it, in the order you're sending it.

Packet Loss

It's somewhat shameful to admit, but I only just recently learned the difference between TCP and UDP. I've been setting up port forwarding for years just plugging in numbers, but never knew what the difference between the two were. Here's a very, VERY basic explanation of the difference. TCP is network data, that is considered reliable. What this means is, every bit of data sent TCP is confirmed and accounted for. If some data gets lost along the way, it will be sent again and again and again until the sender gets confirmation that the information was received in it's entirety on the other end. UDP on the other hand, is just fire and forget. One computer sends it, and we hope it gets to where it's going, but if it doesn't, meh. . . it's forgotten for all time and eternity. Now, the reason why all data doesn't reliably always get delivered? I don't know, but the typically, 2% of sent packets (little bundles of data) get lost with the high end average being around 10%. Oh, and when using UDP, data sent later may get to it's destination sooner than something sent previously or vice versa. Basically, it's a 90+% crapshoot that the data will or won't get to it's intended location, in or out of order when using UDP. Why doesn't everyone and everything just use TCP you may ask.

A SHORT AND LONG EXPLANATION OF WHY EVERYTHING ISN'T SENT USING RELIABLE OL' TCP

The short answer? Speed. The long answer? Since TCP always confirms that the packet has reached it's destination, there's that amount of extra latency. Any time any portion or the entirety of the packet is lost, it is resent. This takes time. In addition to that, TCP sorts packets in the correct order once it arrives at the location it was getting to. So, say you're playing a game and you're moving from spot A to spot D and you're sending TCP information at each point in that movement. The computer sends the information in the order A, B, C and D. The receiving computer, due to internet wackyness, receives A, then D, then B and finally C. The receiving end may already have the final destination (D) but will not acknowledge it until it has all the packets in between (B and C). There may be games in which the positions in between are necessary but in most cases where speed is more important than order (say any racing game or FPS), only the most recent position is required. Predictive algorithms will fill in the motion between A and D and when B and C arrive, they'll be discarded. In games where quick response is necessary, that additional latency is killer. If any of those in between packets were lost during a TCP type exchange, that'd increase the amount of latency to unplayable levels.

What does all this shit have to do with my goddamn co-op?!

Well, that brief lesson in network data was just a primer to put forth that it is goddamn hard to make a multiplayer game. Hell, when I started and began reading about all this shit I had to put up with, I'm blown away that games like Halo and CoD work at all. But, for now, we'll keep it stupid simple because honestly, that's all I know. I'll talk about what I'm doing to implement multiplayer into my game and even being as rudimentary as it is, how goddamn hard it is.

When I began writing this, I thought I'd just spit out some stuff real quick and explain the situation. . . but it's something I'd like to go into a bit more depth about. This being the case, I'm gonna have to split this up into a second post that details a little bit what goes into writing network code (at least my rudimentary shitty network code), and some more insight into how much hell it is to try to compensate for latency and lost packets. I'll be back later in the week as soon as I have time to write it out properly -_-;; Sorry to those who skipped ahead and found nothing!