Jump to content


Photo

Does an irc dll for gamemaker exist?


  • Please log in to reply
16 replies to this topic

#1 regular

regular

    GMC Member

  • New Member
  • 399 posts

Posted 18 June 2011 - 05:29 AM

I'm making an ingame chat where in theory unlimited number of people should be able to chat. The problem is that because the game checks for new chat messages too often, it creates a DoS attack on the server and it stops responding to the client.
There are two ways to solve this problem: either make the game to check for new chat messages every 10 to 15 seconds, or to make it use IRC. Does an irc dll for gamemaker exist?
(yes, i did search and found nothing)
  • 0

#2 crashhelper

crashhelper

    GMC Member

  • GMC Member
  • 872 posts

Posted 18 June 2011 - 08:20 AM

Chat messages should be push, not pull. Have the server send the messages to the clients, rather than have the clients request them from the server.
  • 0

#3 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 18 June 2011 - 02:57 PM

If you're using 39dll you can implement the protocol yourself.
  • 2

#4 regular

regular

    GMC Member

  • New Member
  • 399 posts

Posted 20 June 2011 - 12:31 PM

Have the server send the messages to the clients, rather than have the clients request them from the server.

How do I do this? Is it possible? Echo function replies only to requests, I think. Besides, is it possible to make a webscript to execute without a request? And how will the game know it has recieved a message without sending a request first?


If you're using 39dll you can implement the protocol yourself.

Can it be done with HTTPDLL2.dll, too?
  • 0

#5 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 20 June 2011 - 03:07 PM


If you're using 39dll you can implement the protocol yourself.

Can it be done with HTTPDLL2.dll, too?

No. You need TCP.
  • 2

#6 crashhelper

crashhelper

    GMC Member

  • GMC Member
  • 872 posts

Posted 20 June 2011 - 03:53 PM

How do I do this? Is it possible? Echo function replies only to requests, I think. Besides, is it possible to make a webscript to execute without a request? And how will the game know it has recieved a message without sending a request first?

I seriously hope you're not using php with http for the chat. You should just make the chat part of the multiplayer protocol that your game uses. IRC isn't really the tool for this job either, as it's intended for large networks with many users and multiple servers and channels.
  • 0

#7 regular

regular

    GMC Member

  • New Member
  • 399 posts

Posted 20 June 2011 - 04:01 PM


How do I do this? Is it possible? Echo function replies only to requests, I think. Besides, is it possible to make a webscript to execute without a request? And how will the game know it has recieved a message without sending a request first?

I seriously hope you're not using php with http for the chat. You should just make the chat part of the multiplayer protocol that your game uses. IRC isn't really the tool for this job either, as it's intended for large networks with many users and multiple servers and channels.

I don't have much choice - the game has one room which has a chat for all players - that is whenever a new player joins that chat, he must see everything others are chatting and all others must see whatever he writes. Using peer to peer for this is not suitable - a common server is needed.

No. You need TCP.

I thought http dll 2 supports TCP and not UDP.
  • 0

#8 crashhelper

crashhelper

    GMC Member

  • GMC Member
  • 872 posts

Posted 20 June 2011 - 04:18 PM

Using peer to peer for this is not suitable - a common server is needed.

I'm not suggesting you go peer-to-peer, but rather make chat part of your game's multiplayer protocol.
  • 0

#9 regular

regular

    GMC Member

  • New Member
  • 399 posts

Posted 20 June 2011 - 04:37 PM

Using peer to peer for this is not suitable - a common server is needed.

I'm not suggesting you go peer-to-peer, but rather make chat part of your game's multiplayer protocol.

I can't get what you are saying - do you mean I should make every client to request new messages from every other client? o.O If not, then a common server which every client to communicate to is the only way - I dont see any other.
  • 0

#10 crashhelper

crashhelper

    GMC Member

  • GMC Member
  • 872 posts

Posted 20 June 2011 - 04:48 PM

I can't get what you are saying - do you mean I should make every client to request new messages from every other client? o.O If not, then a common server which every client to communicate to is the only way - I dont see any other.

No, the client should send the chat message to the server, and the server should relay this message to the other clients. There should be no requests involved in this process.
  • 2

#11 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 21 June 2011 - 12:20 AM

I thought http dll 2 supports TCP and not UDP.

HTTP is built onto TCP. You need TCP, not HTTP.

Do as crashhelper says.
  • 2

#12 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4922 posts
  • Version:GM8

Posted 21 June 2011 - 09:00 AM

Ignore TheMagicNumber, he doesn't have a clue what he's talking about.
Yes http dll 2 supports TCP sockets, so go ahead and use it.
  • 0

#13 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 21 June 2011 - 04:16 PM

Ignore TheMagicNumber, he doesn't have a clue what he's talking about.
Yes http dll 2 supports TCP sockets, so go ahead and use it.

Oh excuse me for not knowing an HTTP DLL supported TCP sockets.
  • 2

#14 Maarten Baert

Maarten Baert

    GMC Member

  • GMC Member
  • 738 posts
  • Version:GM8.1

Posted 21 June 2011 - 05:06 PM

The name is a bit confusing: It does support sockets, so you should be able to implement the IRC protocol in GML if you use Http Dll 2.

IRC uses a text-based protocol, the commands are separated by a newline character (chr(10)). You can read the commands with
while socket_read_message_delimiter(socketid, bufferid, chr(10)) {
    command = buffer_to_string(bufferid);
    // ...
}
You can send your own commands to the server with socket_write_message_delimiter. Wikipedia has a list of all commands you can send:
http://en.wikipedia....y_Chat_commands

I also found this:
http://colinhorne.bl...c-protocol.html

That should be enough to get started.

Edited by Maarten Baert, 21 June 2011 - 05:07 PM.

  • 2

#15 regular

regular

    GMC Member

  • New Member
  • 399 posts

Posted 23 June 2011 - 12:57 PM

You can send your own commands to the server with socket_write_message_delimiter. Wikipedia has a list of all commands you can send:
http://en.wikipedia....y_Chat_commands

Does it matter which server I use? Most of these commands seem not to be working on rizon.

Also, will the game client have nick, join and create channels just as normal users?
  • 0

#16 stoneyftw

stoneyftw

    GMC Member

  • GMC Member
  • 112 posts
  • Version:GM:Studio

Posted 15 April 2012 - 03:05 PM

Did you ever get this irc thing working? I'm planning on adding irv integration into my app. Irc is PERFECT for in game chat integration.
  • 0

#17 DarkDev

DarkDev

    GMC Member

  • New Member
  • 16 posts
  • Version:GM8

Posted 24 June 2012 - 06:26 AM

If anyone is interested in something like this, give me a PM :P I would like to know if there are people who would actually benefit from having an IRC extension.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users