Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003205GameMaker: Studio[All Projects] Functionspublic2012-05-07 15:072013-03-06 09:47
Reporteralexandervrs 
Assigned ToDaniel Cleaton 
PriorityMediumSeverityB - MajorReproducibility100%
StatusclosedResolutionno change required 
PlatformWindows/AndroidOSOS Version
Summary0003205: Functions: Deactivating instances causes lag & crash on Android, lag on Windows when lots of instances exist
DescriptionFIRST CASE:

Using the instance deactivation the appointed way:

instance_activate_all();
instance_deactivate_region(view_xview[0], view_yview[0], view_wview[0], view_hview[0], false, true);

I get massive lag on Android.
Also on Windows I get massive lag when using deactivation with around 4900 instances in the room, when not using deactivation the framerate is normal.


SECOND CASE:

Using:

instance_deactivate_all(true);
instance_activate_region(view_xview[0], view_yview[0], view_wview[0], view_hview[0], true);

I get the expected result on Windows even with lots of instances but the game screen flickers on Android and after some seconds crashes the game.
GM Version
Attached Files? file icon Deactiv.gmz [^] (552,008 bytes) 2012-12-07 15:04

- Relationships

-  Notes
(0001730)
Russell Kay (developer)
2012-05-07 15:48

Please attach a project that exhibits the problem, use a GMZ
(0001731)
alexandervrs (updater)
2012-05-07 16:16
edited on: 2012-05-07 17:12

Here, very old project but demonstrates the problem well as it uses a lot of objects.

http://dl.dropbox.com/u/17514039/Project20.gmz [^]

EDIT: the code is in the Step event of sonic_player object

(0003302)
alexandervrs (updater)
2012-06-01 22:22

^This project was also exhibiting the problem for http://bugs.yoyogames.com/view.php?id=3230 [^] :P
(0007915)
alexandervrs (updater)
2012-08-26 16:28
edited on: 2012-08-26 16:29

Also occurs in HTML5. Basically causes events to glitch out and does not work as intended even with less objects.

(0013071)
Russell Kay (developer)
2012-12-04 15:08

OK the project given does not run in GM:Studio and has lots of errors - until I get another example that works and is simple (not a whole game) I'm not going to address this one.
(0013074)
alexandervrs (updater)
2012-12-04 15:12

I am going to add a new one for you when I get back home.
(0013360)
alexandervrs (updater)
2012-12-07 15:09

Attached a quick example (not sure if the way I used is a proper way to test lag)
(0013378)
Daniel Cleaton (administrator)
2012-12-07 17:07

Using your sample...

// CASE 1
// Windows: ON 60 FPS, OFF 8
// Android: ON 20 FPS, OFF 2 (Galaxy S2)
// HTML5: ON 60 FPS, OFF 60 (Chrome, no WebGL)

instance_activate_all();
instance_deactivate_region(view_xview[0], view_yview[0], view_wview[0], view_hview[0], false, true);


// CASE 2
// Windows: ON 60 FPS
// Android: ON 30 FPS and no screen flicker or crash
// HTML5: ON 60 FPS

instance_deactivate_all(true);
instance_activate_region(view_xview[0], view_yview[0], view_wview[0], view_hview[0], true);


Case 2 is the winner, but these numbers don't seem bad at all for the amount of instances and work being done. HTML5 clearly doesn't active instances off-screen regardless of if you manually specify it. I also didn't get a crash on my phone, but a low-end phone may well have issues with this test.
(0013391)
alexandervrs (updater)
2012-12-07 18:55
edited on: 2012-12-08 14:25

I think HTML5 is just very fast (actually faster than Windows)
Yes, it seems the crash & flicker no longer occurs. Also the FPS looks improved, although the example does lag on my Android Phone but the device itself a bit underpowered.
Maybe this has been already looked into?

(0013575)
Daniel Cleaton (administrator)
2012-12-11 16:09

Possibly - if there was a consistent crash, then I assume something was changed somewhere along the line ;)

Glad it's working okay now anyway. Those numbers I saw were perfectly good (excellent, even) for the amount of work being done and assets in use at once, so Resolving as No Change Required. But perhaps was fixed...

- Issue History
Date Modified Username Field Change
2012-05-07 15:07 alexandervrs New Issue
2012-05-07 15:48 Russell Kay Note Added: 0001730
2012-05-07 16:16 alexandervrs Note Added: 0001731
2012-05-07 16:57 Mike Dailly Assigned To => Russell Kay
2012-05-07 16:57 Mike Dailly Status new => assigned
2012-05-07 17:12 alexandervrs Note Edited: 0001731 View Revisions
2012-06-01 22:22 alexandervrs Note Added: 0003302
2012-08-26 16:28 alexandervrs Note Added: 0007915
2012-08-26 16:29 alexandervrs Note Edited: 0007915 View Revisions
2012-12-04 15:08 Russell Kay Note Added: 0013071
2012-12-04 15:08 Russell Kay Assigned To Russell Kay => user11346
2012-12-04 15:09 Daniel Cleaton Status assigned => feedback
2012-12-04 15:10 Daniel Cleaton Platform => Windows/Android
2012-12-04 15:10 Daniel Cleaton Summary Deactivating instances causes lag & crash on Android, lag on Windows when lots of instances exist => Functions: Deactivating instances causes lag & crash on Android, lag on Windows when lots of instances exist
2012-12-04 15:12 alexandervrs Note Added: 0013074
2012-12-04 15:12 alexandervrs Status feedback => assigned
2012-12-07 14:13 Daniel Cleaton Status assigned => feedback
2012-12-07 15:04 alexandervrs File Added: Deactiv.gmz
2012-12-07 15:09 alexandervrs Note Added: 0013360
2012-12-07 15:09 alexandervrs Status feedback => assigned
2012-12-07 17:07 Daniel Cleaton Note Added: 0013378
2012-12-07 18:55 alexandervrs Note Added: 0013391
2012-12-08 14:25 alexandervrs Note Edited: 0013391 View Revisions
2012-12-11 16:09 Daniel Cleaton Note Added: 0013575
2012-12-11 16:09 Daniel Cleaton Status assigned => resolved
2012-12-11 16:09 Daniel Cleaton Resolution open => no change required
2012-12-11 16:09 Daniel Cleaton Assigned To user11346 => Daniel Cleaton
2013-03-06 09:47 Ross Manthorp Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker