map-pin Marble Blast Frame Rate Unlocker

  • Derpking
  • Derpking's Avatar Topic Author
  • Offline
  • Developer
  • Developer
  • Derp
More
09 Nov 2014 01:23 - 09 Nov 2014 19:08 #1 by Derpking
Derpking created the topic: Marble Blast Frame Rate Unlocker
Marble Blast Frame Rate Unlocker

Note: This is for Windows only and non-Windows users do not need it because the frame rate is already unlocked.

Also, this does not work with MBP right now. An official MBP update will be released soon which includes this patch.

By default, the Windows version of Marble Blast has its frame rate capped to 64 FPS due to an oversight by GarageGames in the game's timing code. This uses my engine extension system to fix that and allow frame rates up to 1000 FPS.

This is mainly intended for people like me who use a monitor with a refresh rate higher than 60 Hz, but it can also be useful for practice runs at a slower time scale or mod developers wishing to benchmark their code. If you don't fall into any of those categories, then to be honest you won't really have any use for this and you won't notice a difference when it's turned on.

Also note that this will not make your game any faster if you cannot already achieve a frame rate of 64 FPS.

Installation

Download the zip file below and extract all of its contents directly to your Marble Blast installation directory. Double-click the batch file named "MBExtender - Install". If all goes well, it should say that installation succeeded. Marble Blast's frame rate should now be unlocked. Type metrics(fps) into the console to test.

To uninstall, double-click the batch file named "MBExtender - Uninstall".

TorqueScript Functions

This plugin adds a couple of new functions to TorqueScript which can be used to control the game's frame rate more tightly:

  • enableFrameRateUnlock(enabled) - Enables or disables the plugin. Pass in true to enable and false to disable. The plugin is enabled by default.
  • setTickInterval(msec) - Sets the interval (in milliseconds) between game ticks. Defaults to 1. Useful for testing a mod under low frame rate conditions. To force a particular frame rate, pass in (1000 / (desired frame rate)).
  • setTimeScale(scale) - Sets the rate at which physics run relative to the frame rate. For example, 0.5 = half speed, 1 = normal speed, and 2 = double speed. Useful for practice runs (thanks mfpwnsall for inspiring this).

FAQ

I'm getting "Access Denied" when i try to install this. Watdo?
Right-click the installer file and select "Run as administrator."

I'm only getting around 35 FPS right now. Will this make my game run faster?
No. All this does is prevent fast computers from being capped at 64 FPS.

Help! I'm getting screen tearing issues!
This is happening because you are running the game in fullscreen mode with vsync turned off. Either turn vsync on by running setVerticalSync(true) in the console or switch to windowed mode.

Okay, I enabled vsync, but the frame rate is fluctuating around my monitor's refresh rate. Why?
Marble Blast's engine requires rendering to be in sync with the physics, and time increments have to be in a whole number of milliseconds. As far as I am aware, there is nothing that can be done about this. I might be able to somewhat mitigate this problem in a future patch but it can't be resolved completely.

I set the time scale really low and it's making the game lag. Why?
This is related to the answer above. Because time increments have to be done in a whole number of milliseconds, setting the time scale to something like 0.1 will mean that physics, and therefore the renderer, can only run 0.1 * 1000 = 100 times per second.

Is PQ out yet?
No.

Download

Download from MediaFire (361 KB)
Source Code on GitHub

Screenshots

Warning: Spoiler! [ Click to expand ]

"You know you've spelled something wrong when the only search results are Jeff convos" - HiGuy
Last Edit: 09 Nov 2014 19:08 by Derpking.

Please Log in or Create an account to join the conversation.

More
09 Nov 2014 01:32 #2 by m8-the-gr8
m8-the-gr8 replied the topic: Marble Blast Frame Rate Unlocker
I can finally do slow motion MB stuff to work on new paths and strategies.

Thanks so much! This is awesome :D

Please Log in or Create an account to join the conversation.

  • CheepFishMBP
  • CheepFishMBP's Avatar
  • Offline
  • Experienced Marbler
  • Experienced Marbler
  • My account is currently closed
More
09 Nov 2014 05:56 #3 by CheepFishMBP
CheepFishMBP replied the topic: Marble Blast Frame Rate Unlocker
I had trouble with Buzzmusic's leaderboard custom level, Ultimate Flight, because of the low frame rate. Can't wait for this.

(My account is currently closed as of 2017 because Jeff said my graphics card is not powerful enough to run PQ.)

Please Log in or Create an account to join the conversation.

  • Derpking
  • Derpking's Avatar Topic Author
  • Offline
  • Developer
  • Developer
  • Derp
More
09 Nov 2014 07:13 #4 by Derpking
Derpking replied the topic: Marble Blast Frame Rate Unlocker

CheepFishMBP wrote:
I had trouble with Buzzmusic's leaderboard custom level, Ultimate Flight, because of the low frame rate. Can't wait for this.


This doesn't solve lag issues. It only unlocks the framerate so people with fast enough computers can get above 64 FPS.

