Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / App Game Kit 108.20 & 108.21

Author
Message
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 4th Mar 2014 14:15 Edited at: 4th Mar 2014 14:16
SMD_3D:
Can't you use GetRawJoystickExists( index ) ?

Quote: "Returns 1 if a joystick exists at the given index. Physical joysticks are detected at startup and placed in IDs 1-4 incrementally. You should call CompleteRawJoystickDetection at some point before this command to make sure that all present joysticks have been discovered. After the initial detection process plugging in additional joysticks will not be detected. Unplugging a joystick will not delete its index and this command will still return 1, but all the joystick's values will return 0. If a disconnected joystick is reattached the AppGameKit will attempt to reconnect to it, but this cannot be guaranteed.

An alternative version of this command exists GetJoystickExists, in which case it will return 1 if there are any raw joysticks attached. "


SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 5th Mar 2014 02:15 Edited at: 5th Mar 2014 02:15
lol! did I seriously not see this command in the help section...pfft! omg... Thanks da for pointing it out.

Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 5th Mar 2014 13:30
Quote: "Thanks da for pointing it out."

It's so easy to miss commands in the input section. It's a big mess

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 5th Mar 2014 15:11
Found new bug....
Go in AppGameKit Product page to see what is.

Long life to Steve!
Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 24th Mar 2014 12:02
I have a question:


error #1:
"too many stars, too many stares. disembody."
WIP: MIND!! | free fonts for your AGKs
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 24th Mar 2014 15:10 Edited at: 24th Mar 2014 15:13




Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th Mar 2014 15:22 Edited at: 25th Mar 2014 08:39
@Scary Little Rabbit,Digital Awakening
today i try this NOT, seems it is a bug in compiler...
the compiler get later attention on the way to v2 i believe...

faster (edit: seems in agk <>"" is faster)
if len(s$)>0

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 24th Mar 2014 16:07
Digital Awakening


error #1:
"too many stars, too many stares. disembody."
WIP: MIND!! | free fonts for your AGKs
Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 24th Mar 2014 16:27 Edited at: 24th Mar 2014 16:44
Markus


error #1:
"too many stars, too many stares. disembody."
WIP: MIND!! | free fonts for your AGKs
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th Mar 2014 17:09
@Scary Little Rabbit
i not trust this measurement.
in this order its different.
but maybe the compiler is smart do replace the <>"".
normal need a string compare longer then value compare.


AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 24th Mar 2014 17:41
Scary Little Rabbit


Not sure if that's how not should work. I definitely does not. Maybe a bug maybe it is not. I do not know.

Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 24th Mar 2014 18:20
Markus, why your code does assignment c=n 100 times for each cycle of outer for-next? instead you can sleep for a some constant value (about 1850 ms for ac=100000 on my PC for example). it is just waste of time and that misrepresents results. and so as you reduced ac in 10 times so you don't feel the different now.

try again my new and improved:


error #1:
"too many stars, too many stares. disembody."
WIP: MIND!! | free fonts for your AGKs
Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 24th Mar 2014 18:25 Edited at: 24th Mar 2014 18:26
Digital Awakening, I think it is bug. big bug. especially when it compiles your if ( s$ = "some") not ( s$ = "" ). is it unary operator or what? crazy, man, crazy!

error #1:
"too many stars, too many stares. disembody."
WIP: MIND!! | free fonts for your AGKs
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 24th Mar 2014 19:40
NOT in the case of AppGameKit is probably only meant to be used where AND, OR and XOR would otherwise be used, between 2 statements.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th Mar 2014 21:01 Edited at: 24th Mar 2014 21:13
@Scary Little Rabbit
seems for any reason <>"" is faster than Len()>0

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 25th Mar 2014 00:17
Android HTTP request always return "Failed to send HTTP request code : 28"

Long life to Steve!
Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 25th Mar 2014 04:16
Digital Awakening in this case they forgot to fix the manual:
Quote: "Home > Principles > Arithmetic, Relational, Boolean and Bitwise Operators
«This operator is a unary operator and only requires a single right-side value»
"


error #1:
"too many stars, too many stares. disembody."
WIP: MIND!! | free fonts for your AGKs
Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 25th Mar 2014 04:21
so I have another question. why you can't compile this:

but can compile this:


