ACS Networking

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
TOGoS
Posts: 131
Joined: Sat Nov 22, 2003 12:33 am
Location: Wisconsin

ACS strings

Post by TOGoS »

Simbey wrote:Anyway... I'm not sure how an HTTP interface could be written that returned the server's response to an ACS script. I can compile ACC with MSVC 5, and I had no problems adding functions to it for HTTP support, but I have no idea how to return a string value! I've been looking through the "p_acs.cpp" file from ZDoom's source, and it doesn't look like it's possible.
I don't think ACS knows anything about strings. When you say "foo", for example, the ACS compiler maps "foo" to an integer. So whenever you say "foo" you're really passing 37 or some such. The ACS interpreter knows nothing of the insides of the stringk, AFAIK.

But being able to send and receive data from inside a game would be cool. What would be even better would be if an ACS script could also receive and act on OSC messages or some such. Program your toaster to send a message to ZDoom when your toast is done and spawn a bunch of chaingunners or something :D
Simbey
Posts: 47
Joined: Tue Apr 20, 2004 9:00 pm
Location: Renton, WA

Post by Simbey »

So whenever you say "foo" you're really passing 37 or some such. The ACS interpreter knows nothing of the insides of the string
That in itself isn't really a problem. I need a way to return a new "string index" that points to the new string. That would probably require a lot of work.
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".

Post by Macil »

Just have the web commands return integers, and forget all about strings!
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".

Post by Macil »

Or let zdoom add another string to the string table and let the string variable reference to it. DUH!

Or wait a second... Didn't he just add that code for the dynamic strings?
User avatar
QBasicer
Posts: 766
Joined: Tue Sep 16, 2003 3:03 pm

Post by QBasicer »

Well, lets think about this for a second...

Any program can download anything from the net without telling you... Windows does not block this (lets say it accesses it anyways to get the weather or something, so SP2 does not come into play), and it installs a new version every time your computer restarts, or spyware 14 days after you installed it...

What ACS could do is:
- Online Scoreboard
- Report some data to an external program so that somebody outside the game could see a game map and where everybody is, updated every 30 seconds or so...
- Automatically download updates, or more levels for a hub or something.
- In game chat client to the outside world.
- Lets say your ZDoom goes out of date, and a wad you're playing requires .64, it could automatically update your zdoom version (per your request).

All that stuff is perfectly valid, including everything you've said so far. With everything, there's pros and cons, and it divides people. What must be looked at is it worth it to code now? Probably not. However, it can be on a wishlist, can't it?

I think something like 32bit textures is more valueable...
User avatar
Your Name Is
Posts: 802
Joined: Sun Oct 31, 2004 5:06 pm
Location: Raleigh, NC

Post by Your Name Is »

I like the onlince scoreboard idea
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".

Post by Macil »

HotWax wrote:It also opens up possibilities such as (for example) the ability for someone to make a website with regularly updated content that then feeds into a WAD which uses the website to unlock new areas and such on cue.
That would be one of the things that I would use.

Heck, if you make a good system, you can make it download where to place enemies in the new areas, and be able to change some simple architecture (make a grid of sectors, each with unique tid, use scripts to manipulate sectors based on dl'ed info.

Return to “Editing (Archive)”