Not to say that OOP is the king and awesome for everything(cause its not the top choice for pretty much most things except for select few instances which happen to be useful when developing large “evolving” systems, but for quick script-like actions there are much better options, not the least of which is functional programming but i digress), ive gotta say that in my previous post i assumed that you knew anything at all about programming a game, and so i painted a picture of what you would have to know to program a simple run around the yard type of multiplayer experience. Obviously that fell on deaf ears and i shall take this space to drive the nail through the proverbial skull in the shape of an idea about what you do not know.
Why multiplayer is not for beginners:
- Thare are many points of failure that will drive you nuts, the main one being weird exceptions(you found one) that are hard/impossible to debug(you are miles away from those).
- Results, without doing “advanced” topics you produce utter crap that is useless for anyone. Latency messes up your states so bad that all you will ever see on the screen is jittery garbage. Without advanced lag compensation techniques that you say are not necessary for a simple “example” you will not accomplish any kind of multiplayer anything.
- State synchronization across network is NOT a problem that has been solved for over 2 DECADES by very very very smart people. Those two articles(Referring the Valve ones, on networking, which one of them is a paper that was published) are pretty much as close as we as society got to ever solving those, and they are a decade old already. So if you cannot understand them, you have no hope of making anything close to a box that can move around on your screen, and is controlled by another player over a network, maybe localhost, but network definately not.
Only solution we have(and i mean it, and do quote me on this) is making game states deterministic(very very very diffucult, note the amount of very’s i usee), which in turn makes it possible to create lag compensation algorithms(or employ them), so sending the W key will not do you any practical good, as the message will probably get queued in the tcp layer until it has 5 more messages saiing something like a,s,d and send this all at the same time, so it will literally go forward left back and then right again instantly instead of the discrete steps that you actually pressed the keys in, effectively not moving the object. The fact that you have 4 pages of people trying to put this in a nice way, and you constantly ignoring it baffles me. That and also the fact that you had the tenacity to come to a place and shout that the library is awful because you dont understand it. On a side note though, the $30 for the code made me chuckle :), because the math and the coding involved in building a multiplayer motion example would involve several thousand(thats 3 0’es) dollars worth of effort in terms of time for an average developer, hence why there isnt an example like that, and instead a much simpler chat example.
Also note MySQL is a relational database with nothing but procedural language, PHP is just a mess, and JavaScript is not java. Saying that you are a web developer does not make you a games developer, because games space is grounded in cold hard MS. level of Computer Science not to mention math. While building web communities is built on top of a technology stack that puts priority on getting things “done” in whatever manner is necessary, which lets mediocre developers write code that actually works good “enough”.
Not to start a flame war, just saying, thats the general picture of where you are at.
PS: the mountain climber thing is funny cause its more like a pit climber, since after a while you start to want to get back out, but cant, cause it will take you to the depth you never wanted to be in.