[Solved] Problems regarding lag=Firefox and browser prob.

Get help using Construct 2

Post » Sun Dec 13, 2015 3:00 am

Update: Solved on page 3.

I have been working on a game for about 2 weeks now, the last week being quite intensive.
The game uses 16.2 mb memory, has 98 events and its approximate download is 1.3 mb in size.
The resolution is 1200x800 in landscape mode. The sprites/graphics are done in a 1 to 1 ratio, because I thought that changing them from to the power of 2 would solve the problems but it did not.
Scaling is turned off, but I did try with 'scale inner' - no difference.
My graphics drivers are up to date and I have a Geforce GTX 960 with 16 ram and a multithreaded procesor.
The game wasnt running smooth throughtout but I thought to myself that its my computers fault, and testing it on other machines will prove that. It didnt turn out quite that way unfortunately.

Now Im having performance issues regarding scrolling items (as it is a type of infinite runner game), they arent scrolling smoothly enough and are lagging somewhat
from time to time, even so slightly sometimes but that does make a difference.
I have tested the CapX file on 3 different computers and the results are somewhat simillar, unsmooth slightly jittery scrolling and movement.
There is one background and several items scrolling from side to side once they are spawned outside the screen (at max there are 20 sprites of 1 instance about 30x30 pixels in size, and 2 insances of another, and 2 x 1 instance of some seperate sprite. I have tried turning those off but no luck there).
I am destroying the items once they leave the screen so that is not the issue.
I have *dt everywhere in the values.

I have tried to test it, and have turned off certain sprites, and the background too and the effect is the same.
I am wondering if the problem lays withing the file itself because there is a wierd glitch where I cant change the preview browser(it just doesnt respond, other time doesnt see the installed web browser - but it is there for sure. I even tried reinstalling the browser but that did not work either), which happened on the other 2 computers as well.

I am attaching an empty capx file, the one that I used for my game but have cleared almost all data. Just open it and try to preview the file in a different browsers; start with Firefox, then Opera and Internet Explorer (scroll down for link to file).

I have set different browsers to default browsers to no avail too. I tried to reinstall Construct 2 as well but that did not help either.

In one last act of desperation, tomorrow Im going to try to create a part of the game in a entirely new file, and see how it goes there.

If this doesnt work Im going to call it quits unfortunately, as I came to really enjoy Construct 2 and its event sheets. But focusing on such issues drains my patience and creativity so that I have no more energy to focus on the gamey side of things, even so I have been trying to troubleshoot this issue for quite some time now.

Will keep you all posted, any suggestions are welcome as always.

Link to file:
https://www.sendspace.com/file/nrsdso


Also screen of problem:

Image


My other 2 threads regarding this issue:

Bug section: viewtopic.php?f=151&t=165188&p=998445#p998445

How do I section, with a very brief explanation: viewtopic.php?f=151&t=165188&p=998445#p998445
Last edited by Solomon on Tue Dec 15, 2015 8:39 am, edited 4 times in total.
Brick by brick, stone by stone.
B
52
S
24
G
17
Posts: 273
Reputation: 12,663

Post » Sun Dec 13, 2015 5:23 am

A couple hours down the line I created an empty scene with only 2 boxes moving on the screen both with wrap behaviour.
One is moving using bullet behaviour and the other self.x + x * dt behaviour.

Now what I find is that every second the boxes lag and then go back to smooth movement.
So its something like this:

Moving smoothly....1 seconds passes, a quick jerk then - moving smoothly....1 seconds passes, a quick jerk then - moving smoothly.... etc.
So its smooth movement until the 1 second mark is passed, then a sharp jerk for some miliseconds, then it all repeats.

Additionally when any help bubbles appear around my desktop, the boxes start to lag more...

Could someone take a look at my Capx file below and see if its only me that is having such issues? Thanks.

https://www.sendspace.com/file/fvhk8a
Brick by brick, stone by stone.
B
52
S
24
G
17
Posts: 273
Reputation: 12,663

Post » Sun Dec 13, 2015 7:19 am

Update:

Installed Chrome, managed to preview the scene with 2 boxes (attached above), this time tried different resolutions (testing with scaling turned off):
(Cpu utilisation: under 1 percent)

