Game Development Community

Can torque communicate with my web Server?

by JuanMa · in Technical Issues · 12/07/2007 (11:42 am) · 4 replies

I am trying to find a way for Torque to talk to my web server and tell it that its current status.

Is it possible to create a socket using torque script?

Thank you

Juanma

#1
12/07/2007 (12:43 pm)
Look into HTTPObject and TCPObject. They are exposed to Torque Script. Its definitely possible to send commands to a web server.
#2
12/07/2007 (1:49 pm)
You can also (probably) directly access the SQLite database of your game with DJango. Setting up the server is a breeze... I kinda want to try that now that you mention it. Just to see how easy it really _is_. If you are interested, let me know, and I will post my findings.
#3
12/07/2007 (2:05 pm)
Garth: That sounds great, though my game server will be running on a Linux machine and I do not know if there is SQLite support for Linux.

For now I will try to use a TCPObject like Matt suggested and see what happens.

Thx!
#4
12/07/2007 (2:19 pm)
Oh - absolutely there is support for SQLite on linux - lol - you betcha (look in your favorite package installer for it - you will find many instances of tools and libs for it as well). Besides that is what is used (as far as I can tell) by the MMOKit also. The nice thing about DJango is that it will hook to most all of the database back ends fairly easily, plays nice with Apache ...and of course stays crunchy in milk.

One gotcha - if you are using SQLite and not say, MySQL, MSSQL, Firebird or Postgre? Since SQLite does not have built in network support - the web server will need to reside on the same system as the game server. Sometimes this is an advantage though... depends on the situation.

I just tried to hook to the MMOKit with DJango - and the cursory answer is - yeah! It is a breeze.

Anyhow, good luck with that aproach. Maybe you can post some examples of the process or code once you have it tunning? I would be interested in that as well.