"You know you've spelled something wrong when the only search results are Jeff convos" - HiGuy
The following user(s) said Thank You: Jeff

Please Log in or Create an account to join the conversation.

  • Jeff
  • Jeff's Avatar
  • Offline
  • Developer
  • Developer
  • PlatinumQuest Programmer
More
09 Nov 2014 07:19 - 09 Nov 2014 07:26 #5 by Jeff
Jeff replied the topic: Marble Blast Frame Rate Unlocker
Let me make this clear:

IF you have less than 64fps, then you can not get higher than 64 fps. This is only for people with good computers. And if you can't get 64fps in marbleblast, then your computer isn't that good.

Let me explain why so I don't get accused of being mean:

marble blast was made in 2002. This is 2014 (almost 2015). The min requirements for this game are128MB of ram, 32MB of video ram, and a 500mhz single core processor. In 2015, most people have at LEAST a dual core processor (usually quad core processors), 4GB to 8GB of ram, and at least 1GB of video ram. Although Marble Blast can only run on 1 core at a time, processors have are WAY advanced 13 years later with new technology.

I can finally do slow motion MB stuff to work on new paths and strategies.

Thanks so much! This is awesome :D


Explain to me how are you going to do slow motion. All this does is makes your framerate better. Although you can lower your framerate, all it does is makes the game have less frames. It doesn't slow down the game physics or anything...

I am a programmer. Most here know me for being one of the major contributors to Marble Blast Platinum and PlatinumQuest.
Last Edit: 09 Nov 2014 07:26 by Jeff.

Please Log in or Create an account to join the conversation.

  • Derpking
  • Derpking's Avatar Topic Author
  • Offline
  • Developer
  • Developer
  • Derp
More
09 Nov 2014 08:28 - 09 Nov 2014 08:29 #6 by Derpking
Derpking replied the topic: Marble Blast Frame Rate Unlocker

mfpwnsall wrote:
I can finally do slow motion MB stuff to work on new paths and strategies.

Thanks so much! This is awesome :D


This actually wasn't originally an intended feature and you misunderstood what this plugin does, but your post inspired me to actually implement a time scaling system where you can slow down the game without making it choppy. Redownload the plugin and then pop open the console and type setTimeScale(insert time multiplier here) to change the speed that the game runs at.

Use setTimeScale(10) for uber hard mode.

"You know you've spelled something wrong when the only search results are Jeff convos" - HiGuy
Last Edit: 09 Nov 2014 08:29 by Derpking.

Please Log in or Create an account to join the conversation.

  • RDs.The-dts-guy
  • RDs.The-dts-guy's Avatar
  • Offline
  • Developer
  • Developer
  • Blender pls
More
09 Nov 2014 10:50 #7 by RDs.The-dts-guy
RDs.The-dts-guy replied the topic: Marble Blast Frame Rate Unlocker
Hmm doesn't seem to work for me, i have all files and everything...

Some guy that does DTS shapes and levels.

AWESOME time HINT : When making PQ level place your custom interiors and textures in platinum/data/interiors_pq/custom
makes life easier for you and everyone else :)

Please Log in or Create an account to join the conversation.

  • Battlecube314
  • Battlecube314's Avatar
  • Offline
  • Professional Marbler
  • Professional Marbler
  • 100% Gold/Ultimate/Awesome!!
More
09 Nov 2014 16:52 #8 by Battlecube314
Battlecube314 replied the topic: Marble Blast Frame Rate Unlocker
This is cool! Now I might get more different internal clock catches when I play MB on my PC!

Please Log in or Create an account to join the conversation.

  • Derpking
  • Derpking's Avatar Topic Author
  • Offline
  • Developer
  • Developer
  • Derp
More
09 Nov 2014 18:51 #9 by Derpking
Derpking replied the topic: Marble Blast Frame Rate Unlocker
New version uploaded. Only change is the installer scripts don't break anymore when run as admin (this fixes RD's problem).

"You know you've spelled something wrong when the only search results are Jeff convos" - HiGuy

Please Log in or Create an account to join the conversation.

  • Battlecube314
  • Battlecube314's Avatar
  • Offline
  • Professional Marbler
  • Professional Marbler
  • 100% Gold/Ultimate/Awesome!!
More
11 Nov 2014 16:39 #10 by Battlecube314
Battlecube314 replied the topic: Marble Blast Frame Rate Unlocker
The framerate unlocker definitely makes IC Levels a lot easier. I got 2.207, 2.209, and 2.228 on Let's Roll within like 15 minutes when I was playing last night. I also hit 2.23 a bunch of times as well.

Please Log in or Create an account to join the conversation.

  • Derpking
  • Derpking's Avatar Topic Author
  • Offline
  • Developer
  • Developer
  • Derp
More
11 Nov 2014 20:23 #11 by Derpking
Derpking replied the topic: Marble Blast Frame Rate Unlocker

