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

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Tag365

#1
I have fixed compatibility with apiLevel < 2.4. It should now work correctly.
#2
Quote from: DJ Omnimaga on April 01, 2016, 03:45:27 PM
It doesn't run at all on OS 3.6 :(
Tell me what I need to fix to make it work correctly. Also I updated it so check that version to see if that works correctly.
#3
Quote from: Jim Bauwens on April 01, 2016, 09:49:31 AM
Interesting project!

I've tested it on my handheld, but sadly rendering per frame takes a couple of seconds. You probably tested on the computer or iPad software? Edit: I see that you mentioned this in your readme.
I wasn't expecting it to run fast at all on an actual handheld device.

On Touch Lua, the framework that the library was first implemented, it would also take seconds to draw a frame using a script like this with the huge amount of triangles being rendered to the screen. Though, that was caused by Touch Lua's drawing functions being slow to begin with and me running my scripts on an iPhone 4s (newer devices are much more powerful than that device). I recall being able to draw only about 9,000 triangles a second, and 20,000 rectangles a second (this was the best case scenario as I was running a benchmark script to get that info.), and drawing images lagging up my scripts.

On the Love framework running on my computer, my games would slow down to 30 fps when drawing around 3,110 filled and textured triangles (about 93,510 triangles a second). This is not really a lot (at least for the block building game I was making, the chunk rendering distance is very low), but it was a significant speed up from what it was on Touch Lua. Also, unlike Touch Lua it was also drawing textured triangles (something which I have tried on Touch Lua, but it was slow and it was not complete).

Quote from: Jim Bauwens on April 01, 2016, 09:49:31 AM
Looking at the code, you should try to avoid making tables to store data during rendering, as allocating data from the heap is an expensive operation. Of course, it does become more complex that way to store (for example) vector points, but you really do get a good speedup. The price being that your code gets larger and more messy. If you can avoid certain function calls, you should do that too.

Ok, I will consider doing that. I will also see if doing similar optimizations will also increase rendering speed on other frameworks.
By the way, does moving local variable declarations outside a loop make the script run any faster?
#4
Wait a moment, it says you posted that at 2PM. That post must be broken, it is only 9AM right now, 2PM is in the future.
#5
This thread got a reply very fast, this forum must be very popular. I fixed the download link as well.
#6
This is a Lua program demonstrating smooth voxel terrain on the TI-Nspire. Yes, you read it right, smooth voxel terrain on the TI-Nspire. You can modify and sculpt the terrain, but only inside the zone marked by white lines. You can also move and rotate the camera.

Here is a screenshot:



Download:
Lua3D Smooth Terrain Demonstration
Powered by EzPortal