Jump to content



Photo
* * * * * 7 votes

The VP 10.5 beta thread


  • Please log in to reply
1031 replies to this topic

#1021 kiwi

kiwi

    Pinball Fan

  • VIP
  • 2,670 posts

  • Flag: Italy

  • Favorite Pinball: Star Trek 25th Anniversary



Posted 24 February 2021 - 07:09 PM

 

I have an original table that works well in the old PC (Win XP), the table has nothing special has some transparent ramps and very few active objects,

in the PC with Win 10 and gtx960 the table stutters a lot, the FPS are not stable, go up and down.
The other tables I installed work fine, example Demolition Man.
I want to investigate more deeply to understand what could be the cause of the stutter.

 

I realized that the cause is the display I used,

https://www.vpforums.org/index.php?app=downloads&showfile=4272
I get the same stutter also trying the tutorial table of the link above.

 

 

Finally I also understood what the problem is, are the "eval" commands that mess with Windows Defender and create stuttering.



#1022 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 24 February 2021 - 07:45 PM

What do you mean by "eval" ???



#1023 kiwi

kiwi

    Pinball Fan

  • VIP
  • 2,670 posts

  • Flag: Italy

  • Favorite Pinball: Star Trek 25th Anniversary



Posted 24 February 2021 - 08:23 PM

What do you mean by "eval" ???

The display of the link I attached above uses the "Eval" function in scripts.

 

Something like this https://www.vpforums...c=45711&hl=eval



#1024 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 24 February 2021 - 09:29 PM

Interesting that this triggers Windows Defender AND that this is also actually that slow..

I think this is important for all authors out there



#1025 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 25 February 2021 - 01:01 AM

..and if i would knew enough about VBS and also about the core.vbs in general, maybe we could also optimize the use of EVAL and EXECUTE/EXECUTEGLOBAL in there..



#1026 Thalamus

Thalamus

    Pinball Wizard

  • Platinum Supporter
  • 4,983 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 25 February 2021 - 05:43 AM

Just for extra information. I export almost all the tables' scripts via a wrapper. Did a grep for eval, and deleted tables where the title is the same. Like 2 different versions of TAF, only let one get counted, still ended up with close to 200 machines that uses EVAL one or more times. Haven't checked any of the standard machine/core scripts for its use.


From now on. I won't help anyone here at VPF. Please ask Noah why that is.


#1027 Wizball

Wizball

    Enthusiast

  • Members
  • PipPipPip
  • 180 posts

  • Flag: ---------

  • Favorite Pinball: Tales of the Arabian Nights

Posted 25 February 2021 - 01:54 PM

Eval is the only way to handle the VPM timers, where code is run after a certain time. There is no other way to hand over that code than a string to be EVAL'ed.



#1028 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 25 February 2021 - 02:54 PM

And the stuff in core.vbs? Any chance these ones could be done differently?

The problem lies exactly in these strings, and that's why defender is triggered: One could smuggle in malformed strings and thus exploit bugs, etc (not a prob for VP, but other apps)



#1029 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

  • Flag: ---------

  • Favorite Pinball: T2, TOM, AFM

Posted 25 February 2021 - 04:16 PM

Eval is the only way to handle the VPM timers, where code is run after a certain time. There is no other way to hand over that code than a string to be EVAL'ed.

I highly doubt that.

 

IMO a decade or so ago someone figured "hey I can concatenate strings and evaluate them why not use that everywhere!!" and given people mostly just copy and paste snippets because VBScript is so horrendeous to read why bother when it works, scripts nowadays are evaled all over the place. It even goes as far as scripts evaling scripts that are evaling scripts that are evaling scripts...

 

shudder

 

But as bad as VBScript is, I'm pretty sure you can do everything without evaling anything at all.



#1030 jpsalas

jpsalas

    Grand Schtroumpf

  • VIP
  • 7,315 posts
  • Location:I'm Spanish, but I live in Oslo (Norway)

  • Flag: Norway

  • Favorite Pinball: I like both new and old, but I guess I prefer modern tables with some rules and goals to achieve.



Posted 25 February 2021 - 04:28 PM

I think the best is to while list all the VP folder, so it is not scanned at all by any antivirus or Defender (add the whole VP folder to an exception).


If you want to check my latest uploads then click on the image below:

 

vp.jpg

 

Next table? A tribute table to Stern's Foo Fighters


#1031 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 25 February 2021 - 04:42 PM

True, but i would really prefer a solution that would "just work" for all people that don't read tons of forum posts.  :/

Cause i haven't found a way to trigger this from the installer (which makes a lot of sense, as otherwise just any kind of installer with admin rights could whitelist anything).



#1032 Wizball

Wizball

    Enthusiast

  • Members
  • PipPipPip
  • 180 posts

  • Flag: ---------

  • Favorite Pinball: Tales of the Arabian Nights

Posted 25 February 2021 - 05:40 PM

And the stuff in core.vbs? Any chance these ones could be done differently?

The problem lies exactly in these strings, and that's why defender is triggered: One could smuggle in malformed strings and thus exploit bugs, etc (not a prob for VP, but other apps)

When I said "Eval is the only way to handle the VPM timers" I was talking about VPMTimer in core.vbs

I do not see any way to handle that differently, since VBScript does not have first class functions or lambdas.