[No as in 'NO!!!'] ACS Networking

Moderator: GZDoom Developers

Postby Simbey » Fri Mar 11, 2005 6:16 pm

Am I the only one who doesn't see any real use in this, not to mention that the amount of work required to properly implement it will probably be in no relation to the benefits?


I'm going to code this thing. I already have a modified version of ACC that compiles the ACS for HTTP communication. It will be a little while before I have a copy of Visual C++ .NET, however.
Simbey
 
Joined: 20 Apr 2004
Location: Renton, WA

Postby Your Name Is » Tue Mar 15, 2005 6:29 pm

Maybe just submitting scores online would be better.
User avatar
Your Name Is
Wake up and smell the ashes.
 
Joined: 31 Oct 2004
Location: Raleigh, NC

Postby Simbey » Sun Mar 20, 2005 3:50 pm

Okay, so apparently...
http://forum.zdoom.org/viewtopic.php?t=5587
Graf Zahl really doesn't like this potential feature.

If there's anyone who still wants to see this happen, post your support, and I will code it. Otherwise, I'll let it go.

Here is a piece of ACS that I can compile with a modified version of ACC. Think of it as one possibility for connecting to HTTP resources with ACS.

Code: Select allExpand view
#define HTTP_OPEN              1
#define HTTP_CHECK_FIELD       2
#define HTTP_GET_FIELD         3
#define HTTP_CLOSE             4

script 1 (int iAction)
{
        int hService;
        str strServer, strPage, strUrl;
        strServer = "www.zdoom.org";
        strPage = "action.asp?a=" + iAction;
        strUrl = "http://" + strServer + "/" + strPage;
        print(s:strUrl);
        hService = DoHttpCommand(HTTP_OPEN,strServer,strPage);
        if(hService > 0)
        {
                int iValue;
                if(DoHttpCommand(HTTP_CHECK_FIELD,hService,"field1"))
                {
                     iValue = DoHttpCommand(HTTP_GET_FIELD,hService,"field1");
                     print(s:"field1 = ", d:iValue);
                }
                if(DoHttpCommand(HTTP_CHECK_FIELD,hService,"field2"))
                {
                     iValue = DoHttpCommand(HTTP_GET_FIELD,hService,"field2");
                     print(s:"field2 = ", d:iValue);
                }
                DoHttpCommand(HTTP_CLOSE,hService,0);
        }
        else
        {
                print(s:"Could not connect to ", s:strServer);
                print(s:"Error #", d:hService, s:" occurred!");
        }
}


This way, I thought, only one function would need to be added to ACC's function list. DoHttpCommand() with HTTP_OPEN won't return control to the ACS code until the page is downloaded or an error/time-out occurs. The return value is either a positive index to the downloaded page or a negative value indicating a specific reason for the failure.

In this example, I included HTTP_CHECK_FIELD so one could determine whether a particular field is present in downloaded text, but I would make HTTP_GET_FIELD return 0 for a field that wasn't present anyway. Of course, the field reading code would only work for a plain text page that is formatted to return lines of name=value, but one would still be able to send data to any page.

So now I just need to know whether this is acceptable, should be changed, or should be scrapped. I already have HTTP 1.1 code for downloading files, so all I would need to do is link it up to ZDoom.
Simbey
 
Joined: 20 Apr 2004
Location: Renton, WA

Postby Graf Zahl » Sun Mar 20, 2005 4:14 pm

[sarcasm]Great! You have extended ACC to handle one more function. What an achievement![/sarcasm]

Anyway, your code won't work. That's because ACS doesn't have any string management. You are simply not able to concatenate strings as you do. If you write

Code: Select allExpand view
strUrl = "http://" + strServer + "/" + strPage;


all you will get is another string from the string table at the index of the sum of all the indices you add.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby QBasicer » Sun Mar 20, 2005 4:51 pm

String concatination is pretty important sometimes.

Maybe it should be included?

EDIT: I would rather see a pure socket implementation where you have to do everything yourself.

