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 / BUG : Tweening when broadcasting?

Author
Message
appymedia
9
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 24th Jul 2015 11:58
Hi All,

New to AppGameKit but love it so far, looked a long time for something as rapid to dev with, broadcast feature to multiple devices is just simply fantastic!

I think however I've found a little annoying bug. You can repro it by opening the 'TweeningDemo' project and then broadcasting it to a device. Everything will work, now stop broadcasting, then try again, the tween's don't start now. I see the same behavior on both the Android and iOS players. If I restart the Player apps it works again first time.

Is this a bug or is there something I need to be aware of with tween's to cleanup etc? If so, I think that's missing from the 'TweenDemo' project also.

I'm using :-

AGK v2.0.14b
Player Builds May 18 2015 for iOS and May 14th 2015 for Android
Tested on Nexus 7, iPhone 6 + iPad Mini v2

Thanks All
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Jul 2015 12:59
Welcome

I'm not sure what your issue is, as I am working with a project that has lots of tweening. Infact, I have 2 sprites in constant motion that just move from tween to tween. I'm testing on the broadcaster and rerunning it regularly.

There is a bug currently with ClearTweenChain(). It actually deletes the chain instead of clearing it. Could that be the problem?

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
appymedia
9
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 24th Jul 2015 13:07
Hi,

Many thanks for your reply.

I have a simple project that uses a tween to bounce a sprite across the screen, works fine on the first run in the player when broadcasting, I stop broadcasting, change nothing, and then re broadcast it, the tween never fires. I have an FPS counter running that is updating so it looks like the app is running etc.

I thought it was my code so I tried the same thing with the 'TweenDemo' that ships with AppGameKit and have the same behavior across multiple devices. Are you able to broadcast the tween demo and then stop broadcasting it using the tool button in AppGameKit re-broadcast it (without restarting the broadcast player)?

What version of the players are you using please, maybe its something new in the player code etc?

Pete
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Jul 2015 14:43 Edited at: 24th Jul 2015 14:43
Yes, I can do what you are describing with my own app.
I am using the same AppGameKit build and the same Android Player build.

I ran the tween demo, and the second run crashed the AppGameKit player. It was a silent crash, no error message.

I then ran my app with lots of tweens in, and it performs as expected, even between re-broadcasts.

Maybe it's a specific tween type that kills it?

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
appymedia
9
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 24th Jul 2015 14:47
Thanks, I managed to see a crash also. Definitely something odd going on, is there anywhere I can report bugs / issues to the devs, I can't find anywhere?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 24th Jul 2015 15:59
Yep, the tweening demo works on first attempt, subsequent attempts crash the player... In fact, I've just managed to completely lock up my Galaxy Sii. Can't bring up task manager to kill it. Reboot required.

A little more 'hit and miss' testing has isolated the problem to the "SetGenerateMipmaps(1)" command. Comment that out and you should be okay.

@Paul: There appears to be a bug with SetGenerateMipmaps(1) causing the player to crash on subsequent broadcasts.

V2 T1 (Mostly)
Phone Tap!
Uzmadesign
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Jul 2015 18:02
Paul will check this thread as you marked it as BUG

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
appymedia
9
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 24th Jul 2015 18:47
Hi,

I commented out the SetGenerateMipmaps(1) line and still see crashes or tween's not firing here but its not consistent, sometimes its a crash, other times the tween's don't work. I only tested on my iPhone at the mo as a little short for time.

My own example is a lot simpler so I'll do a little testing there and report back a bit later to try and help.

Pete
appymedia
9
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 24th Jul 2015 19:03
Ok,

I think I've found out what I was doing wrong, not sure why I got the behavior I did but here's the code that works first time but not thereafter :-



I scanned the code and noticed I had a mistake here :-



...should be...



I didn't see it because it was working and assumed a bug doh, although it looks like there's a bug been found, sorry for wasting your time a bit guys

Bit of learning curve still for me! I'd still like to know why it worked first time, will have a little dig and debug as there's something to be learned!

Pete
appymedia
9
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 26th Jul 2015 01:51
Hi All,

I done a little more digging on this and have found the issue around tweens and re-broadcasts not working like in the 'TweenDemo'.

It looks like the player app's are not freeing up the Tween resource when they go back to the 'waiting' page where you see the ADK2 logo and swirls.

For instance in the above :-



If I print the 'tweenSprite' var every subsequent rebroacast its incrementing as opposed to :-



Where 'mySprite' chooses the same ID as its 'pool' is being reset correctly I'm guessing.

Also explain why when my code was wrong it works forst time as it happens to be the same resource ID. It also explains why the 'TweenDemo' has such erratic behaviours as it uses static ID's and they start the get muddled up. Will to bet if the code was changed to use dynamic ID's it would work ok until the player ran out of memory possibly?

Can anyone confirm? Is this a bug?
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Jul 2015 10:53
Well spotted. IF the entity ID doesn't reset, it certainly looks like a bug in the Player.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
appymedia
9
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 26th Jul 2015 22:10
Cheers, I tried using 'DeleteTween' after the tween finished but and rebroadcasting but that didn't help so certainly looks like a bug. Guess Paul will pickup from this thread. Does he normally leave a message to acknowledge hes working on things etc?
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 20th Aug 2015 15:16
Thanks, fixed for the next version

Login to post a reply

Server time is: 2024-11-25 19:50:43
Your offset time is: 2024-11-25 19:50:43