Join us on Discord!
You can help CodeWalrus stay online by donating here.

[TI-Nspire] Lua3D Smooth Terrain Demonstration

Started by Tag365, March 31, 2016, 08:47:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dream of Omnimaga

Ok cool. I'll try the new version when I am back home. :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Jim Bauwens

Quote from: Tag365 on April 01, 2016, 02:39:46 PM
By the way, does moving local variable declarations outside a loop make the script run any faster?

I do not think that you will get a noticeable effect out of that.

Also, there are some nice Lua profiling tools out there, I've been using LuaProfiler to optimize a raytracer engine and the output is very useful. Possible you can use one at PC side.

Dream of Omnimaga

One thing that helped with 3D in the past on the Nspire was switching to fixed points or integers instead of floating points. This is partly why Crafti runs over 3 times faster than Ncraft despite having not only textures, but also greater rendering distance. But I don't know if those are available in Nspire Lua.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

aetios

Ha, that looks reeeally cool :D Hope you can find a way to speed it up a bit hahaha.
ceci n'est pas une signature

Jim Bauwens

Quote from: DJ Omnimaga on April 03, 2016, 05:34:44 PM
One thing that helped with 3D in the past on the Nspire was switching to fixed points or integers instead of floating points. This is partly why Crafti runs over 3 times faster than Ncraft despite having not only textures, but also greater rendering distance. But I don't know if those are available in Nspire Lua.

In Lua number type is a compile time option, and most versions are built to use floats/doubles. So sadly there is no way to force pure integer usage (as far as I know).

Dream of Omnimaga

Ah, too bad. I wish this was possible in Basic and Lua. Maybe the render distance and quality could be reduced to increase the frame rate? But I wonder how much quality reduction would be required in order to reach 3 FPS?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal