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 / [Tier 2]: Possible EditBox Bug.

Author
Message
ThrOtherJoJo
12
Years of Service
User Offline
Joined: 24th Mar 2012
Location: California
Posted: 28th Aug 2014 21:47 Edited at: 29th Aug 2014 12:31
After each round of play I give the player a chance to enter their name to go along with their high score.

Well on the next time around the edit box is displayed but the edit box has a hard time with input. When I try to take out the default text or even add any new text, I have to press the backspace button like 20 or 30 times before a letter is deleted/added. So I'm there pressing the backspace for like a minute trying to take out the default time.

It will eventually take out all of the text but not before a minute or two of trying to take out the text; or even adding text for that matter.

It happens without fail every time. The first time the player gets to enter their name it works beautifully, but that second time it has the problem.

Here is part my code:



..and then when the player exits that screen I called the delete edit box function.
Quote: " if(agk::GetEditBoxExists(editBox1)==1){
agk:eleteEditBox(editBox1);}"





Edit:
I should also state that this problem I'm having is on my device which is a Galaxy S3. I'm using VS2008, with AppGameKit ver 108.24.
Everything works fine in windows.

Prove Your Worthiness
KG2Entertainment.com
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 31st Aug 2014 09:55
Often an issue on multiple devices. Paul thinks it is a problem with NDK. We had such serious issues with folks not being able to use the edit boxes on Android that we gave up and created our own sprite-based keyboard and edit boxes.

Here it is if you're interested:
http://forum.thegamecreators.com/?m=forum_view&t=209538&b=41
Very easy implementation and it works across the board.

Retrific
10
Years of Service
User Offline
Joined: 26th Aug 2014
Location: Horwich, UK
Posted: 31st Aug 2014 12:27
Thank you very much Naphier, this is very useful. I've been having similar problems in tier 1 and had resigned myself to the need to write my own input routine. You have saved me a lot of time/hassle/heartache

Thank you

Doug
ThrOtherJoJo
12
Years of Service
User Offline
Joined: 24th Mar 2012
Location: California
Posted: 31st Aug 2014 13:39
Very Nice Work!!

The only trouble is I have to convert it to a Tier 2 project.

I think it's time to get some help. This will be the third project I will have to convert and I still have one on the back burner.

It is beginning to get to be too much for this lone programmer.


I am soooooo tempted to switch to Tier 1...

Prove Your Worthiness
KG2Entertainment.com
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 31st Aug 2014 19:47
Shouldn't be too hard to switch over that to t2, but I speak with no experience. I've wanted to switch a couple of projects to t2, but after evaluating my needs it just didn't make sense to spend the time. The things I want out of AppGameKit (full Google PLay game services, better FB integration, twitter integration, better sharing, etc) still would take a bit of work so I've opted for the path of least resistance.

I can burn through coding a full t1 game in a weekend at this point. The things that now take time for me are animations and art.

ThrOtherJoJo
12
Years of Service
User Offline
Joined: 24th Mar 2012
Location: California
Posted: 2nd Sep 2014 03:38 Edited at: 2nd Sep 2014 03:48
Quote: "Shouldn't be too hard to switch over that to t2, but I speak with no experience"


Well, it's not hard, it's just not fun some times. There are a lot of gotchas that can take place in C++. For instance, a closing parenthesis, a missing bracket. If you forget one of those, you might take hours before you find that missing bugger. In C++, if you miss one of those, you can get like 100 compile errors.

Another thing is, sometimes you would have to add lines of code. For instance, you have a repeat...until loop which c++ doesn't. I had to turn that into a while statement and use a boolean flag to mimic what you are doing with the repeat...until. I also have to take the check at the until, and turn it into a if stmt; and if it tests true, change the flag to false to exit the while loop.

One thing I'm glad of though, is that you didn't use agk functions that uses strings that could turn into char * in C++. Those things drives me crazy.

For loops don't work the same; local variables have to be declared; the variable that you have declared as decimals, I have to remove the # sign because that means something else in C/C++.


Now I could go on listing more conversion pains, but I won't. I'm just thankful that you took the time to code the virtual keyboard; and most of all shared it. It inspires me to do the same.

That could have been something you definitely could of keep in house.

I do wish however it didn't have to come to us having to create work-a-rounds for functionality that should work out of the box. But, I understand some times things like this happens. And Paul is only one person doing work that other companies have teams dedicated to products.

But all in all, I think that TGC will get there and the product will mature. I can't wait, because I think AppGameKit is a great product...

...well, enough ranting and back to coding/converting.

Thanks again!

Prove Your Worthiness
KG2Entertainment.com
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 2nd Sep 2014 05:37
By the sounds of things when I've talked to Paul about this, there is apparently nothing he can do about it at all and it is a fault in the Android NDK. I've heard of similar issues in Unity with the native keyboard. If you look at some of the more popular games that have text entry you see many of them using a custom keyboard and input boxes. The nice thing about it is that you can control what is input hence blocking things like backticks and spaces in player names.

ThrOtherJoJo
12
Years of Service
User Offline
Joined: 24th Mar 2012
Location: California
Posted: 2nd Sep 2014 06:38
Wow. a problem with the NDK. Looks like I mis-spoke. My Bad!!

Prove Your Worthiness
KG2Entertainment.com
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 2nd Sep 2014 07:24
I like to blame it on AppGameKit too. If they had more resources then their might be a better way to do it, but the way I can think of to make it better might actually make it less responsive and on many Android devices keyboard input is crappy enough. The sprite-based keyboard is much faster than the native one (probably due to lack of text predictions)

Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 2nd Sep 2014 13:20
Why can't AppGameKit have its own custom edit boxes, looking the same on all systems?

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 2nd Sep 2014 13:45
Quote: "Why can't AppGameKit have its own custom edit boxes, looking the same on all systems?"


User are used to the keyboard - so it's better if possible to use that. And I think the look and feel should be the same as the device.

-- Jim - When is there going to be a release?
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 2nd Sep 2014 18:21
They can emulate the device's keyboards, by checking what device the program is running on, and select the closest one.

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
ThrOtherJoJo
12
Years of Service
User Offline
Joined: 24th Mar 2012
Location: California
Posted: 2nd Sep 2014 21:43 Edited at: 2nd Sep 2014 22:00
After more testing with the edit boxes I've notice something strange.

When I pressed the edit box to input text for the first time, I'm able to input/delete text just fine.

After I finish entering text, I accidentally tapped the screen to the side of the edit box, which to my surprise closed out the keyboard.

I then tapped the edit box again, and to my surprise again, I was able to enter and delete text. IT'S WORKING...IT'S WORKING...ahem. The edit box didn't lock up.

BUT, if I press the back button on the device to close out the keyboard, that action locks up the edit box.

I have tried it five times with the same result each time. As long as I don't close out the keyboard with the back button it works as expected.

So, is there any way to confirm this on other devices. I'm using Galaxy S3, working in Tier 2.

Prove Your Worthiness
KG2Entertainment.com

Login to post a reply

Server time is: 2024-11-25 09:43:45
Your offset time is: 2024-11-25 09:43:45