Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too fast bug #8

Open
bberthelemy opened this issue Sep 19, 2014 · 20 comments
Open

Too fast bug #8

bberthelemy opened this issue Sep 19, 2014 · 20 comments

Comments

@bberthelemy
Copy link

When you swipe a lot of times in any direction quickly, the tiles go out the board !
And some blocks become unavailable ...
ios simulator screen shot 19 sept 2014 16 49 38

@danqing
Copy link
Owner

danqing commented Sep 19, 2014

What's your iOS version, and how exactly to reproduce? Thanks!

@bberthelemy
Copy link
Author

I tried it on the latest IOS release (8).

To reproduce the bug, just swipe to left, right, top or bottom a lot of time very fast.

De : Danqing Liu [mailto:notifications@github.com]
Envoyé : Friday, September 19, 2014 5:23 PM
À : ik/2048
Cc : bberthelemy
Objet : Re: [2048] Too fast bug (#8)

What's your iOS version, and how exactly to reproduce? Thanks!


Reply to this email directly or view it on GitHub #8 (comment) . https://github.com/notifications/beacon/8833935__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNjc1OTM5NCwiZGF0YSI6eyJpZCI6NDMwMDQxNjF9fQ==--4c9c70eb1ec7d39d546525ad259185497892cb2a.gif

@dingdaojun
Copy link

i found the bug too, compile with Xcode6 or run on iOS 8 device , it easily crashed. It seems to a SpritKit BUG.

@dingdaojun
Copy link

I found it is SHA 3ffec54 Fixed (I think) crash on iOS 8 problem...If I revert this commit, it 's not happen again

@danqing
Copy link
Owner

danqing commented Sep 20, 2014

Yeah I saw the out-of-board thing. Haha it's actually pretty hilarious... I'm taking a look.

@danqing
Copy link
Owner

danqing commented Sep 20, 2014

@dingdaojun Do you mean that commit causes crash, or causes the tiles to go out of board? I think without that change the app will crash on iOS 8.

@dingdaojun
Copy link

That commit causes the tiles to go out of board. But with the commit, it no longer crash on iOS 8. Thanks!

@dingdaojun
Copy link

iOS 8 crash is often EXC_BAD_ACCESS, isn't it? It's break on SpritKit and I don't know how to debug.

@danqing
Copy link
Owner

danqing commented Sep 20, 2014

Okay yes. So that commit fixed EXC_BAD_ACCESS, but (possibly) introduced the out of board bug. I say possibly because it may already exist, just it would crash before it goes out

@dingdaojun
Copy link

Can you speak Chinese?I planned to use this open source game code to make an edition of "NBA 2048". Huh Huh, I found It crashed On iOS 8 so didn't commit to App Store yet. Because I don't know if Apple accept the app which only compatibly with iOS 7.

@dingdaojun
Copy link

Umm...But under iOS 8, I never see the out of board BUG. I have never used SpritKit yet before.

@danqing
Copy link
Owner

danqing commented Sep 20, 2014

I know what's going wrong here, but you certainly don't plan for me to fix the bug so you can submit this to Apple as your app, do you?

@dingdaojun
Copy link

I certainly will submit app to App Store, but I will give the whole source code to you which I changed.

@dingdaojun
Copy link

If you can leave a contact such as IM or Email, we can send private message yet.

@bberthelemy
Copy link
Author

@ik tell me what's wrong I could make a fix

@danqing
Copy link
Owner

danqing commented Sep 22, 2014

@bberthelemy I'm looking and I'm not sure if there's a fix of < 10 lines. Basically runAction is (really) async in iOS 8, so we need to sync state updates to the visual movements.

What happens now is when you swipe fast, these two can go out of sync, and while the state tracker thinks a cell is at the first row, it may actually be at the 3rd row. Then you swipe down, and the state tracker moves the cell down by say 3 rows. Visually it will then be out of bound.

I wonder if moveTo instead of moveBy would prevent something like this to happen. If not, we need something that tracks all moving tiles and do things step by step, and that'd be a larger change.

@jaypak
Copy link

jaypak commented Sep 25, 2014

hi IK,

thank you for your work on writing this game using sprite kit

i found an issue relate to restart a new game while ago which cause memory leak?

i think you fix in this build

could you explain how you fix t? what was the issue? which part of code you updated?

thank you

jayp

@bberthelemy
Copy link
Author

for the out of screen bug, just dont send all SKActions in the same time, i tryed to change every [_pendingActions addObject...]; by [self runAction...]; and it seems to work like that !! If you want me to update the code add me as contributor.

I hope it's helpfull.

@danqing
Copy link
Owner

danqing commented Sep 26, 2014

@bberthelemy I wonder if that will have unexpected consequences.. Do you want to send a pull request? Thanks!

@danqing
Copy link
Owner

danqing commented Sep 26, 2014

@jaypak Maybe this is what you are looking for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants