Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I want to create a client-server game that runs on Game Maker HTML5-NodeJS. The NodeJS server will be an AI server - a bot that acts like a human opponent and plays against the human player at a front-end game client that is coded in GM HTML5.

How can a NodeJS server be used from GM HTML5. Are there any examples of such a system?

I already got an iOS game that can talk to a remote AI server (coded in Lua) using TCP sockets. Can this be done with Game Maker HTML5 and NodeJS.

share|improve this question
    
Would you mind accepting an answer? –  jco Jun 28 '12 at 14:43

2 Answers 2

Game Maker HTML5 is supposed to have an "Internal code editor with user definable syntax colouring". So if you're able to write some Javascript on the client side, you can use socket.io. It's a node.js module that does WebSockets and way more, and it's really easy to use.

share|improve this answer

If you can modify the generated HTML5, then yes, of course it can.

For communication, use socket.io, it's a great library that I've used to make a simple MMO (dev blog: http://yannbane.blogspot.com/).

You can find great examples on their site: http://socket.io/.

To install socket.io, you must do:

npm install socket.io

To use it on server-side:

var io = require('socket.io');

And on client-side:

<script src="/socket.io/socket.io.js"></script>

share|improve this answer
1  
note, not all browsers support websockets (IE) but socket.io counters this problem. –  Thomas Jun 28 '12 at 14:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.