It is currently 18 Apr 2024, 23:33
   
Text Size

Settings to better optimize Forge?

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Settings to better optimize Forge?

Postby Cellidor » 15 Nov 2019, 23:34

Just wondering if perhaps there are things I can do on the client to help it run more smoothly. I tend to play 4 person FFA vs AI (Commander), but I notice that generally after 1 match (if that) the game will start using more and more resources, slowing down to a crawl until I have to restart Forge altogether. Generally I find I have to restart Forge every match just to keep it functioning. On one of my computers I'll even have it where I can't even finish a single match before it slows to the point of freezing up entirely.

I'm running on version 1.6.29

Just curious if there are perhaps settings that can help with this kind of thing, maybe smooth things out a little bit.
Cellidor
 
Posts: 10
Joined: 17 Oct 2019, 03:53
Has thanked: 5 times
Been thanked: 0 time

Re: Settings to better optimize Forge?

Postby CptKird » 20 Nov 2019, 23:46

Hi, maybe the wrong subforum, but I can point you to two posts, that may help with stability:

https://www.slightlymagic.net/forum/viewtopic.php?f=26&t=22756#p227726

And this one I just posted:

https://www.slightlymagic.net/forum/viewtopic.php?f=26&t=29004#p240196

Maybe it helps in your case, maybe not.
Fingers crossed!
K.
User avatar
CptKird
 
Posts: 182
Joined: 02 Nov 2017, 17:25
Has thanked: 36 times
Been thanked: 29 times

Re: Settings to better optimize Forge?

Postby Cellidor » 07 Dec 2019, 02:06

Sorry it took so long to reply!

Sadly, the fixes mentioned didn't help my games. Or, rather, I'm not experienced enough to know how to fiddle around with the size of the images the game uses, and when I tried following the instructions mentioned in the first link, I had the same problem as Squee, but his fix didn't let it load at all.

Darn shame that. Thanks for responding to my post though!
Cellidor
 
Posts: 10
Joined: 17 Oct 2019, 03:53
Has thanked: 5 times
Been thanked: 0 time

Re: Settings to better optimize Forge?

Postby CptKird » 07 Dec 2019, 13:37

Cellidor wrote:Sorry it took so long to reply!
Not a problem :)

Cellidor wrote:fix didn't let it load at all
I'm sure there's a typo somewhere in your execution command, inside the batch file.
I can confirm this is working on Win10 and current Forge desktop version 1.6.30.001.
Before, Forge used between 570 MByte and 892Mbyte over the course of a complete human vs Ai match.

2019-12-07 12_58_11-Task-Manager_default.png


After starting with a 4096Mbyte allocation, Forge breathed right into the 1660Mbyte range almost from the start.

2019-12-07 12_34_37-Task-Manager_4096.png


Place the attached .txt-file inside your Forge folder of version 1.6.30.001, so that it's next to "forge-gui-desktop-1.6.30-jar-with-dependencies.jar", rename it to "Play Forge 4096.bat" and launch it.
(You will need to edit the command inside the batch file again, after an update, to point to the updated .jar-filename)

Cellidor wrote:I'm not experienced enough to know how to fiddle around with the size of the images
Try this: Make a test pool of the sets you want to use by copying the sets folders including the scans (I'm assuming you use large jpgs as well?) from here:
C:\Users\<YOU>\AppData\Local\Forge\Cache\pics\cards
to a different location and after that's done, move your existing set folders of that test pool outside that cards path to a save location.

For example, I just copied the top 6 folders from my scans folder, which are 4th to 9th edition ;)
Together, those XLHQ-.jpgs add up to 1150 Mbyte (they are 745x1040px@24bit and use a memory footprint of ~2270kbyte each).

Now install Irfanview, if you didn't use this awesome imageviewer yet ;)

https://www.irfanview.net/

Open Irfanview and press "b" to open the batch dialog and set all options to have it look exactly like this:

2019-12-07 13_52_24-Batch conversion.png


set PNG compression to "9" in "Output format" > "Options" and "OK" back:

2019-12-07 13_15_06-PNG_PNM_ICO save options.png
2019-12-07 13_15_06-PNG_PNM_ICO save options.png (11.41 KiB) Viewed 5012 times


Back in batch window click on "Advanced" (directly below "Options") and set everything in that new window exactly like this and "OK" back:

2019-12-07 13_57_22-Set for all images_.png


Now, after navigating to your test pool of cards just click on "Add all" in the lower middle section of the batch window. This should add each jpg in each subfolder, like so:

2019-12-07 14_01_49-Batch conversion.png


Just click "Start batch" and wait until the batch finishes. This may take a while, depending on how many folders need to be processed, so limit your test to just those sets you noticed the slowdown while playing.

Now move your batch processed set folders back in your cards path:
C:\Users\<YOU>\AppData\Local\Forge\Cache\pics\cards

Those pngs are now 320x447px@8bit and should have a memory footprint of ~140kbytes each.
Overall filesize of all 6 folders shrunk from 1150Mbyte to 221Mbyte, but filesize isn't important in that case, memory size is!
Yes, you will see a difference in quality on a large display, but I hope you'll also see a more stable Forge :)

If it's still slow/unchanged, it might have to do with the actual cards being used, if they have complex card scripts for example. Not much you could do about that, I guess. It'd need figuring out exactly which of those cards start the slowdown..

Anyway, please report back if there are problems/setbacks or if it actually helped a bit :)
Fingers crossed!
K.
Attachments
Play Forge 4096.txt
(70 Bytes) Downloaded 286 times
User avatar
CptKird
 
Posts: 182
Joined: 02 Nov 2017, 17:25
Has thanked: 36 times
Been thanked: 29 times

Re: Settings to better optimize Forge?

Postby CptKird » 15 Dec 2019, 11:33

Small Update to:

Cellidor wrote: but his fix didn't let it load at all.
It seems that when Java is NOT installed in the default install location, the batch file won't work either.

Might have something to do with system variable paths but may be even something else that gets broken.

When installed in its default location, it worked without issue.

K.
User avatar
CptKird
 
Posts: 182
Joined: 02 Nov 2017, 17:25
Has thanked: 36 times
Been thanked: 29 times


Return to Developer's Corner

Who is online

Users browsing this forum: Google [Bot] and 49 guests


Who is online

In total there are 50 users online :: 1 registered, 0 hidden and 49 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: Google [Bot] and 49 guests

Login Form