Project acting odd

Ok, I turned this project into an html, after shooting the wall, it froze, the same thing happened in the project preview window, but THIS happens in the actual editor:
wtf

I was trying to make a perfect gravity platformer game with bullets and odd shapes (ok, I’ll admit it, idk what I was making), and that happens. I feel like it’s similar to that one lag that happens very randomly, and I discussed on this thread:


You guys can try it yourself, here’s the project: gravity 2.wick (9.4 KB)

Let me know if there’s a way to fix this. Thanks for reading,

Sincerely,
@Hamzah_Alani

Oh wow, we both posted 2 different platformer engines almost at the same time :smile:

No idea what happened, I’ll maybe look at the code and see if there’s anything wrong. It only happens if you break a block, so we should look there.

2 Likes

Perfect timing I guess. Just saw your’s, it’s great!

Also, I forgot to mention that you use arrows to move and space to shoot.
Thanks for the quick reply : )

1 Like

It has to do with removing it. Something must have been using the breakable wall in some line of code, and when it was removed it caused a very weird error. I “solved” it by moving the wall off-screen (I changed the x to 999). you can find it in the breakable wall code. I commented out the this.remove() part and added my “fix.”

somewhat fixed8-30-2020_10-15-52AM.wick (9.4 KB)

1 Like

That was a quick fix, I guess the “this.remove();” broke the whole project.


Thanks for the quick solution @awc95014 : )
I’ll turn this post into bug-reporting

1 Like

@Hamzah_Alani so it looks like when the block is removed, code still runs on it causing an error. Then, this error is displayed, without pausing the project. Weird. Will have to investigate, thanks for the detailed post.

1 Like