I think it must be something associated with my iPad as I removed lots of files from Photos and Downloads, moved a lot of large files from my Codea folder, ran it again and it still ‘crashed’.
The I tried to record the screen whilst demonstrating this - set the screen video capture loaded and ran the project and it crashed again but when I tried to stop the video it wasn’t running it looks like the crash stopped the video as well (tried a few times and it repeated the crash).
Last resort, posting what I have in pasted into the demo, after my edits, please check on your pads.
Also included details of my system in a snapshot.
seed = math.random(1, 10^10)
-- Create a new craft scene
scene = craft.scene()
scene.camera:add(OrbitViewer, vec3(0, 0, 0), 10, 0, 100000000)
scene.camera.farPlane = math.maxinteger
local grass = scene.voxels.blocks:new("Grass")
grass.setTexture(ALL, "Blocks:Dirt Grass")
grass.setTexture(UP, "Blocks:Grass Top")
local snow = scene.voxels.blocks:new("Snow")
local sand = scene.voxels.blocks:new("Sand")
scene.voxels:resize(vec3(10^4, 1, 10^4))
scene.voxels.visibleRadius = 40
scene.voxels.coordinates = vec3(0, 0, 0)
scene.voxels:iterateBounds(vec3(0, 0, 0), vec3(100, 1, 100), generateVoxels)
-- Update the scene (physics, transforms etc)
-- Called automatically by codea
-- Draw the scene
function generateVoxels(x, y, z, id)
local perlin = craft.noise.perlin()
local height = perlin:getValue(x / 280, z / 292, seed)
if height >= math.random(7, 8) / 10 * -1 then
if math.random(1, 10000) / height < 500 then
if height >= .00001 then
scene.voxels:block(vec3(x, height * -56, z))