error #1:
"too many stars, too many stares. disembody."
WIP: MIND!! | free fonts for your AGKs
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 25th Mar 2014 08:08
@xGEKKOx,Paul,
i had also got some status codes from agk player
but don't know what the numbers means.
for me it was the firewall options or iis server config.

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 25th Mar 2014 09:18
Quote: "This operator is a unary operator and only requires a single right-side value"


Guess I was wrong, never read that part of the manual Would be nice if it worked as it should.

Quote: "why you can't compile this:"


Good question.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 25th Mar 2014 12:13
@xGEKKOx
about "Failed to send HTTP request code : 28"
be sure u use correct ip at SetHTTPHost
today i had same problem.
i had looked in cmd/ipconfig

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 25th Mar 2014 17:05
Markus, i think is a bug, because in the older version it was working well.
Of course HTTP is on port 80, so is not the firewall.

Paul please can you look at this?

Long life to Steve!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 25th Mar 2014 18:02
Error code 28 is coming from the HTTP library and means the operation timed out, possibly because the host was unreachable or the device didn't allow the app to communicate over the network. Does the app have the android.permission.INTERNET permission in the AndroidManifest.xml?

If you get other error codes you can look them up here
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 25th Mar 2014 18:20
Thx Paul i go to investigate immediately!

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 25th Mar 2014 18:23 Edited at: 25th Mar 2014 18:25
This are the permissions in manifest:


It seems a sort of timeout too low, as my server receive it but the AppGameKit don't wait the response.

Long life to Steve!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 25th Mar 2014 18:31 Edited at: 25th Mar 2014 18:31
@xGEKKOx
i thing you had answer about my message before.not saw last from today.
my problem today was a hard coded ip in agk but got
a new ip from dhcp server.
so my app did not work same as last week here.

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 25th Mar 2014 18:33
What you mean?

Long life to Steve!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 25th Mar 2014 18:42 Edited at: 25th Mar 2014 18:43
@xGEKKOx
i had used a wrong ip at SetHTTPHost and got code 28 today.
maybe u have similar problem.
did not know if you saw my message at top of page 4
because your answer was about firewall.

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 25th Mar 2014 18:51
Yes i saw it, but i'm using an IP to connect to my server.

If i add http:// it don't work and i don't know what to do.
1/100 work cause the server response arrive in 1 sec but sometimes when the server need time to response it go error 28.

I think AppGameKit HTTP has a too low time out on the SYNC request.

I will try with the Async too.

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 25th Mar 2014 19:17 Edited at: 25th Mar 2014 19:24
@PAUL

Paul i think is a TIMEOUT problem.



I added a while(response == "") to wait the server, and after 20/30 tries it worked.
Also when the code try to call it later it worked after 20/30 error 28.

Can you give a look to it?
I think if you repair this bug on HTTP the AppGameKit could work on Android for me too.

Why don't add a timeout value to the function?

EDIT :
This is the image of the LogCat



As you can see after some tries, it get the ris: .....

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 25th Mar 2014 19:37
Ok i confirm the AppGameKit HTTP has some bugs.
Sometimes crash directly.

Please Paul fix it or i can't use AppGameKit on Android.
I'm searching for an alternative way to do HTTP request in c++ but i can't find it.

Long life to Steve!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 25th Mar 2014 20:47 Edited at: 25th Mar 2014 20:51
@xGEKKOx
i had used http request only with a local iis express webserver,
did u use a hosted or local server?
work/work not is odd.
i had used SendHTTPFile, not SendHTTPRequest.

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 25th Mar 2014 21:06
I just tested SendHTTPRequest on Android and it returned a result on the first attempt. The default timeout is 6 seconds, so to get 20 failures due to time would take about 2 minutes, it sounds more likely that the connection is being blocked or refused and therefore "timing out".

There is a message part way through your screenshot about turning airplane mode on, which would block outgoing connections, or perhaps the device is using some form of power saving by turning off the wireless device when not in use and it is taking some time to power back on.
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 26th Mar 2014 00:56 Edited at: 26th Mar 2014 00:58
@Markus : Yes i have an online dedicated server, with about 120000 players each day and an average of 1000 always online. So my timeout is variable from 0.5 to 25 sec.

@Paul
I need more than 6 seconds of time out, i need 30 sec.
And i need it on the Sync type request.

Why you simply leave the choice to the coder of timeout ???

