Script call to return device hardware?

I know the script call to return the current resolution, but I was wondering if there's a call I could use to return what hardware the game is currently running on.


This would be useful to me as different iOS devices are capable of running RMMV games at different framerates and knowing how long a "wait" action should be would help a great deal.
If it's just for the wait command, a plugin could be made that changes the wait command to follow actual time rather than the expected frame rate, which would work better in almost any case I can think of. But other than that, http://webglreport.com/ can show you details about the graphics hardware, but without knowing a lot of technical details and programming things yourself, I'm not sure how this would help you.
If it's just for the wait command, a plugin could be made that changes the wait command to follow actual time rather than the expected frame rate, which would work better in almost any case I can think of. But other than that, http://webglreport.com/ can show you details about the graphics hardware, but without knowing a lot of technical details and programming things yourself, I'm not sure how this would help you.



Sadly, I've found that even a wait command in seconds doesn't work on slower hardware. I've attempted this through both a plugin and a direct command that Hudell gave me that would wait 13 seconds.


The problem is that RMMV's engine is counting time internally by frames, and not even graphical frames, either. If I use a plugin to cap framerate in game and have a wait command for 240 frames, it will still only wait 4 seconds when running on the PC, meaning that it's counting frames internally.


On the iPad2, this is slowed to roughly 45 FPS.


The only alternative I can think of would be to find a plugin that caps the INTERNAL framerate as well as the graphical framerate, but I've yet to find such a plugin, sadly. :\
What wait command did you use that works in seconds?


And yes, I've noticed that they kind of broke the wait system with the change to have input and frame updates separate (Which is a good thing in itself, breaking waiting wasn't so good, though). I'm not sure it's been a big issue, though, because I haven't heard anyone having issues with the wait timer, even though I'm fairly sure it is broken.
setTimeout(function(){$gameTemp.reserveCommonEvent(COMMON_EVENT_ID);}, 13000);


I used the above as per Hudell's recommendation. It works fine on a PC, but still lasts the same ~8 extra seconds on the iPad2.


I've tried getting Yanfly's FPS Synch Option plugin to work, but it has a bug where, when you disable the sync (which should allow the game to run at normal speed, independent of framerate), the iPad stops registering touchscreen input. I've reported it as a bug in Yanfly's thread, but I'm not sure if he'll be able to reproduce it or not.
Set timeout wasn't what I had in mind, but I see no reason why it would just last longer on a different device. I was thinking more using decimal numbers (floats) to represent seconds and parts of a second, which ideally shouldn't change much between any device.
I'm definitely up for trying the decimal numbers, but I can say for certain that counting seconds doesn't work on slower hardware. I believe the entire engine is just running more slowly.


I guess another option might be whether or not it's possible to know if a device is running in canvas or webGL mode. My guess is that the engine can tell whether or not the device it's running on is capable of handling 60FPS or not, and if not, I could speed it up based upon that.
It's not really possible to get an accurate estimate of a system's performance because we cannot estimate random variance in CPU speed, as well as background processes and the OS using a lot of resources as well.


As for decimal numbers, it ideally should be capable of tracking time on any speed system, because the general way it works, to me knowledge, is by knowing how long it takes between each cycle the CPU processes, as well as how many cycles it has been between now and a previous point, we can calculate how long it's been between the two points. Of course, the time between individual CPU cycles is pretty much a matter nano seconds or less, and so it takes a loooot of cycles to become something meaningful.
I'd try it. How would I go about doing that?


Also, if there's a way to return the current framerate, I could use that as well. After the game's assets are loaded it could sample the framerate a few different times and I can probably have it self-adjust the game speed from there using a plugin.

Original thread: https://forums.rpgmakerweb.com/threads/script-call-to-return-device-hardware.72848/