Xx MOTB xX wrote:
The framerate unlocker definitely makes IC Levels a lot easier. I got 2.207, 2.209, and 2.228 on Let's Roll within like 15 minutes when I was playing last night. I also hit 2.23 a bunch of times as well.


Yeah, it's likely we'll be seeing some new records from Windows players due to the higher-resolution internal clock.

"You know you've spelled something wrong when the only search results are Jeff convos" - HiGuy

Please Log in or Create an account to join the conversation.

More
18 Nov 2014 20:53 #12 by m8-the-gr8
m8-the-gr8 replied the topic: Marble Blast Frame Rate Unlocker
Well, that wasn't what I meant at all. I meant I can now record in very high framerates, then slow it down in Movie Maker and watch the video in smooth slow motion.

Please Log in or Create an account to join the conversation.

More
19 Nov 2014 02:48 - 19 Nov 2014 02:49 #13 by ProMarbler
ProMarbler replied the topic: Marble Blast Frame Rate Unlocker
Well, why not? Stickied, mostly for discussion purposes.
Last Edit: 19 Nov 2014 02:49 by ProMarbler.

Please Log in or Create an account to join the conversation.

  • RDs.The-dts-guy
  • RDs.The-dts-guy's Avatar
  • Offline
  • Developer
  • Developer
  • Blender pls
More
31 Dec 2014 01:04 #14 by RDs.The-dts-guy
RDs.The-dts-guy replied the topic: Marble Blast Frame Rate Unlocker
Quick question, how do you enable framelimiter in 1.50. I don't see any setting in menu and you can't input commands in online mode...

Some guy that does DTS shapes and levels.

AWESOME time HINT : When making PQ level place your custom interiors and textures in platinum/data/interiors_pq/custom
makes life easier for you and everyone else :)

Please Log in or Create an account to join the conversation.

More
31 Dec 2014 01:25 #15 by Regislian
Regislian replied the topic: Marble Blast Frame Rate Unlocker
It is implemented in 1.50, so u don't have to do anything afaik.

If u turn on Frame Rate Display you'll see it go 64+ (if your computer can handle that).

Please Log in or Create an account to join the conversation.

  • RDs.The-dts-guy
  • RDs.The-dts-guy's Avatar
  • Offline
  • Developer
  • Developer
  • Blender pls
More
31 Dec 2014 18:32 #16 by RDs.The-dts-guy
RDs.The-dts-guy replied the topic: Marble Blast Frame Rate Unlocker
That's the point, I don't want it to be off. It's now off on 1.50 now by default (thus giving me 200-300 fps, but i don't need that, what i want it to keep at what it used to be which was stable 60-64fps) and there doesn't seem to be practical way of turning it on. I even checked prefs.cs and there was nothing close resembling that option or I may just missed it.

Some guy that does DTS shapes and levels.

AWESOME time HINT : When making PQ level place your custom interiors and textures in platinum/data/interiors_pq/custom
makes life easier for you and everyone else :)

Please Log in or Create an account to join the conversation.

More
31 Dec 2014 21:19 - 31 Dec 2014 21:50 #17 by ProMarbler
ProMarbler replied the topic: Marble Blast Frame Rate Unlocker
Have you tried enabling VSync? It may actually have an effect since it wasn't actually VSync being hardcoded/stuck on that was causing the issue. However, the only practical reason I see for turning it off is for a (possibly?) better performance of other programs/applications, or maybe just to conserve power for the sake of your laptop battery/energy bill.

Edit: It works on Mac OS X at least. Try looking for a "disableVerticalSync" and setting it to 0. Thus, you have:
$pref::Video::disableVerticalSync = 0;
Delete the DSO, and you should have around 59-61 FPS.
Last Edit: 31 Dec 2014 21:50 by ProMarbler. Reason: Confirmation, somewhat.

Please Log in or Create an account to join the conversation.

  • Jeff
  • Jeff's Avatar
  • Offline
  • Developer
  • Developer
  • PlatinumQuest Programmer
More
31 Dec 2014 22:45 - 31 Dec 2014 22:46 #18 by Jeff
Jeff replied the topic: Marble Blast Frame Rate Unlocker
setVerticalSync(true);

or do what pro said.

I am a programmer. Most here know me for being one of the major contributors to Marble Blast Platinum and PlatinumQuest.
Last Edit: 31 Dec 2014 22:46 by Jeff.

Please Log in or Create an account to join the conversation.

  • Derpking
  • Derpking's Avatar Topic Author
  • Offline
  • Developer
  • Developer
  • Derp
More
01 Jan 2015 20:32 - 01 Jan 2015 20:32 #19 by Derpking
Derpking replied the topic: Marble Blast Frame Rate Unlocker
enableFrameRateUnlock(false);

will actually turn the plugin off completely. You should still set vsync to be on though (see Jeff's post above me).

"You know you've spelled something wrong when the only search results are Jeff convos" - HiGuy
Last Edit: 01 Jan 2015 20:32 by Derpking.

Please Log in or Create an account to join the conversation.

Moderators: AayrlKalle29Regislian