Add a variable to the function and all we will be happy.

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 26th Mar 2014 02:59 Edited at: 26th Mar 2014 04:10
Ok after another day of test, i can say again AppGameKit Tier 2 is full of bugs on Android.

- Disconnections
- HTTP Request doesn't work (On ios it takes 1sec to get response with my OBJ C code)
- Sometimes the graphic flicker
- Sometimes the screen go up and down regularly
- Random crashes and never on the same line of code

I don't know how the other users work, but for me this isn't the way. Absolutely!

Long life to Steve!
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 26th Mar 2014 09:24
Could you send me the project you are trying to get working, I would love to see if it works on my end... Im guessing you are still testing the template I sent you

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy
Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 26th Mar 2014 16:15
Quote: "Add a variable to the function and all we will be happy."
+1.

hi Paul. how about my questions?

error #1:
"too many stars, too many stares. disembody."
WIP: MIND!! | free fonts for your AGKs
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 26th Mar 2014 16:59
Hi Zoq, yes is your template.
That work pretty well.
I found HTTP is bugged on AppGameKit (108.19 to 108.21 the ones i tested) but i remember in the past it worked on my Nexus 5.
Now i know there's no error in my code, as when the HTTP worked, my game worked as on iOS.

Long life to Steve!
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 26th Mar 2014 17:20
Can you post the specific snippet of code for the HTTP Request, including complete URL you are requesting? Other can try it in Tier 2 and report their results.
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 26th Mar 2014 17:39
No i can't.
I can post the code but with an example.
My server is crypted and need some crypted commands to work. I can't show them.



Long life to Steve!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 26th Mar 2014 18:20
Quote: "agk::SetHTTPHost(http_conn, "XXX.XXX.XXX.XXX/MyFolder", 0);
...
agk::SendHTTPRequest(http_conn, "Server.php", body.c_str());"


That should be


Quote: "Add a variable to the function and all we will be happy."


I'll consider it for a future update, but having a request take 6 seconds in the Sync version will stall the app and make Android think it is not responding anyway. A better course of action would be to find out why it is failing, for example does it happen with other servers or other devices, or does the above fix solve the problem.

Quote: "hi Paul. how about my questions?"

I don't know why it wouldn't compile, part of the reason I put rewriting the compiler high on my list.
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 26th Mar 2014 19:31 Edited at: 26th Mar 2014 19:54
Ok Paul i go to test immediately!!!
Thx for the TIMEOUT value in future!!!

Not all apps need the Async, some need Sync too. So the value in the function contruct is a good solution.

Edit : Same as before, it go in timeout while waiting the server response.

Edit2 : Worst than before, now the while give me 1/150 tries.
I think this must be updated soon. Maybe nobody use the HTTP function or maybe it works well only on Tier 1.

Anyway now with your fix on the host address, it need more time to connect and get the SIGSEGV signal on NULL received and crash.

Edit 3 : With OBJ C it take 0.35sec to connect to my server and get the response.

This is the error that happen sometimes


Long life to Steve!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Mar 2014 03:04
Quote: "I found HTTP is bugged on AGK"

I've had no issues with HTTP commands on AppGameKit on 6 different Android devices (5 different manufacturers and 4 different Android versions).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 27th Mar 2014 04:20
Paul, another one problem in operator "not".

error #1:
"too many stars, too many stares. disembody."
WIP: MIND!! | free fonts for your AGKs
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 27th Mar 2014 08:09
If it fails, why not make a loop that try again, and again, until you get a response? Then timeout if it fails like 50 times ?

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 27th Mar 2014 18:26
The HTTP has problem i think, impossible don't find my server that iOS find in 0.35 sec

Long life to Steve!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th Mar 2014 01:58
Would you care to show the code that isn't working?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 28th Mar 2014 02:11
Already done with images and code in previous posts.

Long life to Steve!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 28th Mar 2014 15:13
Does this happen when you try to contact other servers, or just yours? Does this happen with multiple Android devices or just one?

I have tested the Android HTTP commands with a TGC server and everything works normally here, can you create a small example that replicates the problem?
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 28th Mar 2014 17:59
Paul i send you the address and the page to query in a private mesage.

Long life to Steve!

Login to post a reply

Server time is: 2024-11-25 09:25:39
Your offset time is: 2024-11-25 09:25:39