Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Blog post: Personal Contacts (08/13/20)

Pages: 1 [2] 3

Author Topic: [0.9.1a] Player Gate Construction  (Read 5113 times)

TFrenchCanadian

  • Ensign
  • *
  • Posts: 6
    • View Profile
    • Email
Re: [0.9.1a] Player Gate Construction (v1.0.1)
« Reply #15 on: February 02, 2020, 08:42:42 AM »

I am not the same person but also get a massive fps hit when i have the 3 gate usage abilities (gate switch and use/activate not the build one) on my 3rd bar, i get from 30-40 fps to 1-3 fps when my ability bar with the 3 abilities is on switching to my 1st bar stop the fps hit. my device specification:

Processor : Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz 3.80 Ghz
Installed RAM : 8.00 GB
System type 64-bit operating system, X64-based processor
Graphics Card : GeForce GTX 670
« Last Edit: February 02, 2020, 08:44:35 AM by AimedCanada »
Logged

boggled

  • Captain
  • ****
  • Posts: 385
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.0.1)
« Reply #16 on: February 02, 2020, 11:06:48 AM »

I am not the same person but also get a massive fps hit when i have the 3 gate usage abilities (gate switch and use/activate not the build one) on my 3rd bar, i get from 30-40 fps to 1-3 fps when my ability bar with the 3 abilities is on switching to my 1st bar stop the fps hit. my device specification:

Processor : Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz 3.80 Ghz
Installed RAM : 8.00 GB
System type 64-bit operating system, X64-based processor
Graphics Card : GeForce GTX 670

That's a pretty significant drop. I'll try to rewrite some of the code to improve performance, but no promises. Are you running a large amount of other mods? Despite how old it is, your computer is still relatively fast. Is Starsector installed on a HDD or a SSD?
Logged

TFrenchCanadian

  • Ensign
  • *
  • Posts: 6
    • View Profile
    • Email
Re: [0.9.1a] Player Gate Construction (v1.0.1)
« Reply #17 on: February 02, 2020, 04:35:26 PM »

got 84 mods activated almost all of them faction mods ((including vayra sector and nexerelin) gonna put my a link to my enabled mod) as for my hard drive it is a hdd.

the link : https://drive.google.com/open?id=1rtbE0OFbBqX-IYWo1m_60BcTv3l6GMtS

EDIT: also here a recording i did to show you : https://drive.google.com/open?id=1xY1bRe_z2WsSfFOYCtjOVBwUgDsh1XKT
« Last Edit: February 02, 2020, 04:44:10 PM by AimedCanada »
Logged

boggled

  • Captain
  • ****
  • Posts: 385
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.0.1)
« Reply #18 on: February 03, 2020, 04:59:22 PM »

got 84 mods activated almost all of them faction mods ((including vayra sector and nexerelin) gonna put my a link to my enabled mod) as for my hard drive it is a hdd.

the link : https://drive.google.com/open?id=1rtbE0OFbBqX-IYWo1m_60BcTv3l6GMtS

EDIT: also here a recording i did to show you : https://drive.google.com/open?id=1xY1bRe_z2WsSfFOYCtjOVBwUgDsh1XKT

I think the performance problem you're experiencing is definitely caused by my mod. When you have my gate abilities on the active bar, they have functions that fire every frame which evidently can cause a significant performance impact. I'm working on rewriting some of the code, but ultimately there's going to be some level of impact on slower computers. Thanks for your help with troubleshooting this!
Logged

TFrenchCanadian

  • Ensign
  • *
  • Posts: 6
    • View Profile
    • Email
Re: [0.9.1a] Player Gate Construction (v1.0.1)
« Reply #19 on: February 04, 2020, 12:15:01 PM »

I appreciate it, thank you for you time (and the mod), looking forward the update.
p.s sorry if i am hard to read, i'm francophone.
Logged

boggled

  • Captain
  • ****
  • Posts: 385
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.1.0)
« Reply #20 on: February 05, 2020, 05:50:45 PM »

I appreciate it, thank you for you time (and the mod), looking forward the update.
p.s sorry if i am hard to read, i'm francophone.

Your English is great!

I've optimized the part of the code I believe is responsible for your performance problems, and I added a low performance mode that should completely resolve your performance issues. Please let me know if it works for you!
Logged

TFrenchCanadian

  • Ensign
  • *
  • Posts: 6
    • View Profile
    • Email
Re: [0.9.1a] Player Gate Construction (v1.1.0)
« Reply #21 on: February 05, 2020, 08:00:10 PM »

Forget that, i'm a dumbass who forgot to read the low setting instruction, it work.
« Last Edit: February 06, 2020, 06:15:08 PM by AimedCanada »
Logged

boggled

  • Captain
  • ****
  • Posts: 385
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.1.0)
« Reply #22 on: February 06, 2020, 02:28:05 PM »

I tried the update, while it didn't resolve the fps hit, it did change from 1-3 to 9-10 fps so definitely an improvement ;D.
I do not know how your mod work, but does the gate selection ability scan for a gate in the galaxies because if it does I would recommend doing like the Gates Awakened mod and add an option to only allow the gate that the player activated then again I am not a modder.

Did you use the settings file to enable low performance mode? What's the FPS with low performance mode on, and with it off?

My mod works differently than Gates Awakened. GA only allows a maximum of five active gates that the player can't choose, while my mod allows a theoretically unlimited number built anywhere the player wants. This means I have to use a different search algorithm.
Logged

Wispborne

  • Lieutenant
  • **
  • Posts: 94
  • Discord: Wisp#0302
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.1.0)
« Reply #23 on: February 07, 2020, 01:50:13 PM »

I tried the update, while it didn't resolve the fps hit, it did change from 1-3 to 9-10 fps so definitely an improvement ;D.
I do not know how your mod work, but does the gate selection ability scan for a gate in the galaxies because if it does I would recommend doing like the Gates Awakened mod and add an option to only allow the gate that the player activated then again I am not a modder.

Did you use the settings file to enable low performance mode? What's the FPS with low performance mode on, and with it off?

My mod works differently than Gates Awakened. GA only allows a maximum of five active gates that the player can't choose, while my mod allows a theoretically unlimited number built anywhere the player wants. This means I have to use a different search algorithm.

GA allows the player to choose all of their gates. The first two are assigned for them, but they can (after the second quest) "move" the active status to any other gate. So they can have x active at any given time, deactivating and activating others at their leisure.

https://github.com/davidwhitman/Gates-Awakened/blob/master/src/main/kotlin/org/wisp/gatesawakened/Common.kt#L41

I get all systems, then use `system.getEntitiesWithTag(Tags.TAG_GATE)` to get all gates, then filter on the results of that to get gates activated by GA. This little algorithm is independent of the number of gates activated by GA.

boggled

  • Captain
  • ****
  • Posts: 385
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.1.0)
« Reply #24 on: February 07, 2020, 02:46:02 PM »

I tried the update, while it didn't resolve the fps hit, it did change from 1-3 to 9-10 fps so definitely an improvement ;D.
I do not know how your mod work, but does the gate selection ability scan for a gate in the galaxies because if it does I would recommend doing like the Gates Awakened mod and add an option to only allow the gate that the player activated then again I am not a modder.

Did you use the settings file to enable low performance mode? What's the FPS with low performance mode on, and with it off?

My mod works differently than Gates Awakened. GA only allows a maximum of five active gates that the player can't choose, while my mod allows a theoretically unlimited number built anywhere the player wants. This means I have to use a different search algorithm.

GA allows the player to choose all of their gates. The first two are assigned for them, but they can (after the second quest) "move" the active status to any other gate. So they can have x active at any given time, deactivating and activating others at their leisure.

https://github.com/davidwhitman/Gates-Awakened/blob/master/src/main/kotlin/org/wisp/gatesawakened/Common.kt#L41

I get all systems, then use `system.getEntitiesWithTag(Tags.TAG_GATE)` to get all gates, then filter on the results of that to get gates activated by GA. This little algorithm is independent of the number of gates activated by GA.

My mistake. We actually seem to use a fairly similar method to get a list of active gates - I imagine you don't scan for updates to which gates are active every single frame though, which is where the performance problems appear to come in for people with slower computers.
Logged

Wispborne

  • Lieutenant
  • **
  • Posts: 94
  • Discord: Wisp#0302
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.1.0)
« Reply #25 on: February 07, 2020, 02:49:17 PM »

I tried the update, while it didn't resolve the fps hit, it did change from 1-3 to 9-10 fps so definitely an improvement ;D.
I do not know how your mod work, but does the gate selection ability scan for a gate in the galaxies because if it does I would recommend doing like the Gates Awakened mod and add an option to only allow the gate that the player activated then again I am not a modder.

Did you use the settings file to enable low performance mode? What's the FPS with low performance mode on, and with it off?

My mod works differently than Gates Awakened. GA only allows a maximum of five active gates that the player can't choose, while my mod allows a theoretically unlimited number built anywhere the player wants. This means I have to use a different search algorithm.

GA allows the player to choose all of their gates. The first two are assigned for them, but they can (after the second quest) "move" the active status to any other gate. So they can have x active at any given time, deactivating and activating others at their leisure.

https://github.com/davidwhitman/Gates-Awakened/blob/master/src/main/kotlin/org/wisp/gatesawakened/Common.kt#L41