Also, what about if ZDoom supported a player that really didn't exist? I mean, a program connects to ZDoom and acts like a player, but it's really a scoreboard backend or something. And ACS is able to "embed" extra data into the connection stream for that scoreboard to read.
User avatar
QBasicer
#include <QBasicer.h>
 
Joined: 16 Sep 2003
Github ID: qbasicer

Postby Graf Zahl » Sun Mar 20, 2005 5:01 pm

charris wrote:String concatination is pretty important sometimes.

Maybe it should be included?



Impossible with ACS. If you define a completely new scripting language it might be done. The closest thing I have seen so far is Jim's ACC patch to output arrays as strings but I think that's the best that can be done.

EDIT: I would rather see a pure socket implementation where you have to do everything yourself.

Also, what about if ZDoom supported a player that really didn't exist? I mean, a program connects to ZDoom and acts like a player, but it's really a scoreboard backend or something. And ACS is able to "embed" extra data into the connection stream for that scoreboard to read.


It's pointless anyway. ACS is far too limited for this to work - ever. Some people are apparently unwilling to listen but IMO any effort invested in this matter is a total waste of time.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Simbey » Sun Mar 20, 2005 5:11 pm

How about this?

Code: Select allExpand view
#define HTTP_OPEN              1
#define HTTP_CLEAR_QUERY       2
#define HTTP_ADD_QUERY_INT     3
#define HTTP_ADD_QUERY_STR     4
#define HTTP_CONNECT           5
#define HTTP_CHECK_FIELD       6
#define HTTP_GET_FIELD         7
#define HTTP_CLOSE             8

script 1 (int iAction)
{
        int hService, iError;
        str strServer;
        strServer = "www.zdoom.org";
        hService = DoHttpCommand(HTTP_OPEN,strServer,0);
        DoHttpCommand(HTTP_ADD_QUERY_STR,hService,"action.asp?a=");
        DoHttpCommand(HTTP_ADD_QUERY_INT,hService,iAction);
        print(s:"http://", s:strServer, s:"/action.asp?a=", d:iAction);
        iError = DoHttpCommand(HTTP_CONNECT,0,0);
        if(iError == 0)
        {
                int iValue;
                if(DoHttpCommand(HTTP_CHECK_FIELD,hService,"field1"))
                {
                     iValue = DoHttpCommand(HTTP_GET_FIELD,hService,"field1");
                     print(s:"field1 = ", d:iValue);
                }
                if(DoHttpCommand(HTTP_CHECK_FIELD,hService,"field2"))
                {
                     iValue = DoHttpCommand(HTTP_GET_FIELD,hService,"field2");
                     print(s:"field2 = ", d:iValue);
                }
        }
        else
        {
                print(s:"Could not connect to ", s:strServer);
                print(s:"Error #", d:iError, s:" occurred!");
        }
        DoHttpCommand(HTTP_CLOSE,hService,0);
}
Simbey
 
Joined: 20 Apr 2004
Location: Renton, WA

Postby QBasicer » Sun Mar 20, 2005 5:32 pm

Graf Zahl wrote:
charris wrote:String concatination is pretty important sometimes.

Maybe it should be included?



Impossible with ACS. If you define a completely new scripting language it might be done. The closest thing I have seen so far is Jim's ACC patch to output arrays as strings but I think that's the best that can be done.

That's pretty much my idea of a string. An array of single characters.

EDIT: I would rather see a pure socket implementation where you have to do everything yourself.

Also, what about if ZDoom supported a player that really didn't exist? I mean, a program connects to ZDoom and acts like a player, but it's really a scoreboard backend or something. And ACS is able to "embed" extra data into the connection stream for that scoreboard to read.


It's pointless anyway. ACS is far too limited for this to work - ever. Some people are apparently unwilling to listen but IMO any effort invested in this matter is a total waste of time.

It wouldn't be too hard, ACS could act as a pass through for real networking code. I've done a lot of socket stuff in C, and it'd be prime if it was identical to that. OMG did I just say prime...freaky... Anyways, I don't know how ACS works, but the engine could just move what I say in ACS and interpret it into the resulting C code.
User avatar
QBasicer
#include <QBasicer.h>
 
Joined: 16 Sep 2003
Github ID: qbasicer

Postby Csonicgo » Mon Mar 21, 2005 4:55 pm

don't even argue wiht him. it's pointless. we at vectec know what works and what doesn't. :P
User avatar
Csonicgo
OPL Goddess
 
Joined: 15 Apr 2004
Location: Leeds

Postby Your Name Is » Tue Mar 22, 2005 6:40 pm

I support it oh great programmer dude!
User avatar
Your Name Is
Wake up and smell the ashes.
 
Joined: 31 Oct 2004
Location: Raleigh, NC

Postby Xaser » Tue Mar 22, 2005 9:23 pm

I don't really like this idea, for this reason: I have dialup.

Not only would it lag like hell for me, but it would also require me to connect to the internet every time I want the wad to run porperly. IMO, it's just not worth it.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Postby Cptschrodinger » Tue Mar 22, 2005 11:43 pm

Great.... Zdoom steam....
Cptschrodinger
Our father, who art in hell
 
Joined: 21 Oct 2004

Postby Graf Zahl » Wed Mar 23, 2005 3:25 am

Xaser wrote:I don't really like this idea, for this reason: I have dialup.

Not only would it lag like hell for me, but it would also require me to connect to the internet every time I want the wad to run porperly. IMO, it's just not worth it.



Which is the main reason I don't like this idea. Apart from having very limited use in relation to a rather large amount of time in addition to an extremely high risk of abuse makes this a complete nightmare and I honestly can't imagine that Randy might even consider adding this to ZDoom.

To be blunt: It's nonsense dreamt up by people who don't have a clue what this means.


And yes, ZDoom Steam sums it up perfectly!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Enjay » Wed Mar 23, 2005 4:34 am

I don't see this actually getting any worthwhile, real use. It's a pie in the sky idea with no real practical or realistic use. The user base and people interested in developing for it would simply be too small.

Database and updating maps? Be realistic. That's just not going to happen. It would involve all the map authors putting the net code into their behavior lumps and somebody maintaining the version numbers - somehow. Do you see most map authors wanting to do that? And yes, Zdoom Steam sums it up very nicely.

All the other suggestions (what "all") eg the scroeboard. Well, what scores do you have in mind? Zdoom doesn't have a scoring system in regular play. Frags? Use Zdaemon. It's already established and doesn't use an ACS modification. So, were looking at a score board for the 2 or 3 wads that might come out with some kind of scoring implemented, and a complimentary online scoreboard. Not gonna happen. Or if it does, it will rise, have its moment in the sun and then just fall by the wayside.

I really don't see this being used to any great extent, if at all. Perhaps one or two people might use it as an example, to show it can be done, and then it will simply become an unused feature with no online database, no scoreboard, no nothing to support it. More effort than it's worth to implement. Especially when Randy has many other things to consider and work on. Things that people will actually use and benefit from.

In the highly unlikely, snowball's chance in hell, thrown by a flying pig as he crossed in front of a blue moon, after a month of Sundays event that it did get implemented, then I'd simply set my firewall to stop Zdoom accessing the internet and the feature would cease to exist for me anyway. :P

56
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Postby Graf Zahl » Wed Mar 23, 2005 4:49 am

When Enjay starts to rant it gets funny! ;)

But seriously, I couldn't agree more. But from looking at this thread it is obvious that there are some people who seem to stick to their stupid ideas until the bitter end.

But the most idiotic thing about all this is not the idea itself, it's to implement it in ACS! If this was a feature of the engine it might have some (very limited) value but for each mapper to code it by himself is just plain stupid to the most extreme degree.

IMO it's time to close this thread or move it to another forum. As a feature suggestion it is worthless but if some people here are intent on discussing it further I think this is the wrong place for it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

PreviousNext

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest