ShiVa3D: FPS Display
We are preparing some practical improvements made possible with the new API functions available in the 184.108.40.206 Beta version of ShiVa3D. So when it comes out of Beta, we will refresh this page with the new version of the FPS Display script.
As we had promised before, to celebrate the latest ShiVa3D version ( 220.127.116.11) which came out of Beta just the other day, we are also releasing the promised improvements to our FPS Display script. The new API functions make it possible to query not only the current FPS, but also the following extremely useful runtime values:
- Draw calls
To have a realtime feedback of these values is an absolute must for every developer struggling to raise his game’s FPS above a playable level, especially on mobile devices. Optimization for performance has finally got valuable assistance with these new functions as the counters are available on the devices, too, not only in the ShiVa3D Editor.
Download the STE archive for free and add it to your own projects!
- Download the STE archive
- Import the FPS_Display_V2.ste package into your project
- Add FPS_Display_Main AI model to your game’s User Main AIs panel
- Add FPS_Display HUD to your game’s Resources panel
- Define a few parameters in the FPS_Display_Main.onInit script (optional)
- Compile, start your game and enjoy!
If you follow these simple instructions, you will get the statistics displayed in the top left corner as in the case of this screenshot:
If you had already used our previous script, you should have no problem importing the new version and overwriting the old resources. It is always a good idea to backup your project before.
This STE includes a separate font assigned to the FPS Display HUD components. The font has a dropshadow effect to be readable over any background and uses a 512×512 texture to keep the solution lightweight on mobiles. If even that is too much, try to downscale the texture to 256×256, it will still be legible. Or just set the font you already use in your game.
The functions in this script require ShiVa3D v18.104.22.168, some will not work in previous versions and will breake your game. Remember that 22.214.171.124 is not backward compatible, so after you open your project with the new ShiVa, you are not be guaranteed to be able to open it again in an older version. Use our previous version of the script if you need just the FPS display.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Comments are welcome either if you have trouble or have an idea for further improvement. Was it simple enough to follow? Or does anyone need a videotutorial?