Framerate counter

if (playerenters) {
  play framerate_silent.mp3;
  timeout = 0.05;

if (timeout) {
  if (musicpos == 0) {
    play framerate_silent.mp3;
  if (musicpos > 1) {
    this.framerate  = this.frame/musicpos;
    this.frame = -0.05;
  showtext 300,15,128,Arial,,Framerate: #v(this.framerate*20);
  changeimgvis 300,8;
  timeout = 0.05;

It uses the Downsider’s Patented Timevar2 Replacement Utilizing Sound Files System, or DPTRUSFS, so you must download and place this file:

in your webgifs folder in order for it to work. The file was generously made by Beholder, who said he spent hours slaving over various music-mixing softwares to create it.

I guess you guys don’t realize that in a timeout of 0.05, it means that they’re can only be 20 possible draws / second on almost any/every modern day computer. (and also, >= 1 on the musicpos part) – so yeah, there is also a timevar which is 5s every 1s or something, so you could’ve used that appropriately as well.

Not sure where you’re going at, but special effects and large loops can slow down framerate below the 20fps that Graal normally runs. Stefan said something similar when a built-in fps display was requested, “Graal always runs at 20 frames so you don’t need to see the framerate”.


not everyone knows about or knows how to use Fraps.

I know all about fraps :stuck_out_tongue: What’s your point, though? Graal doesn’t justify running a third-party program just to see when it trickles down below its amazing 20fps. I just found it odd that Stefan avoided such a simple addition that nearly every graphical game features. Anyways, I could never get fraps to work since about a year or two ago. I forget what was wrong with it, but nothing actually functioned(wouldn’t display fps or record anything).

I didn’t use timevar because getting your framerate over a 5 second span really sucks balls and is quite useless if you’re doing anything relatively intense where the slowdown is situational. This updates every half second, I believe.


timevar2 is a gs2-advancement i believe, and there’s just no need to know the fps because the game should run at 20 fps at all times, and when it isn’t hitting 20 fps… you feel the lag, you know its happening… and that means you suck at scripting, fix it!

Hey, hey… You’re crazy. I fail to see how this isn’t useful. Making WolfenGraal, this was very useful, optimizing, bugfixing, it helped me know where things were going off and why.

It’s not easy to “feel the lag” in a totally new 3D environment. Same with Beholder’s Mode7 server, which I helped him optimize. Hell yeah. Mario Kart madness, maybe.

alright, well i don’t know - i just think it’d probably be more efficient to use fraps.

Hmm, good idea, I’ll tell people to download and start up Fraps before they log into my server.

Pretty sure it’s not. timevar2 has been around for a while, and I just tested it offline. Though if it works in the earlier versions I’m not sure. Also, the same can be said about pretty much any game when it comes to fps. Also, you don’t always feel the lag if it’s minor, and sometimes it’s hard to tell exactly how much a function is hanging up a script(I’ve gotten complaints about things like my sword function feeling ‘slow’, and it was hard to tell if it was the freezeplayer or the script causing a minor pause). Either way, I find fps would be more useful for a scripting environment than when you’re just gaming(like every other game).

It’s not in the old 2.22 client, unfortunately, which is why I did this. You really think I would bother doing all the music shit if it was in the old clients? lol

timevar2 was handled by the NPC-Server, it updated every second as opposed to 5.
Also as for the mario kart thing, the mode7 is still too near sighted, and immediately starts lagging to piss when I extend it.

I keep telling you you’re doing it wrong, there’s no reason why it should, it’s the same amount of texels being sampled and calculated for, you must be doing it wrong :frowning:

Further distance = a lot more texels.

No… Unless you’re increasing the size of the screen or some shit, just keep it the same width and height, and increase the amount it’s “squished” if you understand what I mean. Just angle the camera a bit further.

Pull an OoT.