Resolution: 1280x800 px -----> 37-39 FPS in debug mode - very choppy
Resolution: 1440x900 px -----> 60 FPS in debug mode - No lag, seems that Im on to something (but I dont want to work or view the game in this resolution as its blurry)
Resolution: 1680x1050 px ---> 58-59 FPS in debug mode - Overall smooth, every time 1 second mark is passed there is a jitter/quick lag
Resolution: 1920x1200 px ---> 59 FPS in debug mode - Overall smooth, every time 1 second mark is passed there is a jitter/quick lag (same as above), really really annoying!

Is html5 really so fussy about resolutions? Am I doing something wrong? Is it a problem with my video card (which is new, only less than a year old, and has up-to-date drivers), or does the problem lie within Windows 7?

Any ideas?
Brick by brick, stone by stone.
B
52
S
24
G
17
Posts: 273
Reputation: 12,663

Post » Sun Dec 13, 2015 11:58 am

I've tried both of your capx without a big problem. The preview in different browser works. I have only sometimes the problem that the browser not comes up into foreground.
I do have the lagging problem, but only in the beginning, after a few seconds it mostly works without problem. What I recognize is, that the browser seems to be sensitive against other program starts or clicking intensive with the mouse. You could look at the Task-Manager if there is any program what start uses CPU-Usage when the lagging appears.
B
24
S
3
G
1
Posts: 430
Reputation: 2,123

Post » Sun Dec 13, 2015 12:24 pm

@Asmodean

Thanks for responding. Regarding CPU-usage in the Task Manager, it is 1% (multi threaded procesors).
The lagging, do you have it with other capx files too? Or only this one?
What Im wondering is, if I purchase the full version will I be able to export to windows in another way than html5? This is a deal braker for me, because if yes I will buy Construct today.


UPDATE 01:

I have done the following:

1) Formated the computer.
2) Installed new fresh Windows 7 64 bit.
3) Installed all the up-to-date drivers for all the components, including graphics card.
4) Updated bios.
5) Installed Construct 2 and Firefox, nothing else.
6) Ran the example that Ive posted here (uploaded above).

Still the lagging problem persists. I am having issues like I mentioned above with the example I uploaded, the two boxes moving.

I can rule out:
1) Windows
2) Graphic drivers
3) Full hard-drive

I read somewhere that there has to be a problem with the hardware somewhere, or perphaps a driver, Im not sure. But regarding drivers, there are no errors in the Device Manager under the Windows Control Panel. Same goes for hardware, no errors, nothing.
Im not sure how to go about it at the moment. Any insight would be great.

UPDATE 02:

I have installed Opera, and still I cant open the file in Opera, same error.
Brick by brick, stone by stone.
B
52
S
24
G
17
Posts: 273
Reputation: 12,663

Post » Sun Dec 13, 2015 12:46 pm

Solomon wrote:
Thanks for responding. Regarding CPU-usage in the Task Manager, it is 1% (multi threaded procesors).
The lagging, do you have it with other capx files too? Or only this one?
What Im wondering is, if I purchase the full version will I be able to export to windows in another way than html5? This is a deal braker for me, because if yes I will buy Construct today.


I have the lagging also with other capx. The more complex, more often I see micro stuttering in the beginning, but it is only for a few seconds and I think that it's because of loading of the assets without preloading. I see it only when I start direct with the layout where movement is.
Every export with construct based on html5, if you have the full version you can export to nw.js that wrapped your game direct in a chromium-based browser. So you have a direct runnable game without browser.



UPDATE:

I have done the following:

1) Formated the computer.
2) Installed new fresh Windows 7 64 bit.
3) Installed all the up-to-date drivers for all the components, including graphics card.
4) Updated bios.
5) Installed Construct 2 and Firefox, nothing else.
6) Ran the example that Ive posted here (uploaded above).

Still the lagging problem persists. I am having issues like I mentioned above with the example I uploaded, the two boxes moving.

I can rule out:
1) Windows
2) Graphic drivers
3) Full hard-drive

I read somewhere that there has to be a problem with the hardware somewhere, or perphaps a driver, Im not sure. But regarding drivers, there are no errors in the Device Manager under the Windows Control Panel. Same goes for hardware, no errors, nothing.
Im not sure how to go about it at the moment. Any insight would be great.


5) Installed Construct 2 and Firefox, nothing else.

Not any antivirus software in the background or plugins?

Do you have the lagging with games from the arcade or any other scrolling game?
Have you tried it in fullscreen? (F11 in Browser)

What Graphiccard do you have? Can it be that the newest driver has a problem with micro stuttering? (Do you google it)? Could it be a problem with the vsync in you driver?
B
24
S
3
G
1
Posts: 430
Reputation: 2,123

Post » Mon Dec 14, 2015 4:06 am

@Asmodean

Once again thanks for taking the time to respond, I really appreciate it.

Turning off the antivirus in the background does not make a difference.

My graphics card is a Geforce960. I am looking into micro stuttering and vsync as you suggested (I did have tearing in the past) but Im not sure this is the case in this situation.
The issue is that every second (or 60 frames) the smooth movement of a moving sprite is interupted with a micro stutter (I think I can call it that as to your previous post).
As you might imagine this is really annoying and makes for testing games more difficult as Im wont be sure if its the micro stuttering causing lag or simply too much data in my game.

I do have the same lag in games here on Scirra in the arcade section, so that shows that is not only when I preview my game.

As for the vsync problem in my card, the vsync is turned off at the moment and I dont see any tearing but I still do see the micro stutters. I need to do some more research, in the meantime any more suggestions are very welcome.
Thanks.
Brick by brick, stone by stone.
B
52
S
24
G
17
Posts: 273
Reputation: 12,663

Post » Mon Dec 14, 2015 10:58 am


Once again thanks for taking the time to respond, I really appreciate it.


No problem, what me really baffles is that after you set up all new the problems still exists, even the problem with the browser selection. I wonder if this is the same cause or a complete other. That means we could exclude 3rd party software. It remains a hardware problem, windows itself or windows driver.

Do you have installed Windows, Construct and the Browsers all on drive C or some exotic drive like J or Y?
Maybe this could cause a problem in finding the browsers.

My graphics card is a Geforce960. I am looking into micro stuttering and vsync as you suggested (I did have tearing in the past) but Im not sure this is the case in this situation.
The issue is that every second (or 60 frames) the smooth movement of a moving sprite is interupted with a micro stutter (I think I can call it that as to your previous post).
As you might imagine this is really annoying and makes for testing games more difficult as Im wont be sure if its the micro stuttering causing lag or simply too much data in my game.


I really understand that is annoying and a big problem for you.
Can you test your box capx again in firefox and this time press F12. Now the WebConsole from FireFox should be shown. There should be a Performance-tab on the top of the webconsole-window and a little double window icon(show in own window) on the right (second last before the x).
While your capx is previewed in FireFox with WebConsole open. Click the performance-tab, now there should be a record button, click it and wait that the stuttering appears several times. Now stop the record and click on the second icon from the right to show the result in its own window(maximize the window).
You should now see the stuttering in the graph above. There is a millisecond scale on the graph, look the time where it stutter and now scroll down, on the left side you should see what happens to the time a little yellow or red square is on the time scale. With a little luck you see the culprit.
In my example you can see one stutter at ca. 4800ms and the culprit is the garbage collection shown below.
Image
B
24
S
3
G
1
Posts: 430
Reputation: 2,123

Post » Mon Dec 14, 2015 11:18 am

Do you have installed Windows, Construct and the Browsers all on drive C or some exotic drive like J or Y?
Maybe this could cause a problem in finding the browsers.


Nope, Ive installed everything on a C:\ drive. Ive got a 2GB hard drive without any partitions, and clean after the format (well now it has some hardware testing utilities as I have been testing the temperature of my graphics card and processors, as well as the fans whether they are working or not and all is ok in this matter).

I have done as you suggested but still cant figure out much from the graph?

Image
Last edited by Solomon on Mon Dec 14, 2015 11:27 am, edited 1 time in total.
Brick by brick, stone by stone.
B
52
S
24
G
17
Posts: 273
Reputation: 12,663

Post » Mon Dec 14, 2015 11:21 am

Ive created another one, this one seems more busy and I even did not do anything to keep my computer busy.

Image
Brick by brick, stone by stone.
B
52
S
24
G
17
Posts: 273
Reputation: 12,663

Next

Return to How do I....?

Who is online

Users browsing this forum: Ajbael, the_Shit_hawk, Vodakman, zenox98 and 13 guests