speedUp game perfomance triks

Discussion in 'Learning Javascript' started by Jonforum, Oct 19, 2017.

  1. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,577
    Likes Received:
    1,349
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    I came across something very interesting. !
    I noticed a serious performance gain by adding some line in the package from nodeJS.

    the result with this line
    PHP:
    "chromium-args" "--show-fps-counter --in-process-gpu --ignore-gpu-blacklist --force-gpu-mem-available-mb=10000 --force-gpu-rasterization --enable-native-gpu-memory-buffers --enable-gpu-memory-buffer-compositor-resources",
    give me about 7.8125% cpu load average
    PHP:
    |  +- CPU Total      :min:2.34375  max:7.8125 (/intelcpu/0/load/0)
    |  +- 
    CPU Core #1    :min:0.78125  max:9.375 (/intelcpu/0/load/1)
    |  +- CPU Core #2    :min:0        max:7.8125 (/intelcpu/0/load/2)
    |  +- CPU Core #3    :min:0.78125  max:8.59375 (/intelcpu/0/load/3)
    |  +- CPU Core #4    :min:3.125    max:10.1563 (/intelcpu/0/load/4)
    and without line 11.5234%
    PHP:
    |  +- CPU Total      :min:2.73438  max:11.5234 (/intelcpu/0/load/0)
    |  +- 
    CPU Core #1    :min:0.78125  max:10.9375 (/intelcpu/0/load/1)
    |  +- CPU Core #2    :min:0.78125  max:15.625 (/intelcpu/0/load/2)
    |  +- CPU Core #3    :min:2.34375  max:10.1563 (/intelcpu/0/load/3)
    |  +- CPU Core #4    :min:2.34375  max:11.7188 (/intelcpu/0/load/4)
    the average is clearly visible, and also for each core. !
    i try test with simple basic rmmv project, not use pixi only the basic.
    I run in game about 2 min for each test.
    what do you think of these results, I think that deserve to be interested?
    i use OpenHardwareMonitor for get the result.
    if other can confirm a serious difference in charge of cpu?
     
    Last edited: Oct 19, 2017
    #1
    Kaelan, Eliaquim, Amarok and 2 others like this.
  2. Lee Sang

    Lee Sang Sang Hendrix Veteran

    Messages:
    104
    Likes Received:
    195
    Location:
    Vietnam
    First Language:
    Vietnamese
    Primarily Uses:
    RMMV
    I'm interested.
     
    #2
  3. Llareian

    Llareian Jack of All Trades, Master of None Veteran

    Messages:
    603
    Likes Received:
    1,400
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    I'd guess this is because you're optimizing for your native environment, whereas RMMV is designed to be deployed to many different environments, such as mobile which do not have GPUs. If you're not planning on deploying to mobile, this might be an interesting option.
     
    #3
  4. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,577
    Likes Received:
    1,349
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    Mobile and tablet have a gpu !, it will be a Mali or Qualcomm , apple A.., and Nvidia Tegra ...
    You can allow GPU Rasterization with Android > 4.4
    More info here for android
     
    #4
    Llareian likes this.
  5. Llareian

    Llareian Jack of All Trades, Master of None Veteran

    Messages:
    603
    Likes Received:
    1,400
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks for the source! My quick search led me to believe they do not. My apologies.
     
    #5
  6. peq42_

    peq42_ Yeet Veteran

    Messages:
    452
    Likes Received:
    269
    Location:
    Brazil
    First Language:
    Portuguese(BR)
    Primarily Uses:
    RMMV
    interesting, if more people say that this improved their mobile performance, i think it should come as an update.

    I really hope that the next updates focus on improving performance in general(but mainly mobile, since it's the BEST place to sell and become popular by making a game using a 2D engine)
     
    #6
  7. Alastor01

    Alastor01 Veteran Veteran

    Messages:
    220
    Likes Received:
    255
    First Language:
    Russian
    Primarily Uses:
    N/A
    They do, but embedded devices use OpenGL ES drivers which are nowhere near OpenGL in terms of performance and features. It’s just a subset.

    Are these experimental features you have enabled in the browser? Cause the memory allocation and use of GPU should be auto. Is stability affected?
     
    Last edited: Oct 20, 2017
    #7
  8. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,577
    Likes Received:
    1,349
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    no it is not enabled by default.
    it is necessary to add chromium to the same title as if you wish to add flag to your default Chrome in Windows .ex: chrome://gpu
    if you take a look in package you no have flag added.
    for stability I do not check, I try it only 2 minutes.
    but I just found it interesting.
    In fact, a complete list of possible arguments flag for chromius has been added here.
    https://peter.sh/experiments/chromium-command-line-switches/

    i fiund this one very interesting --enable-accelerated-vpx-decode
    if you use video encode with last new vp9 codec and use alpha chanel.
    related issu here
    https://forums.rpgmakerweb.com/inde...a-encoding-webm-pixi-texture-fromvideo.82002/
     
    Last edited: Oct 20, 2017
    #8
    Alastor01 likes this.
  9. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    672
    Likes Received:
    234
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Hello!
    I noticed that you actually have several optimization tips, including other posts!
    How exactly can I use this?
    That first line I copy it and where exactly should I paste?
    I'm interested in the development for mobile, and it would really help me a lot better the performance.
     
    #9
  10. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,577
    Likes Received:
    1,349
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    hi, its chromium arguments for your app
    you can add those lines in your package.json

    upload_2018-11-30_18-47-47.png
     
    #10
    Eliaquim likes this.
  11. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    672
    Likes Received:
    234
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Thanks!! Should I add on the package.json before or after the deployment?
     
    #11
  12. Yitzi Litt

    Yitzi Litt Made Nepenthe — An RPG that's one giant dad-joke Veteran

    Messages:
    103
    Likes Received:
    29
    Location:
    Planet Earth
    First Language:
    english
    Primarily Uses:
    RMMV
    what exactly does that line do? (sorry, I'm not super good with reading code)
     
    #12
  13. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,577
    Likes Received:
    1,349
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    here all list of chromium arg you can add.
    https://peter.sh/experiments/chromium-command-line-switches/
    Check individuali what line do on google , and look for those interest you in your projet.
    Logicly if you update nwjs, it preOptimised for the best performance, but sometime, you need adjust setting of your app projet.
    And if some setting are good for you, they can be not good for others.
    So hard to say, you need test individually all setting from gpu,cpu, rendering and memory.
    good luck
     
    #13
    Drifter92, Yitzi Litt and Eliaquim like this.

Share This Page