Ask something - We can help.

Started by Stupot, Fri 19/12/2008 20:06:21

Previous topic - Next topic

Danvzare

Quote from: C.L.I.C.K. on Thu 14/02/2019 14:27:11
Guess what, most DLC is NOT carved out.
Correct. A lot of content in games, wouldn't exist without DLC. A very good example I think, is the uncensored Ransome in Thimbleweed Park.
That being said, content is still carved out for some DLC. And if DLC wasn't popular, that content would never be carved out.
So in other words, I'm complaining about how other people have ruined my gaming experience by making DLC popular by buying it all the time. I'd like to reiterate my example of Tira in Soul Calibur VI.
That being said, I can completely understand if someone thinks that the extra content you can get from DLC outweighs any games that might carve out content for DLC. I'm just not one of those people.

Stupot

This isn't for me but for a friend. She wants help identifying an adventure game. I'll just post her words here:

“I don't know if it'll get a hit because I've been able to find every other game but here it is: It was a demo so I didn't even get to know what else happens, but there was one girl creature and one boy creature, they were in their house when the lights are cut and they are attacked. You have to go around the house with a match to find the items you need to unlock them from a chest. Once you do that the demo ends. So not very helpful. I think the girl creature had a minnie mouse esque skirt. I call them creatures because they weren't human but I can't remember if they were fictional designs or based off of animals.”

Any ideas?

LimpingFish

Quote from: Click'd on Thu 14/02/2019 14:27:11
Guess what, most DLC is NOT carved out.

What is this assertion based on? Perhaps if you has said "some DLC", I wouldn't be posting this, but you didn't, so I am. :)

Quote from: Stupot on Mon 01/07/2019 01:17:28
This isn't for me but for a friend. She wants help identifying an adventure game.

Any idea of the period it's from?
Steam: LimpingFish
PSN: LFishRoller
XB: TheActualLimpingFish
Spotify: LimpingFish

Monsieur OUXX

#1683
Encoding issue.

So, I know that the .TRS of AGS are supposed to be ANSI. But somehow at some point I f***ed up and my file probably did a little trip to UTF-8 and back.
And now it's "corrupt".

Consider this as a riddle :

My file contains this sequence of characters (in hexadecimal ) :  EF BF BD and I know for a fact that it's supposed to be Ö (capital ö, decimal ascii : 214)

Can you :
- find an automated process to restore it properly to ANSI? (at the moment I cant figure out how to display it as Ö even by toying around with the encodings) (by automated, I mean fix an entire file with just a few clicks in Notepad++ or Visual Studio Code or whatnot)
- maybe guess what bad encoding/actions could have led to the faulty encoding? (so that I don't do it again). Did I do that by saving an ANSI file to UTF8?


=== EDIT ===

So apparently I have this issue : https://www.w3.org/International/questions/qa-utf8-bom.en.html
I'm still not sure what I did wrong, or how to fix it.


=== EDIT ===

I've given up and luckily found a backup.
On a general note I think the TRS files should now be UTF-8 from the start, and then throw an error message at translation-compile time if they contain a character that's too fancy.
 

Monsieur OUXX

I'm trying to get an HTTP response from a https page, using AGS (ags sockets plugin)
I don't really care bout the content, I just want an HTTP 200.

When I try with postman this is what it sends to the server :

Code: ags

GET https://www.raidersofthesevencities.com/stats-startup.html

User-Agent: PostmanRuntime/7.24.1
Accept: */*
Host: www.raidersofthesevencities.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive


Nothing fancy.

Here is how I try to replicate it :
Code: ags

  String host = "www.raidersofthesevencities.com";
  String path = "/stats-startup.html";

  SockAddr *ip = SockAddr.CreateIP(host, 80); //Only 80 works, 443 doesn't return anything

  state.server = Socket.CreateTCP();
  state.connected = !state.server.Connect(ip);
  state.server.blocking = false;

  if (state.connected) {
    String completeTarget = String.Format("https://%s%s", host,  path); //  https://www.raidersofthesevencities.com/stats-startup.html
    
    String command = "";
    
    command = command.Append(String.Format("GET %s HTTP/1.1\r\n", completeTarget )); //I tried removing HTTP/1.1, I get "bad request"
    command = command.Append(String.Format("Host: %s\r\n", host));
    command = command.Append("Connection: keep-alive\r\n");
    command = command.Append("Accept: */*\r\n");
    command = command.Append("Accept-Encoding: gzip, deflate, br\r\n");
    command = command.Append("User-Agent: AGS (Windows NT 5.1; U; en)\r\n\r\n");
    
    state.server.Send(command);
  }


Yet when I try that, I get a "301 permanently moved". And the response contains :
Code: ags
Location: https://www.raidersofthesevencities.com/stats-startup.html

As you know this is the server's subtle way of telling you that you're a silly goose and that you should have gone straight away to HTTPS instead of starting with HTTP. Except... I did start with https, with exactly that URL.

What am I missing?
 

Khris

#1685
Curios that works, because it should be

Code: txt
GET /stats-startup.html HTTP/1.1