I get all systems, then use `system.getEntitiesWithTag(Tags.TAG_GATE)` to get all gates, then filter on the results of that to get gates activated by GA. This little algorithm is independent of the number of gates activated by GA.

My mistake. We actually seem to use a fairly similar method to get a list of active gates - I imagine you don't scan for updates to which gates are active every single frame though, which is where the performance problems appear to come in for people with slower computers.

Right, only when they interact with a gate and the dialog is shown.

Why do you need to do it on each frame? Couldn't it be done whenever the player uses one of the abilities?

boggled

  • Captain
  • ****
  • Posts: 385
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.1.0)
« Reply #26 on: February 07, 2020, 02:55:39 PM »

I tried the update, while it didn't resolve the fps hit, it did change from 1-3 to 9-10 fps so definitely an improvement ;D.
I do not know how your mod work, but does the gate selection ability scan for a gate in the galaxies because if it does I would recommend doing like the Gates Awakened mod and add an option to only allow the gate that the player activated then again I am not a modder.

Did you use the settings file to enable low performance mode? What's the FPS with low performance mode on, and with it off?

My mod works differently than Gates Awakened. GA only allows a maximum of five active gates that the player can't choose, while my mod allows a theoretically unlimited number built anywhere the player wants. This means I have to use a different search algorithm.

GA allows the player to choose all of their gates. The first two are assigned for them, but they can (after the second quest) "move" the active status to any other gate. So they can have x active at any given time, deactivating and activating others at their leisure.

https://github.com/davidwhitman/Gates-Awakened/blob/master/src/main/kotlin/org/wisp/gatesawakened/Common.kt#L41

I get all systems, then use `system.getEntitiesWithTag(Tags.TAG_GATE)` to get all gates, then filter on the results of that to get gates activated by GA. This little algorithm is independent of the number of gates activated by GA.

My mistake. We actually seem to use a fairly similar method to get a list of active gates - I imagine you don't scan for updates to which gates are active every single frame though, which is where the performance problems appear to come in for people with slower computers.

Right, only when they interact with a gate and the dialog is shown.

Why do you need to do it on each frame? Couldn't it be done whenever the player uses one of the abilities?

I update the list every frame to ensure the tooltips and usability are always accurate, as the tooltips have info about the destination gate and the number of gates in the Sector. The low performance mode simply updates the list of gates every in-game day rather than every frame.
Logged

Wispborne

  • Lieutenant
  • **
  • Posts: 94
  • Discord: Wisp#0302
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.1.0)
« Reply #27 on: February 07, 2020, 03:44:45 PM »

Gotcha. If I may be so bold, I'd suggest making the "performance mode" the default; once people get the idea in their head that a mod causes performance problems, it's *very* hard to change the collective's mind. People remember and repeat bad things but if it's fixed, or there's a workaround, most won't hear about it and will just avoid it without researching.
Just my two cents.

boggled

  • Captain
  • ****
  • Posts: 385
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.1.0)
« Reply #28 on: February 08, 2020, 09:05:55 AM »

Gotcha. If I may be so bold, I'd suggest making the "performance mode" the default; once people get the idea in their head that a mod causes performance problems, it's *very* hard to change the collective's mind. People remember and repeat bad things but if it's fixed, or there's a workaround, most won't hear about it and will just avoid it without researching.
Just my two cents.

You're entirely correct about this. I wanted to get some feedback first on the performance mode to see if it actually works and if it causes bugs or problems. If nobody reports any issues I will make it the default. It seems to have worked for AimedCanada, so that's a good sign.

Thanks for your help and advice! I appreciate it, especially considering my mod is "competing" with yours.
Logged

Wispborne

  • Lieutenant
  • **
  • Posts: 94
  • Discord: Wisp#0302
    • View Profile
Re: [0.9.1a] Player Gate Construction (v1.1.0)
« Reply #29 on: February 08, 2020, 09:14:54 AM »

Gotcha. If I may be so bold, I'd suggest making the "performance mode" the default; once people get the idea in their head that a mod causes performance problems, it's *very* hard to change the collective's mind. People remember and repeat bad things but if it's fixed, or there's a workaround, most won't hear about it and will just avoid it without researching.
Just my two cents.

You're entirely correct about this. I wanted to get some feedback first on the performance mode to see if it actually works and if it causes bugs or problems. If nobody reports any issues I will make it the default. It seems to have worked for AimedCanada, so that's a good sign.

Thanks for your help and advice! I appreciate it, especially considering my mod is "competing" with yours.

Good plan, makes sense. Competition is good, helps keep me from getting too lax haha. Plus, we have different visions and implementations, so to a large extent it's a preference thing on which mod is "better". I just like seeing good mods in the Starsector modiverse.
Pages: 1 [2] 3