Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

Performance Optimization

Please post tips, tricks, scripts, etc. that improve performance for players using older hardware or less expensive hardware, such as chromebooks.
I wrote a simple API script that you can add to your campaign backend to help optimize large maps with lots of assets on them. This helps people with older hardware. I mostly did this because you can buy old chromebooks on Amazon for as cheap as $50 each for your players to use and this helps maps run on cheap hardware. Command Effect !cleanup-tokens Disables token menus on map and foreground layers only !cleanup-vision Turns off bright/night vision and bright/low light emission on all tokens on the page !cleanup-bars Hides player-visible names and bars 1–3 on all tokens on the page Here is the script: on ( 'ready' , () => {     log ( '--- Token Cleanup Script Ready ---' );     const getCurrentPage = ( playerid ) => {         const player = getObj ( 'player' , playerid );         return player . get ( 'lastpage' ) || Campaign (). get ( 'playerpageid' );     };     on ( 'chat:message' , ( msg ) => {         // Only trigger on command from a GM         if ( msg . type !== 'api' || ! playerIsGM ( msg . playerid )) return ;         const currentPageId = getCurrentPage ( msg . playerid );         const page = getObj ( 'page' , currentPageId );         const pageName = page ? page . get ( 'name' ) : 'Unknown Page' ;         // 1. !cleanup-tokens: Disable menus on Map/Foreground layers         if ( msg . content . indexOf ( '!cleanup-tokens' ) === 0 ) {             sendChat ( 'Token Cleanup' , `/w gm Cleaning up token menus on Page: " ${ pageName } " (Map and Foreground layers)...` );             const layersToClean = [ 'map' , 'foreground' ] ;             let count = 0 ;             const allGraphics = findObjs ({                 _type : 'graphic' ,                 _pageid : currentPageId             });             allGraphics . forEach ( obj => {                 if ( layersToClean . includes ( obj . get ( 'layer' ))) {                     obj . set ( 'disableTokenMenu' , true);                     count ++ ;                 }             });             sendChat ( 'Token Cleanup' , `/w gm Finished! Disabled menus for ${ count } tokens.` );         }         // 2. !cleanup-vision: Turn off vision for ALL tokens on ALL layers         if ( msg . content . indexOf ( '!cleanup-vision' ) === 0 ) {             sendChat ( 'Token Cleanup' , `/w gm Disabling vision for all tokens on Page: " ${ pageName } "...` );             let count = 0 ;             const allGraphics = findObjs ({                 _type : 'graphic' ,                 _pageid : currentPageId             });             allGraphics . forEach ( obj => {                 // Disable common vision/light properties                 obj . set ({                     has_bright_light_vision : false,                     has_night_vision : false,                     emits_bright_light : false,                     emits_low_light : false                 });                 count ++ ;             });             sendChat ( 'Token Cleanup' , `/w gm Finished! Disabled vision for ${ count } tokens.` );         }         // 3. !cleanup-bars: Hide names and bars for ALL tokens on ALL layers         if ( msg . content . indexOf ( '!cleanup-bars' ) === 0 ) {             sendChat ( 'Token Cleanup' , `/w gm Hiding names and bars for all tokens on Page: " ${ pageName } "...` );             let count = 0 ;             const allGraphics = findObjs ({                 _type : 'graphic' ,                 _pageid : currentPageId             });             allGraphics . forEach ( obj => {                 obj . set ({                     showplayers_name : false,                     showplayers_bar1 : false,                     showplayers_bar2 : false,                     showplayers_bar3 : false                 });                 count ++ ;             });             sendChat ( 'Token Cleanup' , `/w gm Finished! Hid names and bars for ${ count } tokens.` );         }     }); });
Nice script for helping out players with low-end equipment. Regarding tips: I've learned to never enable vision for NPCs. If I need to check line-of-sight, I check the player character's: if the NPC is in the PC's LOS, then the reverse is also true. (With practice, I've learned when to be concerned about the limits of darkvision and the like.) We don't worry about details like from which corner of the grid square LOS is determined; center-to-center is good enough. In our case, we aren't playing a war game. (Yes, D&D - the OG TTRPG - was developed from a war game, but not everyone plays then that way anymore.) When not using daylight mode, I limit the use of light-emitting tokens. If the map shows 4 torches in a room, one light-emitting token in the middle on the DL layer can simulate that. For strictly outdoor encounters I always use daylight mode and adjust the slider for overcast skies and for moonlit/moonless nights. Most of my players' machines have decent graphics capability, but I still keep my maps to less than 100 grid squares in any direction. This somewhat nerfs the advantage of long-range weapons and fast-moving characters, but so does having the screen constantly lag or lock up. I try to minimize map-switching because that seems to cause memory problems on some machines. Yet another reason not to split the party! wsnader80 said: Please post tips, tricks, scripts, etc. that improve performance for players using older hardware or less expensive hardware, such as chromebooks.
Personally as a player, the best way that I've found to improve performance on an older PC is to ditch Windows and install Linux.  I switched to Linux 8 months ago and now Roll20 runs like a charm.  Even when other players are complaining about lag or other issues my sessions are smooth and problem free.
Some of my players are on older, slower, computers, often junk-laden Windows dinosaurs that wheeze just browsing the Internet.  That's one reason I've stuck with fog-of-war rather than lighting, although I'm beginning to experiment with that. And some have absolutely miserable wifi setups that choke their bandwdith (to the point of sometimes causing audio drop-outs).  So my tips: No video (if bandwidth is a concern, that's a lot of bandwidth). I use discord for audio (one audio stream, instead of one per player the way roll20 does it. Another thing I do is "right-size" my maps.  I use an old copy of adobe photoshop to change the map to 70x70 pixels per square if it was larger.  And I save in low-res (3 on a 10-scale) jpeg to get the size under a megabyte if possible (less to load when I change maps).  It makes the ground a bit muddy if you zoom in, but most people are zoomed out enough that it doesn't matter, and for the others, do you really care about the texture of a stone floor, or just where the obvious rocks are? And while 50x50 is my normal map size, I've done 100x100 for big outdoor encounters, but I then try to make those out of 50x50 pieces, to keep the individual load size down. And for things like road encounters, I might even use 30x30, assuming we're not dealing with open plains; in a forest, you aren't dealing with distant enemies even in an ambush.
1785283916
Andrew R.
Pro
Sheet Author
I run 13th Age, The One Ring, & Trail of Cthulhu so practically everything that causes performance problems is already turned off, but I’ve found that using WebP at 50% compressed makes big maps load even faster. I use CloudConvert  to do this, but there’s plenty of tools out there.
These are all great tips thank you all