You're using  SockAddr.CreateIP(host, 80);, and the server is probably removing protocol and host while parsing the request.

Anyway, the socket plugin has no built-in support for https, all it does is open connections. You would have to implement the entire ssl protocol yourself.

eri0o

(if someone is feeling adventurous, you can implement AGS Script bindings and recreate the objects for a cpprest-sdk plug-in: https://github.com/microsoft/cpprestsdk )

Monsieur OUXX

Quote from: Khris on Tue 19/05/2020 19:56:05
Anyway, the socket plugin has no built-in support for https, all it does is open connections. You would have to implement the entire ssl protocol yourself.

OK but before it sends encrypted stuff there has to be a way for me to simply get a "you hit the right page, thank you" answer, without any encryption-related code? I humbly confess I don't know enough.
 

Khris

I don't think so, but no clue. Maybe the request appears in a log somewhere?
You can also write a small exe that'll make the request and call it from AGS via ags_shell.
Or use an http server that in turn makes the https request. ifttt?

Monsieur OUXX

Quote from: Khris on Wed 20/05/2020 07:59:12
ags_shell.
A few months ago I was trying to remember that plugin and couldn't find it. Thanks! I'll try. Maybe I can do everything through the shell, with Powershell commands. Will it pop up a shell terminal?
 

Khris

#1690
Not sure, but you can use curl instead.

And here's the plugin: ags_shell

Monsieur OUXX

Quote from: Khris on Wed 20/05/2020 08:30:31
Not sure, but you can use curl instead.

And here's the plugin: ags_shell

It will be a better solution, because this causes the page to open in a browser, which I don't want :
Code: ags

ShellExecute("open", "rundll32.exe", "url.dll,FileProtocolHandler http://www.google.com");
 

Khris

#1692
You can use  ShellExecute("", "https://google.com", "");  instead, but that's beside the point.
Let me do some curl tests.

(Also, maybe a mod can split off the https messages and move them to the technical forum?)

Monsieur OUXX

#1693
Quote from: Khris on Wed 20/05/2020 10:46:57
(Also, maybe a mod can split off the https messages and move them to the technical forum?)

Nah, it's really not AGS, just me not understanding internet protocols.
If ShellExecute("", "http://google.com", "") works, I don't need more. Again, I don't need to parse the result, I just need the http server to know that someone hit that page.
Nope, that's no good. It does switch out from the game and open the page in a browser. I want to silently hit the page. I'll try curl.
 

Khris

That call will still open the system's default browser, so not really what you need.
Also, this is about accessing an https server from AGS so pretty sure it falls under AGS technical questions.

Monsieur OUXX

So I've tried this and it seems to work on Windows 10, AGS 3.5.0.24 (aka "patch 2") using curl 32 bits :
Code: ags

  ShellExecute("", "curl.exe", "\"https://www.raidersofthesevencities.com/stats-startup.html\"");


I've simple put all files from curl's "bin" folder into my AGS game's execution folder
Code: ags

curl.exe
curl-ca-bundle.crt
libcurl.dll


Me happy.

I'm very happy that I can just download the binaries for Curl on other systems (MacOS) right off the website.
I'm less happy that I only have the sources to ags_shell and that I need to build them myself for MacOS or Linux. But, oh well. I can't really compain about that.

 

morganw

It is probably worth noting that recent builds of Windows 10 come with a version of curl, and that AGS doesn't change the working directory when it starts, so potentially you may actually be running a separate copy and not the one which you have supplied. Also this shouldn't be confused with the curl alias in Powershell, which is a horrific attempt to map the symbol 'curl' to Powershell's web request functions (which are dependent on other system/IE components, which are potentially not operational).

Monsieur OUXX

Quote from: morganw on Wed 20/05/2020 16:00:58
It is probably worth noting that recent builds of Windows 10 come with a version of curl, and that AGS doesn't change the working directory when it starts, so potentially you may actually be running a separate copy and not the one which you have supplied. Also this shouldn't be confused with the curl alias in Powershell, which is a horrific attempt to map the symbol 'curl' to Powershell's web request functions (which are dependent on other system/IE components, which are potentially not operational).

Is curl a standard program in Linux and/or MacOS? It would be cool if I didn't have to ship it with any of my game's ports.
 

morganw

It used to come with macOS, but I'm not sure if it still does or it is safe to rely on on it always being there. For Linux it wouldn't be safe to rely on it being there and you will also need to ensure that the build you supply can run on slighly older systems (normally by building it on one), otherwise you end up with errors like this:

Code: ags
$ ./program
./program: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by ./program)

Crimson Wizard

Quote from: Monsieur OUXX on Fri 22/05/2020 23:08:09
Is curl a standard program in Linux and/or MacOS? It would be cool if I didn't have to ship it with any of my game's ports.

Idk about macos, but on Linux you're supposed to know how to install any program yourself, so it's hard to tell what is "standard" program at all. But it is probably a "common" program.

It did not come with Ubuntu when I installed it on VM, but it was as easy to install as "sudo apt-get install curl".

SMF spam blocked by CleanTalk