Author Topic: Client Ports for Brad's RPG (Ideas and Related Ramblings)  (Read 659 times)

Offline Nick

  • HoboMobile
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,922
  • Taking the edge off sanity.
    • View Profile
    • Randomland
Re: Client Ports for Brad's RPG (Ideas and Related Ramblings)
« Reply #15 on: November 16, 2011, 01:10:14 pm »
I finally decided on a server for the websocket stuff. I am going to go with Node.io and Socket.io for its multi-client support (it has all sorts of fallbacks for older browsers and IE)

Took most of my lunch compiling it :-\

I will  try to get a basic back-and-forth with a single client tomorrow.

Offline Nick

  • HoboMobile
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,922
  • Taking the edge off sanity.
    • View Profile
    • Randomland
Re: Client Ports for Brad's RPG (Ideas and Related Ramblings)
« Reply #16 on: November 17, 2011, 02:25:53 pm »
I played around with node.js and socket.io a bit more and got some client-server communication going.

Then I opened a socket from the node.js server to Brads game and sent :
     
Code: [Select]
      gameSocket.write("echo\r\n\r\n"); //I got the end of line from some website. Not sure what to send yet.
I got no response that I could tell from the node.js side, but Brads game saw the connection...

   
Code: [Select]
    Clients: 1
    [2]     type:   21536
    [4]     /:      DUDE THIS IS ONE WEIRD DELIMITER
    Client 0 Disconnected

So I can now send arbitrary text and JS objects back and forth from the browser client and the node server and I can send weird delimiters to Brads game!!

Offline Brad

  • Administrator
  • Hero Member
  • *****
  • Posts: 522
    • View Profile
Re: Client Ports for Brad's RPG (Ideas and Related Ramblings)
« Reply #17 on: November 17, 2011, 03:34:04 pm »
Haha nice job! The actual specs for the game packet should be somewhere in with the server source if you want to look them up.

Keep up the good work.