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 / Virtual Button skip pressing

Author
Message
Engineer
10
Years of Service
User Offline
Joined: 16th Jul 2014
Location:
Posted: 31st Jan 2015 08:36
Hi friends!

Build a project, it does have event handlers interface (buttons, input fields), the events of the network interface (receive messages, compose a message, parse the message) statements to SELECT ... case and if then else ...

From a certain point, noted that the program skips the event pressing virtual buttons.
somebody is it?
Little buttons, comparisons too little ... Huh

AGK 2 !
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 31st Jan 2015 11:00
hmm, u used sync more than once in the main loop?

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Engineer
10
Years of Service
User Offline
Joined: 16th Jul 2014
Location:
Posted: 31st Jan 2015 14:08
Markus, Thanks!
Sync () used in several other places, where it was the conditions, I thought that's okay, but it turned out very bad.
At the same time optimize the conditions for checking the current screen and scan virtual buttons.

AGK 2 !
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 1st Feb 2015 22:23
The Sync() command does all the input/output coordination.

Every time it is called, it updates touches (clicks). And it doesn't keep states detected during the previous Sync() call.

In Tier 1, it is generally a good idea to do the Sync() call once per cycle and at a point where all activities will be checked and available to processing before the next Sync() call.

But, there are times when you might do it differently. If you want to pause all processes while waiting for a specific button press or click, then you might set up a loop checking for that one process and doing a Sync() until the activity happens.

Cheers,
Ancient Lady

Login to post a reply

Server time is: 2024-11-25 17:40:59
Your offset time is: 2024-11-25 17:40:59