Author Topic: Some Network questions  (Read 1493 times)

Offline Emil

  • Mr. Drawsprite
  • **
  • Posts: 64
    • View Profile
Some Network questions
« on: 2013-Dec-13 »
Hi, I'm trying to wrap my head around the networking capabilities of GLBasic. So far I think that it's lacking or, hopefully, that I don't fully understand it.
The problem I'm having is that I want to send messages to the server (that handles alot of the logic of my game) and then sends out the correct data to all or specific users.

Right now I can only send messages to other players (granted it goes via the server but the server only acts as a postman). I'm thinking of creating a fake player that gets the messages needed to the server. But that seems a bit counterintuitive as that would mean that the server sends the message to a temporary player just so that the server can see the message.

How would you guys go about doing this?
Maybe I'm just missing something obvious.  :giveup:

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10682
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Some Network questions
« Reply #1 on: 2013-Dec-13 »
are you using the NET or SOCK commands? NET has a method of sending to all players. With SOCK the server is responsible to do that.

Sent from my GT-N7100 using Tapatalk


Offline r0ber7

  • Prof. Inline
  • *****
  • Posts: 525
    • View Profile
Re: Some Network questions
« Reply #2 on: 2013-Dec-14 »
Use SOCK commands. They're more basic, so they give you more control. You'll have to write your own protocol though.

Offline Emil

  • Mr. Drawsprite
  • **
  • Posts: 64
    • View Profile
Re: Some Network questions
« Reply #3 on: 2013-Dec-15 »
Ah.., didn't see that in the manual. Thanks alot!