[Behavior] moveto

Post your completed addons to share with the community

Post » Sat Oct 14, 2017 10:28 am

Hi @rexrainbow

I'm facing a strange issue with the "MoveTo" behavior.
It says remaining distance 0, but it's still saying "moving"

Image
Image

The player is exactly in the position he has to be (that's why the remaining distance is 0).
However sometimes it's "-0.00053", then the "moving" boolean is set to wrong.
Could it be an issue that the "moving" boolean will not be toggled when the distance is exactly 0?

Thanks for your help!
Image Image iTunes: Match3 | Google Play: Match3
B
114
S
42
G
31
Posts: 1,191
Reputation: 29,823

Post » Sat Oct 14, 2017 2:10 pm

@AndreasR

Thanks, I had fixed the issue of negative of remain distance. Now it will be 0 when moved to target.
But I did not find the first bug -- It says remaining distance 0, but it's still saying "moving", please provide a very simple capx for this bug.
Goodbye
B
111
S
28
G
295
Posts: 4,549
Reputation: 164,228

Post » Sun Oct 15, 2017 6:39 am

rexrainbow wrote:@AndreasR

Thanks, I had fixed the issue of negative of remain distance. Now it will be 0 when moved to target.
But I did not find the first bug -- It says remaining distance 0, but it's still saying "moving", please provide a very simple capx for this bug.


Hi @rexrainbow

thanks for the quick fix. I figured out why the "is moving" boolean remains at true.
I made a simple capx, please find it here.

https://www.dropbox.com/s/9chra5d806k2w ... .capx?dl=1

It's caused if you let move the player to a position he already is. So the distance is actually 0 from the start, but if you call the event "Move to [current.X, current.y]"
the "is moving" boolean is true, but the player doesn't move actually, so it never gets set to false.
Image Image iTunes: Match3 | Google Play: Match3
B
114
S
42
G
31
Posts: 1,191
Reputation: 29,823

Post » Mon Oct 16, 2017 3:48 am

@AndreasR

1. In this tick, sprite hits target position, triggers that event, and try to move to (current) position,
2. In next tick, sprite moves 0 pixel (is moving is true) and the same as step 1, sprite hits target position, triggers event and try to move to (current) position.
3. repeat step 2, ...


is moving is always true in this case. It is correct.
Goodbye
B
111
S
28
G
295
Posts: 4,549
Reputation: 164,228

Post » Thu Nov 16, 2017 7:25 pm

I am trying to download the move to plugin here:
https://c2rexplugins.weebly.com/rex_moveto.html

It's 16kb but is empty

Cancel that. I installed 7z to extract it. :) Works now
B
6
S
1
G
2
Posts: 5
Reputation: 1,373

Post » Mon Dec 11, 2017 10:04 am

I'm having some performance problems with moveto. I use cocoon.io and it works smooth as hell with the launcher app. When I compile it to iOS the objects running with moveto behaviour don't run smooth at all. It lags quite a bit and i'm on an iPhone 7 Plus. Are there any performance tips?
Working on "EVERBLAST"
Image
B
32
S
6
Posts: 232
Reputation: 2,884

Post » Mon Dec 11, 2017 10:45 am

Kraudi wrote:I'm having some performance problems with moveto. I use cocoon.io and it works smooth as hell with the launcher app. When I compile it to iOS the objects running with moveto behaviour don't run smooth at all. It lags quite a bit and i'm on an iPhone 7 Plus. Are there any performance tips?


Hi
I'm using this behavior as well. But I never had any performance issues with it while using Cocoon.
I test my games on an Iphone 6s.

Regards
Andy
Image Image iTunes: Match3 | Google Play: Match3
B
114
S
42
G
31
Posts: 1,191
Reputation: 29,823

Post » Mon Dec 11, 2017 11:19 am

AndreasR wrote:
Kraudi wrote:I'm having some performance problems with moveto. I use cocoon.io and it works smooth as hell with the launcher app. When I compile it to iOS the objects running with moveto behaviour don't run smooth at all. It lags quite a bit and i'm on an iPhone 7 Plus. Are there any performance tips?


Hi
I'm using this behavior as well. But I never had any performance issues with it while using Cocoon.
I test my games on an Iphone 6s.

Regards
Andy


Okay thats quite odd. Because i made an iOS puzzle game which is 1.5MB large and uses about 11mb ram. So the performance should be much better. But it's only smooth with the launcher app. Not after compiling and testing on the device.

I'm using scale outer mode to let my game scale to every iphone and ipad and it works great. But I'm asking myself it this can be a factor for the bad performance in addition with behaviours.
Working on "EVERBLAST"
Image
B
32
S
6
Posts: 232
Reputation: 2,884

Post » Mon Dec 11, 2017 11:20 am

@Kraudi I see no performance issues with moveto on mobile either, not even a problem on my oldest testing devices. Sure it is the moveto behaviour?

Are you using effects of any kind? Even the simplest effects can make a game unplayable on mobile.
B
61
S
26
G
16
Posts: 802
Reputation: 14,495

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest