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 / problem with deleteobject

Author
Message
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 5th Mar 2013 10:28
Hi,

I have a problem with deleteobject command. When I remove all my 3d objects of my scene... 200 objects in Android, sometimes, the application is closed (crashed)... the code is inside a function... the important loop is:



however, if you use this code:



the app works fine.

Do you know why?

Thanks!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 5th Mar 2013 12:14
Sounds like a bug to me. Can you write a simple example that can be run easily and post it on the bug board?


this.mess = abs(sin(times#))
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 5th Mar 2013 18:58
Ok, I know what is the problem... delete objects with transparency! But this can be a problem of my device... i don't know... and i can't post it on the bug board if I am not sure...

This code is not working for me (using AppGameKit player in Asus tf300)



If you uncomment the line setobjecttransparency(i,0)... the app is not closed.

Can you test it in your Android device?

Thanks!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 5th Mar 2013 19:49 Edited at: 5th Mar 2013 19:52
Try this (make sure a double press isn't detected):


EDIT: Does your app work in Windows properly?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 5th Mar 2013 20:10 Edited at: 5th Mar 2013 20:11
Ancient Lady, The app works in windows... the problem is android.

I think that I have not explain it very well (and my english is bad).
If you use setobjecttransparency(i,0), the application works fine, but if you don't write this line the app is closed (although you use getobjectexists(i)). The trick is setobjecttransparency(i,0).

Thanks

EDIT: At least, in my device
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 5th Mar 2013 20:35
I am assuming you are using AppGameKit v1088, correct?

Where did you get your player from?

What Android device are you using and what version of Android is it?

If you post the image file you are using, I will try your code on my devices.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 6th Mar 2013 16:13
Hi and Thanks Ancient Lady!

I am using AppGameKit 1088. I have used two AppGameKit players: I built one player and I downloaded the player from forum


I have used Android 4.1 and 2.3.5. The devices: Sony Ericson xperia neo V, samsung galaxy mini and Asus TF300

I have used a lot of images... but in this example, I am using AppGameKit image (attachment).

I have discovered that if you use setobjecttransparency(obj,1 (or 2)) command, you will have problems... even if then, you use setobjecttransparency(obj,0)

With this example, you can test the problem... repeatedly touch and the app will be closed.




Thanks!

Attachments

Login to view attachments
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 6th Mar 2013 16:45
Hi again,

I have tried new things... The problem is removed if you use render3d()... I don't know why...

my new code is:



greetings!
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 6th Mar 2013 16:57
Tgc made some changes in the syncing that could be the problem ?
I noticed that the speed of agk apps decreased alot after adding 3d commands and they made some changes to speed things up again .

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Mar 2013 17:31
Well, I was testing, to see where the issue might be coming up.

This is the final test code (including your fix):


When I had scnt at 20 and without the render3d(), I could execute from my PC and repeat to my hearts content.

When broadcast to the Android Player, I could get about about 27 clicks and the next would crash it.

When broadcast to an iOS Player, it crashed on the first click.

If I set scnt to 200, the Windows version crashed on the first click. I didn't bother trying on the Players.

When I added the render3d() command in, everyone was happy.

So, it is the rendering/syncing that is killing us.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 6th Mar 2013 18:20 Edited at: 6th Mar 2013 18:21
Ok!! Thanks!!

Then, TGC knows this problem... right? or Do i post it in the bug board?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Mar 2013 19:06
This sounds like a new issue.

Go ahead and post, use my code example in the post and attach the image (for completeness).

I'll then officially confirm it as a bug.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 6th Mar 2013 20:08
Done. Thank you very much.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 7th Mar 2013 04:28
Hummmmm same problem here but for me render3d() doesn't fix the problem ...
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Mar 2013 16:31
MikeMax, where are you doing the render3d()?

I tried doing it after the loop that did the deletes, but it didn't fix it. It had to be right after the delete command.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 7th Mar 2013 16:56



i've tried it just after each deleteObject command .... but i have a lot of objects in each race tracks (i will count them exactly but between 200 and 300 ) ...

i've sent my entire source code to Rick and Paul. They will try to reproduce it (but they already use the next beta version and it seems that the problem has disappeared ...).

I'm waiting for a response soon
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 7th Mar 2013 18:14
Thanks for the small example. Fixed.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 7th Mar 2013 18:33
Wow great !

I can't wait for the next version to test it in my game !
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 8th Mar 2013 10:26
Fixed??? Amazing

This really is speed.

Thanks!

Login to post a reply

Server time is: 2024-05-06 13:01:01
Your offset time is: 2024-05-06 13:01:01