Networking..
Monkey Forums/Monkey Programming/Networking..
| ||
Is it possible to do networking with the HTML5 side of monkey, I would love to create a net game thats linked together with loads of people who play it but havent a clue where to start. Does anyone have any idea where would be a good starting point for this? |
| ||
I need to know this too. I have an opportunity to develop a browser game for a company, but I need the game to communicate with a remote server for account verification. It doesn't appear that Monkey has any native commands for this. |
| ||
http://www.monkeycoder.co.nz/Community/posts.php?topic=137 This should work for account verification, for 'networking' game I think it could be a little laggy... |
| ||
For a game, you would want to use websockets. Check this out: https://github.com/tjgillies/pacman It's a multi-player pac-man game using html5 with websockets/nodejs. |
| ||
Is there a way to add networking in general for all targets in Monkey? I don't ask for real time communication - anything simple would be great, something TCP/UDP based would be awesome. I'd prefer to be able to connect to a dedicated server where the player can connect to and which handles the games (the server software has not necessarily to be written in Monkey) |
| ||
yeah i would like that too :) |
| ||
Is there a way to add networking in general for all targets in Monkey? Yes. But it's non-trivial and probably not generally useful. There are a lot of things you can't do very easily on some of the more exotic platforms (HTML 5).Something simple like RESTful webservice client, would probably be much simpler since all platforms have a http client of some sort, and a SAX parser (you could even conceivably write your own written entirely in Monkey). Ultimately it depends on what you want to use it for. Multiplayer arcade style games or an MMO, are probably not going to work out too great, but it could be suitable for simple pseudo-turnbased, mostly single-player games like Travian or Farmville. You would probably (almost certainly!) have to use something else for the server side of things, may I recommend Java, Google App Engine, JPA, and RESTlet should give you a suitable, simple and annotation-driven cloud-based J2EE stack, and you can use Guice for your IoC needs. |
| ||
That would fit my needs. :) |
| ||
Ok, I need it, I'll implement it. First only simple http stuff (POST, GET) mainly for Android and iPhone first. |
| ||
I've been looking into using the Google App Engine Channel API with Html5/Android/iOS. There's a JS API which can be ran in Android/iOS apps by use of a hidden WebView, with handlers within your application (onMessage, etc). I'll keep you updated on what I've got. |
| ||
That would be great! I need simple networking very urgently (simple http GET is all I need, even blocking - synchronous). |
| ||
Ok, HttpGet for Android works, will add the other platforms... http://www.monkeycoder.co.nz/Community/posts.php?topic=725 |