Skip to content

Instantly share code, notes, and snippets.

@DolenzSong
DolenzSong / FbxToObj.txt
Created June 13, 2018 15:30
A workflow for converting .fbx files to .obj files, for use with MagicaVoxel
[if you need to batch-convert a LOT of .fbx files to .obj files, I recommend hunting down AutoCAD's FBXConverter tool. It's no longer supported or available as a simple download on the AutoCAD website so it may take some hunting. It has some limitations (it won't preserve colors for example) and who knows how long it will work for, but for now it can convert a lot of stuff reslly fast. The rest of this covers a way to convert one model at a time in a way that can allow you more control over the export, and also sometimes retains color information.)
So first locate either FBX files with cool voxel models (they actually don’t even have to be voxel models but those work best--MagicaVoxel will actually voxelize non-voxel .obj files on its own, which is hella rad).
Open Roblox Studio (yes, Roblox Studio, of all things!) and create a Mesh Part. In the properties of the Mesh part is a property called Mesh ID. Click on this and a little folder icon will show up next to the blank for entering the property. Click on
@DolenzSong
DolenzSong / SimpleCodeaUI.txt
Created November 9, 2017 03:36
Codea's built-in UI project jiggered into a single-line-command system, like ellipse(...)
--# Main
-- User Interface
-- Use this function to perform your initial setup
function setup()
print("Hello World!")
yelpFunction = function() print("yeeeeeowch!") end
end
@DolenzSong
DolenzSong / SuperSimpleButtons.txt
Created November 8, 2017 18:56
Codea button creation following the model of the built-in ellipse and rect functions
--# Main
-- SimpleButton
displayMode(OVERLAY)
-- Use this function to perform your initial setup
function setup()
-- Uncomment to run super simple tests:
--tests()
@DolenzSong
DolenzSong / LilViewers.txt
Last active November 8, 2017 11:48
An adaptation for beginners of Codea's built-in Cameras project
--# Main
-----------------------------------------
-- Viewers
-- Written by John Millard
-----------------------------------------
supportedOrientations(ANY)
displayMode(STANDARD)
@DolenzSong
DolenzSong / BadCameras.com
Created October 18, 2017 06:16
An adaptation of Codea craft's Cameras project in which the camera crashes the project
--# Main
-- Cameras
-----------------------------------------
-- Learn Craft
-- Written by John Millard
-- Special thanks to Ignatz for the MultiStep project template
-----------------------------------------
-- Description:
@DolenzSong
DolenzSong / LilLearnCraft.txt
Created October 15, 2017 02:17
A simplified version of the "Learn Craft" project included with Codea
--# Scene
-- Craft Scenes
function setup()
-- Create a new craft scene
yourScene = craft.scene()
-- Activate sidebar controls
setParameters()
@DolenzSong
DolenzSong / CodeaInCodea
Created October 9, 2017 23:49
Codea in Codea by Simeon, in one file
--# Main
function keyHeight()
if CurrentOrientation == LANDSCAPE_LEFT or
CurrentOrientation == LANDSCAPE_RIGHT then
return 350
else
return 260
end
end
@DolenzSong
DolenzSong / CodeaWhenThen.txt
Created June 22, 2017 14:39
WhenThen for Codea
--# Main
-- WhenThen
-- Use this function to perform your initial setup
function setup()
whenThenTest = WhenThen({})
whenThenTest:test()
end
@DolenzSong
DolenzSong / DoubleChooseBlind.txt
Created December 25, 2016 18:09
The game "Double Choose" without custom images and sounds, so it can be run in anyone's Codea on any iPad. Of course without proper images it's nonsense; this version is only useful for code sharing.
--# Main
-- Main
saveProjectInfo( "Description", "Two-choice Adventure Games by Rosie and Charlotte." )
--[[
This project creates two simple adventure games that my daughters made up.
The only project-specific code is in the Main and ImageSet tabs.
All other code can be repurposed without needing direct modification.
The tabs explained in order:
1. Main sets everything up--instantiating and configuring all the other classes.
@DolenzSong
DolenzSong / Fake3DPhysics.txt
Last active September 9, 2016 16:24
Fake 3D physics for Codea, based off of Ignatz's version
--# Main
saveImage("Project:Icon", readImage("SpaceCute:Planet"))
if notSet then print "notSet is true" else print "notSet is nil and false" end
existenceIsTruth = "wow"
if existenceIsTruth then print("existenceIsTruth: "..existenceIsTruth) end
displayMode(OVERLAY)
supportedOrientations(LANDSCAPE_ANY)