Perhaps I need to work on being a more motivational speaker. If someone hadn’t figured out what the requirements were for PlayCanvas, then the software wouldn’t be here today. I suspect that some of them were like, we’d like to do something like that software, but do it in JavaScript, so we could put it on the web. That’s what we want to do with multiplayer requirements…put working multiplayer systems on the web. We want to develop expertise so WE will be the ones people come to when they want to put a multiplayer game on the web, web mobile devices, etc. If we ultimately contribute to PhoneGap instead of PlayCanvas because OUR requirements push us in that direction, I don’t see a problem with that. We can probably create an equivalent WebGap for web browsers which will put our requirements on the Web. I for one, do not feel intimidated about working with the community to create extensions for web browsers, as long as we have a good requirements and design.
If you want to go play with websockets because you don’t like requirements. That’s fine. Your system will do websockets. Meanwhile we’ll be making the web a true multiuser and multiplayer system.
Here’s something else. If you’d like me to come up with a design all on my own, and then you will throw tomatoes at it, that’s okay too. Likely, I’ll say, where were you when we were discussing requirements? THEN you’ll come up with requirements, rinse and repeat. So far, I’m working on dead reckoning and securing the games from clients.
Here’s a sample API. CreateCapability() is a server function which returns a capability to create a piece. createPiece() takes the capability and creates an piece at an initial position and location or error if the capability has been revoked. softMove() moves the piece to an new position and orientation based on what the server thinks is reasonable. stuck() moves the piece to a safe place after the server determines and logs that it is stuck. If the piece or client or IP address reports too many stucks or raises it’s health too much or creates too many pieces, it may be penalized for cheating.
update() gets position, orientation, health, damage, score and place for a piece from the server. removeCapability gets a capability to remove a piece from the server. If the capability is returned to the server in the remove function, the piece gets removed
pc.mp.createCapability(success(capability){}, failure(){});
capability.createPiece(initial_position, initial_orientation, initialHealth, initialDamage, initialScore, initialPlace, success(piece){}, failure(){}, error_func(error){});
piece.softMove(position, orientation, health, damage, success(position, orientation){}, failure(position, orientation){}, error_func(error){});
piece.stuck(success(position, orientation){}, error_func(error){};
piece.update(success(position, orientation, addedHealth){}, collision(position, orientation, damage){}, order(place){}, die(position, orientation, score, standings){}, error_func(error){};
piece.removeCapability(success(remove_capability){}, failure(){}, error_func(error){};
remove_capability.remove(success(){}, failure(){}, error_func(error){});
comments? Other game engines to look at for this sort of thing? I need to look at the PlayCanvas API for position and orientation, if this seems like an okay first thing to work on.