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 / IMPORTANT QUESTION for TGC Team (AGK Team)

Author
Message
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 18th Feb 2013 12:29 Edited at: 18th Feb 2013 12:52
Hello my friends,
after 1 months of working on the CB Video Box i'm sure there is no way to get the wi-fi speed faster also if i use the Apple native functions.

Now, i have a big question...
I discovered that some times, we need to agk::Sync() to refresh the Obj C part of the code, as AppGameKit maybe run on different thread, as the Obj C thread part.
Now.... is possible that we need to exclude the NSURLRequest or Socket coding from the AppGameKit refresher?
Is there something in the refresher that check at the socket, or an internal agk DELEGATE method that slow down my connection?
The problem is that the other programs run faster and can do 800Kb/s but mines do 2Kb/s....
Please help me to understand what i could do to avoid this issue and if i discovered a big issue.

Thx in advance!!!

Edit :
On the MAC is extremely fast as using LAN cable, but maybe there is some difference in AppGameKit for MAC and iOS.

Long life to Steve!
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 18th Feb 2013 14:51
I think TGC should employ Gekko, he is a very technically able guy on iOS and has integrated a lot of features with AppGameKit T2!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 18th Feb 2013 15:18
He has a very worthy signature too

I'll forward a link to Paul, he might be able to answer your question.


this.mess = abs(sin(times#))
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 18th Feb 2013 15:34
Quote: "I discovered that some times, we need to agk::Sync() to refresh the Obj C part of the code"


In tier 1 this is correct. In tier 2 it is not, instead you must return from the App.Loop() function at regular intervals (normally after you have finished drawing your frame, i.e. 60 times a second) so the rest of the device has a chance to do things. The App.Loop() function is called by the OS and then waits for you to return before dealing with other things, like NSURL connections.

In tier 1 we have the luxury of controlling the command set so we can make sync trigger a return from App.Loop() and then when it is called again the interpreter can pick up where it left off.
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 18th Feb 2013 17:20 Edited at: 18th Feb 2013 17:24
Hi Paul, thx for the answer.
is Socket or NSURL Connection linked with agk in some way when i use it? (for example a DELEGATE somewhere)
Maybe the App Loop is on a different thread, but i tested also using "Perform on main thread" and nothing change.

I do this questions cause i can't understand why other app are fast with download / upload and mine not.

So i need to refresh the App to get the things get going on?

For example :
1) Old Version
i have 2 sockets : 1 for sync small request and another that poll the server and wait for a callback

- New Version
i have 2 thread with NSURLConnection, always sync, but on 2 thread to unblock. Always the same 1 for fast request with response, and 1 for poll with a callback.

Now i have always the same speed, and after 1 month of test, i calculated 2Kb/s upload and download.

This is the reason i'm asking if there is something in the agk that can slow down the upload/download process of bytes trough sockets/nsurlrequest

Any suggestion?
Something i didn't tested?
Something in the AppGameKit that we don't know?

Thx in advance!!

Long life to Steve!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 18th Feb 2013 19:10
There is no link between AppGameKit and NSURL or sockets.

Quote: "i have 2 thread with NSURLConnection, always sync, but on 2 thread to unblock"


You still have to return from App.Loop() even if the request is on another thread since the OS won't handle it until your frame drawing is completed.
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 18th Feb 2013 20:22
Oh ok Paul, so if the agk:Sync() is always called, the internet speed doesn't depend on it, right?

In your opinion or for your experience, do you have encountered this problem on the socket speed or url request on wi fi devices?
Have you done in the past some test on the wi fi speed on devices? (i can't find any tip that could help on internet).

Long life to Steve!
AgentSam
12
Years of Service
User Offline
Joined: 14th Mar 2012
Location: Virtual Space
Posted: 19th Feb 2013 00:56
@xGEKKOx:

Based on your answers I wasn't able to tell for sure if you understood what Paul was commenting on.

So, I will refer you to another related thread where the relationship between App::Loop and agk::Sync() is further discussed. (Although I'm fairly sure you're already aware of this.)

Take a look at:
http://forum.thegamecreators.com/?m=forum_view&t=198965&b=41

It's a long thread, but there are some important tidbits of information buried in it, which MAY be relevant to your slow connections due to incorrect handling of the App::Loop.

Cheers,
AgentSam
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 19th Feb 2013 10:16 Edited at: 19th Feb 2013 10:17
Thx AgentSam for the thread link.
As you said, i discovered this thing in the first days i started to use the AGK.

I only wanted to know if someone had some experience in sending/receiving files over wi fi.
If a file of 1Mb takes 2 min like with me or is faster as the other Apple applications.

If the App is done completely in Obj C without AppGameKit or the App is done with AppGameKit has the same internet speed....
I need to know this cause i have done all the possible test we can do and for me nothing changed.

If anyone of you tried to send/receive big datas (Socket/URLRequest) please give me your considerations and if you got the same problem.

Edit : I asked this to the TGC Team because they developed the Multiplayer part of AppGameKit, so if the problem exists, they sure encountered it as me now.

Long life to Steve!

Login to post a reply

Server time is: 2024-11-24 07:42:11
Your offset time is: 2024-11-24 07:42:11