Does your iPad crash when you run this Hopscotch game?




I only have one of the old version-2 iPads to code with. It's not horrible, but I'm not sure it works with hopscotch the way it's supposed to work. I'm wondering whether some of the quirky stuff that I see happening also happens for people who have newer iPads. I wonder whether my codes crash your device, the way they crash mine.

So, I'm making this game called HoRiZoN. Check it out, if you haven't. It's sorta fun. Meh... maybe not. You decide. It has some actual physics in it. Nothing too fancy. It's basically a simulation of a little ship (a yellow star) in orbit around a black hole. The point of the game is to boost and brake the ship's orbit to collect blue stars or fuel from a space station near the black hole and not to run out of fuel or to crash into the event horizon. Whatever. It's still in progress.

I like how the motion seems nice and fluid. The orbital motion works, except that iPads are so slow that they don't update coordinates and speeds fast enough for energy to be conserved. [Um.. silly], impossible stuff happens. So, I have to fake it with a hard limit on how much force the black hole can put on you, and I calm-down the [um.. silly] stuff that produces energy out of nowhere by using something like frictional drag (hey, there's no drag in space!).

But here's the problem: This game, like most of my others, CRASHES AFTER A FEW MINUTES OF PLAY. Dang it. And that's not all: Sometimes the black hole at the center of the screen, stops pulsing and shrinks down to only 100%. There's no code in there to tell it to do that! How's it doing that? What's going on?

This happens on a lot of my stuff. Not just this game. My "Bugz" game did the same sort of stuff, sometimes. Even worse, frequently the whole Hopscotch app just crashes, right while I'm editing things. It's frustrating. I just have to put up with it.

So, what I want to know is this... does the HoRiZoN game do the same thing on (your) newer iPads? If not, maybe it's just time for me to get a new axe. Can you check it out and tell me what you see? Also, if you see any bad logic in the code, maybe you could share an idea of how to do things better? Thx!


Hey @oio! That's a really awesome game! I have an iPad Air and it didn't crash, so I think your older iPad just can't keep up with it :cold_sweat:


Grrrrr. That's throwing fuel on the fire to just replace my iPad. This thing is always "optimizing performance" in GarageBand too... but that's another subject, another app.

Thanks @SoapyBubbles for taking the time to check on this for me. It usually takes two or three minutes of play before my iPad just dumps out of Hopscotch altogether. So you saw no crash, and the big orb didn't get stuck after a while either? Hmm... It makes me wonder whether even basic timings of a hopscotch program running on this iPad even match those on an "air" or a "mini". I could end up making a game that runs at "normal" speed on mine, and it might be completely unplayable on somebody else's...

Anyway, I'm thrilled if you like HoRiZoN. I'm still playing around with things to make it cooler, but I keep having to throw-out changes because of lags. A good game should never do that. :sunglasses:

Anybody else willing to give it a try and to see if they can get it to crash by playing it for a few minutes? I would be grateful. -oio


I played your game for a few minutes on my iPad Mini and I didn't encounter any problems (crashing, black hole not working, etc.) Your game seems pretty fun! I'm excited to see what updates you add


That's kind of you - on both counts - @CreativeCoder. Thank you so much for taking the time to give that a try and for the reply. It's starting to look like I need to make a platform change, when I can afford it. I have lots of game ideas that might just work...

Am I the only person still using an iPad2? :frowning:


@oio No, I Even Use An iPad 2. I Think.


Ok... Thanks @HopscotchArtAndGames. Now, I don't feel so lost. We can always commiserate, if your stuff starts crashing like mine. :stuck_out_tongue_winking_eye:

But this does kinda raise a question. What is there in the hopscotch framework to ensure that stuff runs at the same speed on different devices, besides actual "wait" commands with so many milliseconds specified? :confused:


I am on an iPad 4 and a lot of people's projects crash, including mine. Are you on iOS 7? I am on 7 so maybe that's it.


I'm on iOS 7 also and it worked fine. It's all different :smile:


I Have iOS 8 And It Is Half Crashing And Half Not.


Thank you @Glitter_Kitty, @CreativeCoder and @HopscotchArtAndGames again for your replies. It was a good idea to mention the iOS version. I forgot to include or even consider that. i am using the latest 8.x iOS version on my version2 iPad.

I am really interested in those cases for which the code crashes. Any HS code. Not necessarily just the game I mention in the OP. I have so many crashes, and I just want to learn how to avoid them. What do you guys think is going on? Is this just a HS bug? Or am I committing some kind of Hopscotch no-no in the code itself? What is so offensive (to my iPad) about this particular game? I would like working on it more, if it would stop losing its marbles and stop getting mad at me and storming out of the room. It makes me afraid to "publish" anything, because I don't want to cause the same craziness on somebody else's device. Any ideas...?


Well I Had 2 Bugs So I Sen't 2 Bug Reports To Hopscotch But Then They Gave Me The Link To Become A Beta Tester. So Probably Yes.


Although, I Only See Hopscotch Crashing On A Project Of Those Non-Avatar User's Project, Or I See It Crash At Some Point In The Project.


Hey I have a first generation iPad mini and the same stuff happens hopscotch team please fix this and I can't wait to play your new game @oio


Honestly, it doesn't matter what generation your iPad is. It's normally how old it is. I had and still have an iPad 2 and it's about three or four and it can't support Hopscotch in general. But when it was new, it worked well.
I have an iPad Air 1 and Hopscotch works fine, and it's about half a year old.


This looks like an awesome game. Excited to play!!

Older iPads can have a harder time running complex Hopscotch games—the memory is kinda shot and the iPad is, for a lack of a better description, tired.

We're going to take a closer look at this program and see if there's something general happening that might be affecting other devices. We want you to be able to code for days on end without a crash.

More to come....

thanks for this awesome bug report, btw.


@Gabe_N, Thanks so much for your reply.

@Kiwicute2015, that's an interesting claim or insight. Yeah, this iPad was as tricked-out as they come, when I got it, but it's kinda clunky now. :confused:

@Liza, I have found a few places where I could streamline stuff (just making some guesses about how HOPSCOTCH itself is coded and how it "thinks") but it (or just my iPad) still loses its marbles every now and then. FWIW, I am still working on HoRiZoN. Not sure why, but I wanna make something fluid and playable, as much as that can be done with... you know. Plus, I kinda like to get physics into my code.

If I have your attention for just a sec, I have one thing that I would like to add about an "improvement" that keeps occurring to me (and to others, too). That's a "when ... is released." I'll tell you where this comes up for me recently. Suppose you have some on-screen control, like my "boost" and "brake" buttons in my silly game, Those controls are normally really transparent, but when they're pressed, I want them to go less transparent. It's a nice effect. A "when ... is released" would be a nice way to accomplish the go-back-to-normal part of resetting the transparency. It could also help, when it comes to sound effects. Hopefully that made some sense...

In general, all of the "when ..." commands could become a lot more powerful, if accompanied by a matching "when not after when" case that deals with what to do when the first when has been met but is no longer met. That was probably too much from me. Sorry. :confused:

But happy faces :smile::smile::smile: to you guys for your nice replies. Thanks, it really helps! :wink:


On the topic of "When __ is released" I posted here about ways people have coded it into Hopscotch before but I agree it would be useful having it as a rule.

Shame about the crashing but good luck with HoRiZoN @oio!


Totally, @oio! These are really good suggestions. We're going to try and allocate some time to making the language more powerful, and both "when _ not" and "when _ is released" are on our list. You make good cases for both!

I think @alish knows a good hack for "when _ is released"....


@t1_hopscotch, yes i did see that. But thank you for pointing this out, in case I had not. I am aware that the topic is far from a new "idea" of my imagining. Just kinda saying "hear, hear!" to what's been said.

@Liza, again, all I can offer in return for your comments are my thanks for taking the time to offer them. Thanks as well to the authors for continuing to make the language better and better and... really, just more fun!

To both of you and anybody else who cares to tune in, while I like the @alish solution and others involving some kind of flag or synthetic timer, the reality (you don't need me to point this out, I know) that if it's a native command being handled inside of Hopscotch, chances are that it will run faster and come with less of a run-time or latency penalty. That's really the only reason I go to the idea of "improvements" rather than just living with my own work-around. Remember.... i'm "oio" with an oldio iPadio. :blush: So, it kinda makes sense that I would care about stuff like that as much as anybody on the forum.

I am looking forward to seeing what's next in Hopscotch. I'm workin' on another couple of games, in the mean time. I sure hope they'll run! :sunglasses: