A better swipe screen is needed

Get help using Construct 2

Post » Mon Apr 28, 2014 7:15 pm

hi there,

I found this helpful tutorial https://www.scirra.com/tutorials/560/sw ... th-inertia which works great on pc, but when I tested it on mobile I found it to respond pretty poorly. I tried with graphics and without..

I like having the momentum effect rather than having it stop dead in it's tracks, but this is probably where the performance / accuracy is an issue, but it seems hard to believe this is asking a lot of C2.

http://part12studios.com/temp/ManualTest/ (with graphics)

http://part12studios.com/temp/ManualTest2 (without graphics)

the graphics did bog it down some when testing on iPhone, without graphics seemed a bit better, but on android and WP8, it really felt generally very jerky.

Is there a smarter/efficient way to do a proper swipe scroll with C2? it seems hard to believe that as great as C2 manages web this would not be a demanding act

It seems like the "every tick" approach might be the issue? I'm not sure how else to approach this but ultimately what would be great is simply having a nice smooth 60fps feeling experience that isn't struggling when flicked up and down..

Any advise / tips would be welcome.

Thanks!
Caleb
B
59
S
9
G
1
Posts: 970
Reputation: 6,611

Post » Tue Apr 29, 2014 2:35 am

This is my demo....
my lovely demo

http://www.mediafire.com/download/9cvdt ... /test.capx

Using drapdrop&touch&bullet
B
17
S
7
Posts: 360
Reputation: 2,202

Post » Tue Apr 29, 2014 4:41 am

It does work very nicely other than going to high up causes the crosshair to leave the scene but it works well going down on PC.

Still seems to be a little jerky on mobile, but I think I'm realizing that 60fps scrolling even with other sites is not really happening on mobile devices in general so I guess I'm just expecting too much from mobile devices.

I haven't had a chance to analyze how your system works, but it does seem to be a good one. Thanks for sharing!
B
59
S
9
G
1
Posts: 970
Reputation: 6,611

Post » Tue Apr 29, 2014 1:38 pm

Ok so I put some simple constraints on that demo, but i'm noticing something undesirable that occurs on this demo.. if you drag and pull (not swipe) it does a kind of jerky dance till you let go.. so it seems like ther emight need to be some other method or approach to how the scroll happens while finger is touching and then on release the bullet effect works nicely...

http://part12studios.com/temp/ScrollTest1/ original..

http://part12studios.com/temp/ScrollTest4/ this one was optimized for web (just made the images small so they would load faster and i put some constraints on it to keep the crosshair from leaving the screen..


unfortunately both suffer from the jerking effect.. here is the optimized version I made https://www.dropbox.com/s/320zqfihyvb8b ... Test3.capx
B
59
S
9
G
1
Posts: 970
Reputation: 6,611

Post » Tue Apr 29, 2014 4:17 pm

scrolltest4.capx
You do not have the required permissions to view the files attached to this post.
Image ImageImage
B
172
S
50
G
183
Posts: 8,442
Reputation: 115,603

Post » Tue Apr 29, 2014 5:56 pm

If you ready to make the game for mobile
The key point is which planform tools you use
eg: phonegap=lag lag lag lag|[email protected]=very fast

don't try to use mobile browser play the game

=======
about pc&mobile
just make two Controller

if user.planform=PC then
touch UI.invisable
and enable user to use the mouse ball
B
17
S
7
Posts: 360
Reputation: 2,202

Post » Sat May 03, 2014 6:34 pm

@newt the jiggle is gone, but i also see we can do any kind of drag/scroll with this.. so it's better, but not perfect

@fongka2 its not about making a game for browser, but really getting the logic to work right. the performance issues i site were only part of the issue.. the bigger problem is the swiping logic (even on PC) not being reliable..

in general all of the techniques I've tried all resulted in something being less than stellar compared to a mobile browser..

the first one had issues where when you "grab" the screen to flick it, sometimes you'd get dud flicks..

the bullet method was nice but it lacks any drag-ability

So even if I did wrap it with crosswalk or some other wrapper, it doesn't matter if it runs faster on mobile if it doesn't perform consistently.

I'm still excited to find a solution eventually. i think maybe there is some way to blend the two.. i just haven't figured out how.. in my head the way i see it is to use the drag / snap effect used in the bullet method.. notice how it always returns to the middle so no matter what you do you grab it..

then using the flick / comparison information of that object, pass it on to the camera like in the first example.. but i'm not sure if that would support drag/scrolling.. flick only is not acceptable.. i just want to find an air tight 1 to 1 comparison to how mobile browsers scroll
B
59
S
9
G
1
Posts: 970
Reputation: 6,611

Post » Fri Oct 10, 2014 2:10 am

hey @part12studios - just curious if you've delved deeper into this / have come up with any solutions. Im about to get heavy with this tomorrow probably and would love to share my results, but even better if we're halfway to a solution that hasnt already been posted.
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020

Post » Fri Oct 10, 2014 4:12 am

Yo my C2 homies.

So here's what I got from tonight's work... i think it's close but needs some tweaks for sure. The main thing missing at this point is a 1:1 'drag' scroll.

You'll notice Im actually setting the bullet and drag action on the BUTTONS themselves. Personally I think this is far superior and less resource intensive as you can have the rest of your UI / background / etc static without worrying about scrolling through everything. PLUS it has the added benefit of doing things like wrapping etc with a little more effort.

So here's my rough work so far... Let me know if you can help me get it a little further along...

http://d.pr/f/19RgU/2vWIaYL5
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020

Post » Fri Oct 10, 2014 6:01 am

Well here we go, i think i got it..

Basically i pinned the buttons to a "Board" and then Im applying the movement to the board itself, not the buttons, so because the buttons are pinned to the board, they go along for the ride... Give it a try, I've also added mad comments to the capx so you can see how it's all setup. The buttons are placed dynamically so you can generate them on the fly / with a function / etc, and even just pick out their sprite by setting the animation frame to the loopindex.

Hope this helps someone out there, god knows ive got enough knowledge from these forums, it's only right i give back.

CAPX: http://d.pr/f/1e1HG/1dCxNTsV
Demo: http://3030.ca/swipe6/

Hugs,
Nate
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests