How do I fix this (Solved)

Get help using Construct 2

Post » Thu Jun 02, 2016 2:42 pm

Hello. Okay I first want to say that I didn´t find a good place to ask this. I thought that maybe I could ask it in the bug "department" but I don´t know if this is a bug. I only want to ask a short question to understand if this has happened to someone else too.

My situation is this: If I just let the game run in a test layout and there are some physical objects there, it runs normally for about maybe 30 minutes, maybe an hour but after that in preview (chrome) there is an error.

I have checked collision points and changed them etc. but no. It seems to be not about that.

It´s a javascript error. (I don´t know how to put an image here, so here is the link to image with errors)

Image or here http://imgur.com/4uw1Xzc

This error comes with two sprites on the screen (separetely). Both are animated. I wonder if the collision points are the problem even though I changed them to match each other exactly (and none are crossing each other or anything like that)

I´ll post the capx later if needed but maybe the Pros here can guess what the problem might be. It certainly has something to do with physics yet not very soon. It takes a long time to the error to come? That´s weird, and it happens even when in my test layouts player is not doing anything.

Can this have something to do with memory. My computer has crashed two times now as i have left the game on it´s own (win 7 64-bit). This kind of crash has before happened very rarely and now 2 times in a short period of time (few days).
Last edited by tomi71 on Tue Jun 07, 2016 2:49 pm, edited 3 times in total.
B
30
S
15
G
17
Posts: 137
Reputation: 10,873

Post » Thu Jun 02, 2016 3:47 pm

First check if non of the collision polygones overlap.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu Jun 02, 2016 3:53 pm

Posting the .capx would be the most effective way to get a more efficient and quicker response, otherwise we are just guessing.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,548
Reputation: 60,440

Post » Thu Jun 02, 2016 4:07 pm

Here is the capx. I thought that maybe the error won´t happen in this "stripped down" version. But it did. Game was run about 18 minutes and bang! Error. Weird.

Capx: https://www.dropbox.com/s/6n92rw50agoco ... .capx?dl=0
B
30
S
15
G
17
Posts: 137
Reputation: 10,873

Post » Fri Jun 03, 2016 6:19 am

It has something to do with that rotating beam animation. Now I try without them and see if there is an error.
edit: after removal of the rotating beams no error so far.

edit: Fixed the rotating beam in photoshop. Cropped all else out and seems to work better. No error for a long time, but must check more.
B
30
S
15
G
17
Posts: 137
Reputation: 10,873

Post » Fri Jun 03, 2016 8:29 am

Computer however crashed during preview (after an hour of so). Don´t know if it has something to do with this but everytime it has crashed, the game has been running in chrome preview.
B
30
S
15
G
17
Posts: 137
Reputation: 10,873

Post » Fri Jun 03, 2016 9:28 am

As i said.

The collision polygones of clark animate to much. It will get stuck.

The collision polygones of
Sprite21
Sprite26
Sprite57
Sprite56
Sprite53
overlap eachother, thats a no no for the physics engine

99% of the sprites have collision polygiones that Construct guessed by import. They are all messed up.
This is just uncarefull coding.

Not that i expect you to listen this time.

It runs fine when i correct the biggest problems.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Jun 03, 2016 11:41 am

Thanks. I will look at those sprites.

Edit. It´s very interesting. I never thought that these could cause problems since they are not physical objects, but it´s good to know for now on that even those can be a problem.

I am sorry if I seemed to be "not listening" since I only thought that the rotating beam´s collision points were an issue. Since it only crashed when that was on layout.

Thanks again and now I must test if it works now.

No. Still an error. Must check every sprite.

edit2: Yes, there was more sprites with this problem (only in my game version not the uploaded capx). Fixed now. Hopefully now everything is working great.

edit3: No. Not working.
B
30
S
15
G
17
Posts: 137
Reputation: 10,873

Post » Fri Jun 03, 2016 12:44 pm

Can you upload the 'fixed' capx again ? Will go trough it one by one this weekend.
The error you get there usaly is about what i mentioned.
Also, you have to close the browser, between the tests.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Jun 03, 2016 1:01 pm

99Instances2Go wrote:Can you upload the 'fixed' capx again ? Will go trough it one by one this weekend.
The error you get there usaly is about what i mentioned.
Also, you have to close the browser, between the tests.


Yes. I will upload it for you (the "full" version this time). Didn´t know about closing the browser. Thanks. Will try that too! :)

I will upload it in a minute.
B
30
S
15
G
17
Posts: 137
Reputation: 10,873

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests