It is currently Tue May 30, 2017 3:54 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: gr.render in an apk instead of the editor
Unread postPosted: Sat Mar 11, 2017 6:25 am 
Offline

Joined: Sat Mar 11, 2017 5:49 am
Posts: 28
Hi

First let me thank the community for such a lovely product.
Also i have been spending some time as a guest in this forum and i must say i am positively surprised about the good/helpful spirit hanging around here.
I have searched the forum for an answer to my problem, but i could not really find something.

So here it comes.
I have a small card game and it works fine, both in the editor and apk(standalone) mode.
it does a little animation ASIN, it display a card from the bottom of the device upwards to the top.
i do this with reading the current position, subtracting 30 pixels from it, gr.modify the object and gr.render to update the screen. All this in a for next loop(30 times)
The strange thing is, overall this takes 500ms when i execute this in the editor. If i convert my .bas file to an apk, the same thing takes 1300ms.
This is of course very annoying.

rfobasic version
editor 1.90.00
apk 1.90.01
i build the APK by means of RFO2APK

regards
dms


Report this post
Top
 Profile  
 
 Post subject: Re: gr.render in an apk instead of the editor
Unread postPosted: Sat Mar 11, 2017 7:59 am 
Offline
User avatar

Joined: Sat Oct 04, 2014 5:45 am
Posts: 643
Hi and welcome to the forum Dms.

Dms wrote:
The strange thing is, overall this takes 500ms when i execute this in the editor. If i convert my .bas file to an apk, the same thing takes 1300ms.

Sort of strange to me as well.
Can you post/attach the code please ?
The APK file that is not encrypted at compile time will be best.

Regards
Emile

_________________
Download and tutorial for RFODESIGNER
https://sites.google.com/site/rfodesigner/


Report this post
Top
 Profile  
 
 Post subject: Re: gr.render in an apk instead of the editor
Unread postPosted: Sat Mar 11, 2017 8:29 am 
Offline

Joined: Sat Mar 11, 2017 5:49 am
Posts: 28
Hi Emile

Thanks for taking the time to look into it.
Apk in attachment.
The goal of the game is to select 2 cards so that they make together the sum of 10.
As soon as this is the case, those cards will be replaced with 2 new cards, and the gosub "flyingcards" is responsible for the animation.
Like i said, in the editor this card animation is smooth, in the apk it is much slower.

regards
danny


Attachments:
maketen.apk [627.83 KiB]
Downloaded 10 times
Report this post
Top
 Profile  
 
 Post subject: Re: gr.render in an apk instead of the editor
Unread postPosted: Sat Mar 11, 2017 9:42 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5518
Location: Paris, France
looks like graphic accel not activated, how do you think Emile?

_________________
- Creator of the Android BASIC! Compiler


Report this post
Top
 Profile  
 
 Post subject: Re: gr.render in an apk instead of the editor
Unread postPosted: Sat Mar 11, 2017 10:58 am 
Offline
User avatar

Joined: Sat Oct 04, 2014 5:45 am
Posts: 643
Hi Danny,

I ran the APK and had a look at the source and am impressed to see that you adopted a good structure similar to Roy's.
I can not find any fault with the APK though.

@Nicolas of coarse the graphic accel is not activated because I forgot to put that option into RFO2APK. :lol: Will add when I get time.
@Danny ==> Basic! have the graphic accel active when you are testing though I think.
You could also use Nicolas's excellent QuickAPK to recompile and test to see if that solves the problem better.

I am aware that at this stage you are still busy developing the game but found a few "nono's" that should be
approached in another way in my opinion.

Roy have done this so many times and I think he could give or direct you to a slightly modified version of the same.
Like using the GR.MOVE command to move (animate) the "card back image" instead of getting current position and then GR.MODIFY command for every step.
So where is Roy? ;)

Regards
Emile

_________________
Download and tutorial for RFODESIGNER
https://sites.google.com/site/rfodesigner/


Report this post
Top
 Profile  
 
 Post subject: Re: gr.render in an apk instead of the editor
Unread postPosted: Sat Mar 11, 2017 11:10 am 
Offline

Joined: Sat Mar 11, 2017 5:49 am
Posts: 28
Hi Emile

Thanks for those nice words.
I will take a look at the two mentioned points.
I will come back when figured out.


Regards
Danny


Report this post
Top
 Profile  
 
 Post subject: Re: gr.render in an apk instead of the editor
Unread postPosted: Sat Mar 11, 2017 12:32 pm 
Offline
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1336
How can we open an apk to see the bas and data inside.


Report this post
Top
 Profile  
 
 Post subject: Re: gr.render in an apk instead of the editor
Unread postPosted: Sat Mar 11, 2017 12:57 pm 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 656
Location: UK
roy wrote:
How can we open an apk to see the bas and data inside.

Stanley? https://play.google.com/store/apps/details?id=fr.xgouchet.packageexplorer

Mike.


Report this post
Top
 Profile  
 
 Post subject: Re: gr.render in an apk instead of the editor
Unread postPosted: Sat Mar 11, 2017 1:11 pm 
Offline

Joined: Sat Mar 11, 2017 5:49 am
Posts: 28
Roy,

I use a program called Total Commander(file explorer).
WIth it you can open an APK as a zipfile and as such see/extract/copy the files from within to where-ever you want

regards
danny


Report this post
Top
 Profile  
 
 Post subject: Re: gr.render in an apk instead of the editor
Unread postPosted: Sat Mar 11, 2017 1:41 pm 
Offline

Joined: Sat Mar 11, 2017 5:49 am
Posts: 28
Goodevening Emile/Roy

I have done 2 things
- first i have modified the 2 statments(getting position + gr modify) with a gr.move
i compiled it with rfo2apk but the result was the same(fast in editor, slow in apk)

- secondly i compiled this modified version with the quickapk package, activating HWA.
and whoops :D , the apk is now the same speed asin the editor.

So end good, all good.

I would like to thank the community, and more special the guys involved for their support.

regards
danny


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2, 3  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred